Skip to content

Use foundry UI in sncast #3396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 149 commits into from
Jun 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
0e607b9
wip: Add `foundry-ui` crate; Integration with sncast
franciszekjob May 20, 2025
9335d7b
wip: Add `Message` impl for more responses
franciszekjob May 20, 2025
5b1f2ba
wip: Reorganize files
franciszekjob May 20, 2025
59ac3e7
wip: Adjust response structs to fix state file tests
franciszekjob May 21, 2025
5ea5b34
Remove unused code
franciszekjob May 21, 2025
44d1562
wip: Fix call tests
franciszekjob May 21, 2025
d557ada
wip: Fix account deploy tests
franciszekjob May 21, 2025
ef4350c
fix: cast scripts
franciszekjob May 21, 2025
bf6795c
fix: more more tests
franciszekjob May 21, 2025
c2f506b
wip: Adjust displayed text for command
franciszekjob May 21, 2025
b3be726
fix: show-config tests
franciszekjob May 21, 2025
5d08566
Remove `command` field from command response structs
franciszekjob May 21, 2025
88946cc
Uncomment block explorer tests
franciszekjob May 21, 2025
5de4910
Fix multicall tests
franciszekjob May 21, 2025
2f1e758
Fix more tests
franciszekjob May 21, 2025
259f085
Revert "fix: show-config tests"
franciszekjob May 21, 2025
dd2fafb
Update `OutputData.to_lines`
franciszekjob May 21, 2025
4808311
Update `OutputData.to_lines`
franciszekjob May 21, 2025
8d36d8b
Revert "Update `OutputData.to_lines`"
franciszekjob May 21, 2025
0fe74ff
Revert "Update `OutputData.to_lines`"
franciszekjob May 21, 2025
ecec1c1
Fix show config tests
franciszekjob May 21, 2025
108f17c
Restore `command` field in command response structs
franciszekjob May 21, 2025
018d456
Revert "Restore `command` field in command response structs"
franciszekjob May 21, 2025
10eae2e
Further improvements of `Ui`
franciszekjob May 21, 2025
f8ab2e7
Code cleanup
franciszekjob May 21, 2025
d602d25
Add `TaggedMessage`
franciszekjob May 22, 2025
1cc4860
Restore `print_as_warning_usage`
franciszekjob May 22, 2025
802e4fa
Remove part of print helpers and their usages
franciszekjob May 22, 2025
9e352bd
Refactor structs; Reorganize files
franciszekjob May 22, 2025
b08b311
Code cleanup
franciszekjob May 22, 2025
ef235eb
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob May 22, 2025
ce3231f
Code cleanup
franciszekjob May 22, 2025
271927a
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob May 22, 2025
af89bf6
Add `TypedMessage`
franciszekjob May 22, 2025
ddd776b
Add generic impl `Message` for `CastMessage<T>`
franciszekjob May 22, 2025
34a308a
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob May 22, 2025
fbf1e3f
Little code cleanup
franciszekjob May 22, 2025
6eede47
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob May 22, 2025
6adfdbf
Fix linting
franciszekjob May 22, 2025
10d8654
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob May 22, 2025
03e76ee
Apply further usages of ui in cast
franciszekjob May 22, 2025
b998ca1
Fix compilation errors
franciszekjob May 22, 2025
9743736
Perform self code review
franciszekjob May 22, 2025
dc974d6
Remove unused code
franciszekjob May 22, 2025
63cd96e
Rename `CastMessage` -> `SncastMessage`
franciszekjob May 22, 2025
004d8a4
More self code review
franciszekjob May 22, 2025
ec687ff
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob May 22, 2025
ec7508a
Add comment
franciszekjob May 22, 2025
47e0dc1
Add comments to message components
franciszekjob May 22, 2025
6057e7a
Add comments to `print_warning` and `print_error`
franciszekjob May 22, 2025
d69d7b1
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob May 22, 2025
c5ab83a
Fix linting
franciszekjob May 22, 2025
2864337
Fix linting
franciszekjob May 22, 2025
f578287
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob May 22, 2025
b6a80a6
Add todos
franciszekjob May 22, 2025
ea2c997
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob May 22, 2025
c8d9a58
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob May 22, 2025
35570a3
Remove most of ui usage from crates other than sncast
franciszekjob May 22, 2025
96a4cd0
Code cleanup
franciszekjob May 22, 2025
3b78e78
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob May 22, 2025
dff8881
Fix newline
franciszekjob May 23, 2025
e557e3d
Rename `Ui` to `UI`
franciszekjob May 25, 2025
a08902f
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob May 25, 2025
d3e06ec
Apply code review suggestions
franciszekjob May 25, 2025
a03f6e9
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob May 25, 2025
8c9ac4d
Appply code review suggestion
franciszekjob May 25, 2025
c659040
Refactor printing in `account list`
franciszekjob May 25, 2025
920d299
Update tagged message `text`
franciszekjob May 26, 2025
845c47f
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob May 26, 2025
2d832ec
Fix typo in sncast message
franciszekjob May 26, 2025
e4b1677
Rename message structs
franciszekjob May 26, 2025
b7bf28e
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob May 26, 2025
5755a47
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob May 26, 2025
1619e75
Remove default `text` implementation in `Message`
franciszekjob May 26, 2025
9625877
Merge branch 'master' of https://github.com/foundry-rs/starknet-found…
franciszekjob May 26, 2025
7c9f94d
Rename `max_fee` to `estimated_fee`
franciszekjob May 26, 2025
9690ba0
Use foundry UI in devnet
franciszekjob May 26, 2025
31f4325
Apply code review suggestions
franciszekjob May 27, 2025
73a876d
Add doc to tag/label styles
franciszekjob May 27, 2025
a066bc7
Merge branch '3022-foundry-ui' into 3022-2-message-components
franciszekjob May 27, 2025
be812fe
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob May 27, 2025
fd3ca84
Fix import
franciszekjob May 27, 2025
391e0b5
Apply part of code review suggestions
franciszekjob May 27, 2025
0cb39ae
Refactor displaying explorer links
franciszekjob May 27, 2025
690b81d
Add todo
franciszekjob May 27, 2025
0628def
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob May 27, 2025
0308f9d
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob May 27, 2025
b5f8a5b
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob May 27, 2025
a6526b9
Fix compilation errors
franciszekjob May 27, 2025
dad87de
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob May 27, 2025
c9943c6
Add `WarningMessage` and `ErrorMessage`
franciszekjob May 27, 2025
ed91e81
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob May 27, 2025
ae03342
Change printing error to error message in devnet
franciszekjob May 27, 2025
a046fd7
Apply code review suggestions
franciszekjob May 29, 2025
62a32ac
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob May 29, 2025
b65da74
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob May 29, 2025
04527af
Apply code review suggestions
franciszekjob Jun 2, 2025
880834d
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob Jun 2, 2025
9599c1d
Apply code review suggestions
franciszekjob Jun 2, 2025
6c2a8a5
Add `message_type` field in `WarningMessage`
franciszekjob Jun 2, 2025
f8507e8
Allow creating typed messages from `Message`
franciszekjob Jun 2, 2025
eb899b1
Remove unused code
franciszekjob Jun 2, 2025
f8ad7e8
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob Jun 2, 2025
3747174
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob Jun 2, 2025
b8b5309
Update `Message` doc
franciszekjob Jun 2, 2025
946b409
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob Jun 2, 2025
e6fa871
Apply part of code review suggestions
franciszekjob Jun 2, 2025
2d12721
Remove unnecessary `Serialize` bound from `SncastMessage<T>`
franciszekjob Jun 2, 2025
d7d8e71
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob Jun 2, 2025
ae3aad0
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob Jun 2, 2025
4d9fd24
Code cleanup
franciszekjob Jun 2, 2025
2ceef8c
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob Jun 2, 2025
f62d09d
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob Jun 2, 2025
e3bb576
Rename `OutputLinkMessage` to `ExplorerLinksMessage`
franciszekjob Jun 2, 2025
4d0dfe6
Remove unnecessary `Serialize` trait bound
franciszekjob Jun 2, 2025
91d5e69
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob Jun 2, 2025
9e6c9ca
Apply code review suggestions
franciszekjob Jun 2, 2025
6b77d10
Use tuple structs for warning and error messages
franciszekjob Jun 3, 2025
c9f7157
Remove unused code
franciszekjob Jun 3, 2025
b89f4d8
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob Jun 3, 2025
30e6463
Update errors text in messages json serialization
franciszekjob Jun 3, 2025
68a7225
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob Jun 3, 2025
e7cb842
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob Jun 3, 2025
5c91280
Change return type of `json` to `serde_json::Value`
franciszekjob Jun 3, 2025
22d51b3
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob Jun 3, 2025
43e4fac
Remove `Decimal`
franciszekjob Jun 3, 2025
5461f2c
Add `format_message`
franciszekjob Jun 3, 2025
f57f868
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob Jun 3, 2025
71dadee
Fix compilation errors
franciszekjob Jun 3, 2025
09b299e
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob Jun 3, 2025
9664933
Fix compilation errors
franciszekjob Jun 3, 2025
b865b70
Apply code review suggestion
franciszekjob Jun 3, 2025
904e4e6
Remove `Printer`
franciszekjob Jun 3, 2025
abb06f0
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob Jun 3, 2025
d3d5d10
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob Jun 3, 2025
f8fca17
Fix compilation errors
franciszekjob Jun 3, 2025
64a2ca7
Fix tests
franciszekjob Jun 3, 2025
5ef9e5c
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob Jun 3, 2025
302dc15
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob Jun 3, 2025
fa1a872
Remove `Clone` from `UI`
franciszekjob Jun 3, 2025
8ca991d
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob Jun 3, 2025
d91f8d1
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob Jun 3, 2025
3030bb2
Apply code review suggestions
franciszekjob Jun 4, 2025
7a58578
Merge branch '3022-foundry-ui' of https://github.com/foundry-rs/stark…
franciszekjob Jun 4, 2025
dcaaf66
Merge branch '3022-2-message-components' of https://github.com/foundr…
franciszekjob Jun 4, 2025
b2c960c
Apply code review suggestions
franciszekjob Jun 4, 2025
1fa3508
Fix tests `account list` tests
franciszekjob Jun 4, 2025
d283471
Add todo
franciszekjob Jun 4, 2025
c8619d3
Merge branch 'master' of https://github.com/foundry-rs/starknet-found…
franciszekjob Jun 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/cheatnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ k256.workspace = true
p256.workspace = true
shared.workspace = true
rand.workspace = true
foundry-ui = { path = "../foundry-ui" }

[dev-dependencies]
ctor.workspace = true
Expand Down
4 changes: 3 additions & 1 deletion crates/cheatnet/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use cheatnet::runtime_extensions::forge_runtime_extension::contracts_data::Contr
use cheatnet::state::CheatnetState;
use conversions::IntoConv;
use conversions::string::TryFromHexStr;
use foundry_ui::UI;
use runtime::starknet::constants::TEST_ADDRESS;
use runtime::starknet::context::build_context;
use scarb_api::metadata::MetadataCommandExt;
Expand Down Expand Up @@ -93,8 +94,9 @@ pub fn get_contracts() -> ContractsData {

let package = scarb_metadata.packages.first().unwrap();

let ui = UI::default();
let contracts =
get_contracts_artifacts_and_source_sierra_paths(&target_dir, package, false).unwrap();
get_contracts_artifacts_and_source_sierra_paths(&target_dir, package, false, &ui).unwrap();
ContractsData::try_from(contracts).unwrap()
}

Expand Down
1 change: 1 addition & 0 deletions crates/forge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ futures.workspace = true
url.workspace = true
indoc.workspace = true
derive_more.workspace = true
foundry-ui = { path = "../foundry-ui" }

[[bin]]
name = "snforge"
Expand Down
4 changes: 3 additions & 1 deletion crates/forge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use derive_more::Display;
use forge_runner::CACHE_DIR;
use forge_runner::debugging::TraceVerbosity;
use forge_runner::forge_config::ForgeTrackedResource;
use foundry_ui::UI;
use run_tests::workspace::run_for_workspace;
use scarb_api::{ScarbCommand, metadata::MetadataCommandExt};
use scarb_ui::args::{FeaturesSpec, PackagesFilter};
Expand Down Expand Up @@ -255,6 +256,7 @@ pub enum ExitStatus {
}

pub fn main_execution() -> Result<ExitStatus> {
let ui = UI::default();
let cli = Cli::parse();

match cli.subcommand {
Expand Down Expand Up @@ -297,7 +299,7 @@ pub fn main_execution() -> Result<ExitStatus> {
.enable_all()
.build()?;

rt.block_on(run_for_workspace(args))
rt.block_on(run_for_workspace(args, &ui))
}
ForgeSubcommand::CheckRequirements => {
check_requirements(true, ForgeTrackedResource::default())?;
Expand Down
3 changes: 3 additions & 0 deletions crates/forge/src/run_tests/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use forge_runner::{
test_case_summary::AnyTestCaseSummary,
test_target_summary::TestTargetSummary,
};
use foundry_ui::UI;
use scarb_api::get_contracts_artifacts_and_source_sierra_paths;
use scarb_metadata::{Metadata, PackageMetadata};
use std::sync::Arc;
Expand All @@ -49,6 +50,7 @@ impl RunForPackageArgs {
args: &TestArgs,
cache_dir: &Utf8PathBuf,
artifacts_dir: &Utf8Path,
ui: &UI,
) -> Result<RunForPackageArgs> {
let raw_test_targets = load_test_artifacts(artifacts_dir, &package)?;

Expand All @@ -59,6 +61,7 @@ impl RunForPackageArgs {
&scarb_metadata.app_version_info.version,
args.no_optimization,
),
ui,
)?;
let contracts_data = ContractsData::try_from(contracts)?;

Expand Down
4 changes: 3 additions & 1 deletion crates/forge/src/run_tests/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use forge_runner::{
coverage_api::can_coverage_be_generated,
test_case_summary::{AnyTestCaseSummary, TestCaseSummary},
};
use foundry_ui::UI;
use scarb_api::{
ScarbCommand,
metadata::{Metadata, MetadataCommandExt, PackageMetadata},
Expand All @@ -20,7 +21,7 @@ use scarb_ui::args::PackagesFilter;
use shared::consts::SNFORGE_TEST_FILTER;
use std::env;

pub async fn run_for_workspace(args: TestArgs) -> Result<ExitStatus> {
pub async fn run_for_workspace(args: TestArgs, ui: &UI) -> Result<ExitStatus> {
match args.color {
// SAFETY: This runs in a single-threaded environment.
ColorOption::Always => unsafe { env::set_var("CLICOLOR_FORCE", "1") },
Expand Down Expand Up @@ -81,6 +82,7 @@ pub async fn run_for_workspace(args: TestArgs) -> Result<ExitStatus> {
&args,
&cache_dir,
&artifacts_dir_path,
ui,
)?;

let tests_file_summaries =
Expand Down
1 change: 1 addition & 0 deletions crates/forge/test_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ forge = { path = "../../forge" }
scarb-api = { path = "../../scarb-api" }
forge_runner = { path = "../../forge-runner" }
cheatnet = { path = "../../cheatnet" }
foundry-ui = { path = "../../foundry-ui" }
12 changes: 8 additions & 4 deletions crates/forge/test_utils/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use forge_runner::{
test_case_summary::{AnyTestCaseSummary, TestCaseSummary},
test_target_summary::TestTargetSummary,
};
use foundry_ui::UI;
use indoc::formatdoc;
use scarb_api::{
ScarbCommand, StarknetContractArtifacts, get_contracts_artifacts_and_source_sierra_paths,
Expand Down Expand Up @@ -57,7 +58,7 @@ impl Contract {
})
}

fn generate_sierra_and_casm(self) -> Result<(String, String)> {
fn generate_sierra_and_casm(self, ui: &UI) -> Result<(String, String)> {
let dir = tempdir_with_tool_versions()?;

let contract_path = dir.child("src/lib.cairo");
Expand Down Expand Up @@ -101,7 +102,7 @@ impl Contract {
let artifacts_dir = target_dir_for_workspace(&scarb_metadata).join("dev");

let contract =
get_contracts_artifacts_and_source_sierra_paths(&artifacts_dir, package, false)
get_contracts_artifacts_and_source_sierra_paths(&artifacts_dir, package, false, ui)
.unwrap()
.remove(&self.name)
.ok_or(anyhow!("there is no contract with name {}", self.name))?
Expand Down Expand Up @@ -194,13 +195,16 @@ impl<'a> TestCase {
]
}

pub fn contracts(&self) -> Result<HashMap<String, (StarknetContractArtifacts, Utf8PathBuf)>> {
pub fn contracts(
&self,
ui: &UI,
) -> Result<HashMap<String, (StarknetContractArtifacts, Utf8PathBuf)>> {
self.contracts
.clone()
.into_iter()
.map(|contract| {
let name = contract.name.clone();
let (sierra, casm) = contract.generate_sierra_and_casm()?;
let (sierra, casm) = contract.generate_sierra_and_casm(ui)?;

Ok((
name,
Expand Down
4 changes: 3 additions & 1 deletion crates/forge/test_utils/src/running_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use forge_runner::forge_config::{
ExecutionDataToSave, ForgeConfig, ForgeTrackedResource, OutputConfig, TestRunnerConfig,
};
use forge_runner::test_target_summary::TestTargetSummary;
use foundry_ui::UI;
use scarb_api::{ScarbCommand, metadata::MetadataCommandExt};
use std::num::NonZeroU32;
use std::sync::Arc;
Expand Down Expand Up @@ -46,6 +47,7 @@ pub fn run_test_case(
let raw_test_targets =
load_test_artifacts(&test.path().unwrap().join("target/dev"), package).unwrap();

let ui = UI::default();
rt.block_on(run_for_package(
RunForPackageArgs {
test_targets: raw_test_targets,
Expand All @@ -68,7 +70,7 @@ pub fn run_test_case(
cache_dir: Utf8PathBuf::from_path_buf(tempdir().unwrap().keep())
.unwrap()
.join(CACHE_DIR),
contracts_data: ContractsData::try_from(test.contracts().unwrap()).unwrap(),
contracts_data: ContractsData::try_from(test.contracts(&ui).unwrap()).unwrap(),
tracked_resource,
environment_variables: test.env().clone(),
}),
Expand Down
9 changes: 7 additions & 2 deletions crates/forge/tests/integration/setup_fork.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use cheatnet::runtime_extensions::forge_config_extension::config::BlockId;
use foundry_ui::UI;
use indoc::{formatdoc, indoc};
use std::num::NonZeroU32;
use std::path::Path;
Expand Down Expand Up @@ -129,6 +130,7 @@ fn fork_aliased_decorator() {
let raw_test_targets =
load_test_artifacts(&test.path().unwrap().join("target/dev"), package).unwrap();

let ui = UI::default();
let result = rt
.block_on(run_for_package(
RunForPackageArgs {
Expand All @@ -152,7 +154,8 @@ fn fork_aliased_decorator() {
cache_dir: Utf8PathBuf::from_path_buf(tempdir().unwrap().keep())
.unwrap()
.join(CACHE_DIR),
contracts_data: ContractsData::try_from(test.contracts().unwrap()).unwrap(),
contracts_data: ContractsData::try_from(test.contracts(&ui).unwrap())
.unwrap(),
tracked_resource: ForgeTrackedResource::CairoSteps,
environment_variables: test.env().clone(),
}),
Expand Down Expand Up @@ -216,6 +219,7 @@ fn fork_aliased_decorator_overrding() {
let raw_test_targets =
load_test_artifacts(&test.path().unwrap().join("target/dev"), package).unwrap();

let ui = UI::default();
let result = rt
.block_on(run_for_package(
RunForPackageArgs {
Expand All @@ -239,7 +243,8 @@ fn fork_aliased_decorator_overrding() {
cache_dir: Utf8PathBuf::from_path_buf(tempdir().unwrap().keep())
.unwrap()
.join(CACHE_DIR),
contracts_data: ContractsData::try_from(test.contracts().unwrap()).unwrap(),
contracts_data: ContractsData::try_from(test.contracts(&ui).unwrap())
.unwrap(),
tracked_resource: ForgeTrackedResource::CairoSteps,
environment_variables: test.env().clone(),
}),
Expand Down
7 changes: 0 additions & 7 deletions crates/foundry-ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ impl UI {
Self { output_format }
}

// TODO: Will be removed in 3022-3-use-foundry-ui-in-sncast
/// Get the output format of this [`UI`] instance.
#[must_use]
pub fn output_format(&self) -> OutputFormat {
self.output_format
}

/// Create a [`String`] representation of the given message based on the configured output format.
fn format_message(&self, message: &impl Message) -> String {
match self.output_format {
Expand Down
1 change: 1 addition & 0 deletions crates/scarb-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ regex.workspace = true
rayon.workspace = true
itertools.workspace = true
universal-sierra-compiler-api = { path = "../universal-sierra-compiler-api" }
foundry-ui = { path = "../foundry-ui" }

[dev-dependencies]
assert_fs.workspace = true
Expand Down
Loading
Loading