-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.2.0 (33f3fee 2023-05-26T00:03:48.457406188Z)
What command(s) is the bug in?
forge build
Operating System
Linux
Describe the bug
NOTE: I also opened a feature request related to this: #5049
I'm currently debugging an issue where auto_detect_solc behaves somewhat non-deterministically and chooses different solc versions between CI and local runs. Locally, it uses 0.8.17 and in CI it uses 0.8.20 for some files.
The underlying issue seems to be that if it finds a file that has a version range that is supported by any installed solc version it will use that pre-installed solc version instead of downloading the highest available version. So depending on the environment it is run in, if there's already solc 0.8.17 available (which is the case locally), it will use that. But if that's not available (e.g. in CI where it installs those on every run), it will download the highest match (0.8.20) and then use that.
EDIT: This also seems to be affected by caches.
Given the non-deterministic / environment-dependent behavior of this I'd categorize that as a bug.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status