Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@0xrusowsky
Copy link
Contributor

@0xrusowsky 0xrusowsky commented Oct 13, 2025

Motivation

despite solar only supporting solidity v0.8.*, foundry needs to be backwards compatible with older versions. For instance, a user who linted a solar-incompatible project was confused to get a bunch of errors foundry-rs/foundry#11668 (comment)

because of that, solar consumers would benefit from:

  • treating empty sources as a valid no-op: so that they can filter incompatible sources and call the compiler without worrying about error with no compatible sources left. This would save us from conditionally lowering if we don't have any sources, which is kinda annoying:
    if !compiler.sess().source_map().is_empty() {
        let _ = compiler.lower_asts();
    }

notes:

  • as we further integrate solar into more pieces of the stack, this will impact us even more users
  • if you think that we should keep the "no files found" error was for CLI consumers, i'd propose to at least support a config param to prevent the error

@0xrusowsky 0xrusowsky changed the title chore: expose MIN_SOLIDITY_VERSION + allow empty sources chore(lowering): allow empty sources Oct 13, 2025
@0xrusowsky 0xrusowsky requested a review from DaniPopes October 13, 2025 09:29
@0xrusowsky 0xrusowsky requested a review from DaniPopes October 13, 2025 13:16
@DaniPopes
Copy link
Member

can't easily add a CLI test for this, will have to think about a way to add CLI tests with no preselected flags, maybe like in solc with a JSON specifying input

@DaniPopes DaniPopes enabled auto-merge (squash) October 13, 2025 13:20
@DaniPopes DaniPopes merged commit a264ef3 into paradigmxyz:main Oct 13, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants