matter-labs / foundry-zksync

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

Warn about incompatible zksolc/solc versions #428

Open elfedy opened 5 months ago

elfedy commented 5 months ago

Component

Forge

Describe the feature you would like

There are numerous issues being reported that happen when zksolc runs with a version of solc it doesn't support. For example: zksolc 1.4.1 being run along solc 0.8.26, will trigger a broken pipe error on Linux. For each compiler version, we should keep the latest solc version it supports and error if that version is not supported. This way we give users a friendlier error and know how to handle it (Either update zksolc or use an older version of solc)

elfedy commented 4 months ago

Update: It seems there's something going on inside foundry as compiling with incompatible versions yields a friendly error from zksolc such as: solc versions >0.8.25 are not supported, found 0.8.26

dutterbutter commented 2 months ago

@elfedy is this still relevant / issue?

elfedy commented 2 months ago

@dutterbutter yes, we haven't addressed this properly yet

mbuv1 commented 2 weeks ago

Hi, is there a work around! Error: Broken pipe (os error 32), Am getting this Error when I run: ~/foundry-f23/foundry-simple-storage-f23$ forge build --zksync

the rest of the output is as below: :~/foundry-f23/foundry-simple-storage-f23$ forge build --zksync [⠃] Using zksolc-1.5.4 [⠊] Compiling (zksync) [⠢] Compiling 29 files with zksolc and ZKsync solc 0.8.28 Error: Broken pipe (os error 32)

Am using WSL on Windows.

elfedy commented 2 weeks ago

@mbuv1 try either specifying an older solc or using zksolc 1.5.7 which should support the solc version you are trying to use