multiple resolc fixes and improvements (#151)

- Error out early on compiler invocations with invalid base path or include path flags.
- Do not error out if no files and no errors were produced. This aligns resolc closer to sloc.
- Add a CLI test with an involved fixture containing multiple contract remappings to properly testing the standard JSON path.
- Fixes input normalization in the Wasm version.



Co-authored-by: Cyrill Leutwiler <cyrill@parity.io>
This commit is contained in:
Siphamandla Mjoli
2025-01-17 11:10:47 +02:00
committed by GitHub
parent b78b2b2af9
commit 06f43083c3
7 changed files with 207 additions and 23 deletions
@@ -35,6 +35,7 @@ impl Compiler for SoljsonCompiler {
_allow_paths: Option<String>,
) -> anyhow::Result<StandardJsonOutput> {
let version = self.version()?;
input.normalize(&version.default);
let suppressed_warnings = input.suppressed_warnings.take().unwrap_or_default();
let input_json = serde_json::to_string(&input).expect("Always valid");