Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: parse inline config with solang #7431

Merged
merged 7 commits into from
Mar 18, 2024
Merged

feat: parse inline config with solang #7431

merged 7 commits into from
Mar 18, 2024

Conversation

DaniPopes
Copy link
Member

Fixes #7310

@DaniPopes DaniPopes requested a review from mattsse as a code owner March 18, 2024 18:15
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great!

pending @klkvr

@DaniPopes
Copy link
Member Author

with a3b20da this has virtually no perf impact even on huge repos

Copy link
Member

@klkvr klkvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, lgtm overall

those are not working correctly with inheritance (and never really worked), right?

// id.identifier
let abs_path = id.source.as_path();
let path = abs_path.strip_prefix(root).unwrap_or(abs_path);
// `id.identifier` but with the stripped path.
let contract = format!("{}:{}", path.display(), id.name);
Copy link
Member

@klkvr klkvr Mar 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id.name can be in the form of "Counter.0.8.23", I am doing id.name.split('.').next().unwrap() usually, we should probably have a helper for this in compilers

@DaniPopes
Copy link
Member Author

those are not working correctly with inheritance (and never really worked), right?

Yes

@DaniPopes DaniPopes merged commit 6dfc6e7 into master Mar 18, 2024
20 checks passed
@DaniPopes DaniPopes deleted the dani/inline-cfg branch March 18, 2024 20:06
beskay added a commit to ethernautdao/evm-runners-cli that referenced this pull request Mar 19, 2024
@mds1
Copy link
Collaborator

mds1 commented Mar 19, 2024

those are not working correctly with inheritance (and never really worked), right?

Does inline config not work at all with inheritance, or it just doesn't properly override it? For either answer we should just document any limitations in the book https://book.getfoundry.sh/reference/config/inline-test-config#in-line-invariant-configs

sveitser added a commit to EspressoSystems/espresso-sequencer that referenced this pull request Apr 23, 2024
- Update flake.lock to get a foundry bugfix that enables fixes inline
  config:

  foundry-rs/foundry#7431

- Only set `RAYON_NUM_THREADS` in prover. Foundry also uses it to set
  how many tests run in parallel. In addition it sets parallelism for
  `diff-test` which is run by foundry tests.
sveitser added a commit to EspressoSystems/espresso-sequencer that referenced this pull request Apr 23, 2024
- Update flake.lock to get a foundry bugfix that enables fixes inline
  config:

  foundry-rs/foundry#7431

- Only set `RAYON_NUM_THREADS` in prover. Foundry also uses it to set
  how many tests run in parallel. In addition it sets parallelism for
  `diff-test` which is run by foundry tests.
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.

In-line test configuration not respected
4 participants