-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Introduce experimental flag/option #16229
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
Changes from all commits
f481d1c
adc2c30
168b4a3
65a1e53
d9fc8be
23002f0
cad1676
c61a2ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
cameel marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -110,7 +110,16 @@ bool SyntaxChecker::visit(PragmaDirective const& _pragma) | |
| auto feature = ExperimentalFeatureNames.at(literal); | ||
| m_sourceUnit->annotation().experimentalFeatures.insert(feature); | ||
| if (!ExperimentalFeatureWithoutWarning.count(feature)) | ||
| m_errorReporter.warning(2264_error, _pragma.location(), "Experimental features are turned on. Do not use experimental features on live deployments."); | ||
| { | ||
| if (!m_experimental) | ||
| m_errorReporter.syntaxError( | ||
| 2816_error, | ||
| _pragma.location(), | ||
| "Experimental pragmas can only be used if experimental mode is enabled. To enable experimental mode, use the --experimental flag." | ||
| ); | ||
| else | ||
| m_errorReporter.warning(2264_error, _pragma.location(), "Experimental features are turned on. Do not use experimental features on live deployments."); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this warning still make sense now that you have to enable such features explicitly with
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd lean towards yes - the warning is there to warn of using experimental code in a production environment. Of course, your point that most other features (activated via CLI/StdJSON input options) do not issue such a warning still stands. |
||
| } | ||
|
|
||
| if (feature == ExperimentalFeature::ABIEncoderV2) | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.