matter-labs / foundry-zksync

Fork of Foundry tailored for zkSync environment
Apache License 2.0
299 stars 130 forks source link

Print compiler and versions correctly when compiling #640

Open Jrigada opened 2 weeks ago

Jrigada commented 2 weeks ago

Component

Other (please describe)

Describe the feature you would like

[⠃] Using zksolc-1.5.1
[⠊] Compiling (zksync)
[⠢] Compiling 21 files with ZkSolc 0.8.18
[⠆] ZkSolc 0.8.18 finished in 149.01ms
Error: 
Compiler run failed:
Error
Invalid EVM version requested.

This is the output currently on the compiler, we should find the right wording to specify it’s using zksolc X paired with solc Y. So for example in the output above it should say: “Compiling 21 files with zksolc 1.5.1 and solc 0.8.18”, we should be aware when doing this that foundry intends to call the compiler and input generic methods for compiler name and version on this output, so if we modify how it does it, we should think about how integrating upstream would look like.

Bonus points: finding a good way to get the info if the solc compiler is zksync’s one or not and output that in a way.

Idea: Zksolc naming includes the zksolc version because it does not change, so when building the data structure that outputs this info, it should be something like “zksolc with <zkvm solc/ solc>”, then the solc version will be the version variable an the text would always make sense

Additional context

No response