Skip to content

Forge build specific file fails in 1.3.1-stable #11352

@Amxx

Description

@Amxx

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

1.3.1-stable

What version of Foundryup are you on?

No response

What command(s) is the bug in?

forge build

Operating System

Linux

Describe the bug

Our CI recently started failling. It depends on foundry

    - name: Install Foundry
      uses: foundry-rs/foundry-toolchain@v1
      with:
        version: stable

I was able to replicate the issue locally.


foundryup -v stable installs 1.3.1-stable (08d3a4a).
When doing forge build on a specific file with a specific compiler version, I get an error

$ forge build contracts/interfaces/draft-IERC6093.sol --use 0.8.4 --out out/solc-0.8.4
[⠊] Compiling...
No files changed, compilation skipped
Error: Encountered invalid solc version in contracts/access/AccessControl.sol: No solc version exists that matches the version requirement: ^0.8.20
Encountered invalid solc version in contracts/access/Ownable.sol: No solc version exists that matches the version requirement: ^0.8.20
Encountered invalid solc version in contracts/access/Ownable2Step.sol: No solc version exists that matches the version requirement: ^0.8.20
[...]

If I run the same command with 1.3.1-nightly, the build command works just fine

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-bugType: bugT-needs-triageType: this issue needs to be labelled

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions