Skip to content

feat: support ssolc version selection #186

Description

@drappi-ai

Summary

When seismic = true, ssolc is resolved from PATH and any solc version specified in foundry.toml is ignored with a warning. We should support version selection so users can pin specific ssolc versions (e.g. via a version manager or multiple installed binaries).

Current behavior

If a user sets solc = "0.8.31" in foundry.toml, they get:

Warning: ssolc does not support version selection (requested 0.8.31), using `ssolc`

Code locations to change

crates/config/src/lib.rsensure_solc()

SolcReq::Version(_) => {
    // TODO: support using different ssolc versions
    // For now, ignore the version request — use ssolc from PATH
    let ssolc_path = self.get_default_ssolc_path()?;

This is where version-aware resolution would go — e.g. looking up ssolc-0.8.31 in PATH or a managed install directory.

crates/config/src/lib.rsget_default_ssolc_path()

pub fn get_default_ssolc_path(&self) -> Result<PathBuf, SolcError> {
    let path = PathBuf::from("ssolc");

Would need a version parameter to resolve e.g. ssolc-0.8.31 or a versioned install path.

crates/test-utils/src/util.rs — test template config

// TODO: set to SolcReq::Version when ssolc supports version selection
solc: None,

Re-enable version pinning in the test template once supported.

Search

All relevant TODOs can be found by searching for:

grep -r "TODO.*ssolc.*version" crates/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions