Skip to content

Commit

Permalink
Revert "Test compilation diagnostics reporter (#1577)"
Browse files Browse the repository at this point in the history
This reverts commit 64c9eb6.
  • Loading branch information
maciektr committed Sep 25, 2024
1 parent e256b69 commit ae57503
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
10 changes: 4 additions & 6 deletions scarb/src/compiler/compilers/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,14 @@ impl Compiler for TestCompiler {

let test_crate_ids = collect_main_crate_ids(&unit, db);
// Search for all contracts in deps specified with `build-external-contracts`.
let all_crate_ids =
let main_crate_ids =
get_contract_crate_ids(&build_external_contracts, test_crate_ids.clone(), db);

let starknet = unit.cairo_plugins.iter().any(|plugin| {
plugin.package.id.name == PackageName::STARKNET
&& plugin.package.id.source_id == SourceId::for_std()
});

let diagnostics_reporter =
build_compiler_config(db, &unit, &test_crate_ids, ws).diagnostics_reporter;

let test_compilation = {
let _ = trace_span!("compile_test").enter();
let config = TestsCompilationConfig {
Expand All @@ -59,12 +56,13 @@ impl Compiler for TestCompiler {
.compiler_config
.unstable_add_statements_code_locations_debug_info,
};
let allow_warnings = unit.compiler_config.allow_warnings;
compile_test_prepared_db(
db,
config,
all_crate_ids.clone(),
main_crate_ids,
test_crate_ids.clone(),
diagnostics_reporter,
allow_warnings,
)?
};

Expand Down
6 changes: 0 additions & 6 deletions scarb/tests/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,12 +958,6 @@ fn does_not_show_warnings_from_deps() {
.current_dir(&second)
.assert()
.success();
Scarb::quick_snapbox()
.arg("build")
.arg("--test")
.current_dir(&second)
.assert()
.success();
}

#[test]
Expand Down

0 comments on commit ae57503

Please sign in to comment.