-
Notifications
You must be signed in to change notification settings - Fork 6k
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: Enable compilation to EOF for all EVMVersionRestrictedTestCase
tests by default
#15666
Conversation
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. |
4c506e9
to
ccfa0f9
Compare
b62dc92
to
0caa233
Compare
test/TestCase.cpp
Outdated
auto const compileViaYul = m_reader.stringSetting("compileViaYul", "unset"); | ||
std::string bytecodeFormatString | ||
= m_reader.stringSetting("bytecodeFormat", compileViaYul == "false" ? "legacy" : "legacy,>=EOFv1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicating compileViaYul
here may be a bad idea. This makes the setting available even in tests where it does not make sense. And, even worse, in some where it would make sense but they don't check it so it has no effect. And in those that define it later a conflicting definition here might have some weird side-effects. On top of that it will be just confusing - here EOF depends on compileViaYul
, but in SyntaxTest
we already have a default for compileViaYul
that depends on EOF.
You need this change only because of semantic tests, right? It's only there that it defaults to also
. If that's the case then a better solution would be to have the default in SemanticTest
be dependent on EOF, just like we already did in SyntaxTest
. Make it also
in non-EOF runs and true
in EOF runs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix. I also not run a test if compileViaYul flag is set to false and command option enables EOF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But doing this I found one problem with test configuration check. We don't verify that a test settings are correct. In case where compileViaYul: fasle
and 'bytecodeFormat: >=EOFv1' the test never runs and we don't get any error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't verify that a test settings are correct.
True. We should have checks against this. Or use TestCaseReader::enumSetting()
instead of stringSetting()
.
Can you refactor then into enum settings (in a separate PR)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, but both semantic and syntax test have compileViaYulAllowedValues
and check the value against it. Doesn't it catch the error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also not run a test if compileViaYul flag is set to false and command option enables EOF
Sounds fine, but please put this in a separate commit. It's a separate fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean something different by verifying a test settings. We do verify the values separately but we should also check that i.e. compileViaYul: false
then bytecodeFormat
cannot be >=EOFv1
. Every test like this never runs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, we don't verify that they conflict. True, we should add a check against that.
Do you want to do it here, of should I merge already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see #15819. I guess you can do it there.
e4dff1c
to
047043c
Compare
All dependencies merged. Please rebase for a final check and we're done! |
047043c
to
0555618
Compare
Depends on:
#15818Merged#15657Merged#15658Merged#15659Merged#15660Merged#15661Merged#15662Merged#15663Merged#15665Merged