Implement basic reporting facility (#18)

* wip

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>

* save to file after all tasks done

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>

* error out early if the workdir does not exist

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>

* the compiler statistics

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>

* allow compiler statistics per implementation

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>

* save compiler problems

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>

* add flag whether to extract compiler errors

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>

* whitespace

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>

---------

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
xermicus
2025-05-23 19:15:04 +02:00
committed by GitHub
parent 399f7820cd
commit 10bfaed461
18 changed files with 528 additions and 60 deletions
+8 -1
View File
@@ -41,12 +41,18 @@ impl SolidityCompiler for Resolc {
let stderr = output.stderr;
if !output.status.success() {
let message = String::from_utf8_lossy(&stderr);
log::error!(
"resolc failed exit={} stderr={} JSON-in={} ",
output.status,
String::from_utf8_lossy(&stderr),
&message,
json_in,
);
return Ok(CompilerOutput {
input,
output: Default::default(),
error: Some(message.into()),
});
}
let parsed: SolcStandardJsonOutput = serde_json::from_slice(&stdout).map_err(|e| {
@@ -59,6 +65,7 @@ impl SolidityCompiler for Resolc {
Ok(CompilerOutput {
input,
output: parsed,
error: None,
})
}