File tree Expand file tree Collapse file tree 3 files changed +27
-13
lines changed Expand file tree Collapse file tree 3 files changed +27
-13
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ foundry-linking = { path = "crates/linking" }
169169
170170# solc & compilation utilities
171171foundry-block-explorers = { version = " 0.9.0" , default-features = false }
172- foundry-compilers = { version = " 0.12.7 " , default-features = false }
172+ foundry-compilers = { version = " 0.12.8 " , default-features = false }
173173foundry-fork-db = " 0.9.0"
174174solang-parser = " =0.3.3"
175175solar-ast = { version = " =0.1.0" , default-features = false }
Original file line number Diff line number Diff line change @@ -949,6 +949,7 @@ impl Config {
949949 }
950950
951951 /// Resolves globs and builds a mapping from individual source files to their restrictions
952+ #[ expect( clippy:: disallowed_macros) ]
952953 fn restrictions (
953954 & self ,
954955 paths : & ProjectPathsConfig ,
@@ -977,7 +978,20 @@ impl Config {
977978 if !map. contains_key ( source) {
978979 map. insert ( source. clone ( ) , res) ;
979980 } else {
980- map. get_mut ( source. as_path ( ) ) . unwrap ( ) . merge ( res) ;
981+ let value = map. remove ( source. as_path ( ) ) . unwrap ( ) ;
982+ if let Some ( merged) = value. clone ( ) . merge ( res) {
983+ map. insert ( source. clone ( ) , merged) ;
984+ } else {
985+ // `sh_warn!` is a circular dependency, preventing us from using it here.
986+ eprintln ! (
987+ "{}" ,
988+ yansi:: Paint :: yellow( & format!(
989+ "Failed to merge compilation restrictions for {}" ,
990+ source. display( )
991+ ) )
992+ ) ;
993+ map. insert ( source. clone ( ) , value) ;
994+ }
981995 }
982996 }
983997 }
You can’t perform that action at this time.
0 commit comments