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

eof: Test that EOF sets the experimental flag in metadata #15663

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rodiazet
Copy link
Contributor

Add test which checks that setting an EOF version results in the experimental flag being set.

Copy link

Thank you for your contribution to the Solidity compiler! A team member will follow up shortly.

If you haven't read our contributing guidelines and our review checklist before, please do it now, this makes the reviewing process and accepting your contribution smoother.

If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the #solidity-dev channel on Matrix.

Copy link
Member

@cameel cameel left a comment

Choose a reason for hiding this comment

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

We should make the test use settings from command-line like other metadata tests already do. Other than that the test seems ok.

Comment on lines +246 to +249
compilerStack.setEVMVersion(langutil::EVMVersion::prague());
compilerStack.setViaIR(true);
compilerStack.setEOFVersion(1);
compilerStack.setOptimiserSettings(true);
Copy link
Member

Choose a reason for hiding this comment

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

To get more coverage, we should use values from the command-line rather than hard-coded ones:

Suggested change
compilerStack.setEVMVersion(langutil::EVMVersion::prague());
compilerStack.setViaIR(true);
compilerStack.setEOFVersion(1);
compilerStack.setOptimiserSettings(true);
compilerStack.setEVMVersion(CommonOptions::get().evmVersion());
compilerStack.setViaIR(true);
compilerStack.setEOFVersion(CommonOptions::get().eofVersion());
compilerStack.setOptimiserSettings(CommonOptions::get().optimize);

Then for non-EOF just expect experimental to be not set.

Note that this is the way most other tests here already work here.

@cameel cameel changed the title eof: Add test of eof compiler flag eof: Test that EOF sets the experimental flag in metadata Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants