-
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
Update metadata docs for "libraries" and "compilationSettings" fields #15895
base: develop
Are you sure you want to change the base?
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. |
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.
Thanks! Looks good, but there's actually even more we could add. See my suggestions below.
// Required: Compiler settings. | ||
// Reflects the settings in the JSON input during compilation, except the | ||
// "compilationTarget" and the "libraries" fields. Check each field for details. | ||
// See the standard JSON input's "settings" docs for the rest. |
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.
// See the standard JSON input's "settings" docs for the rest. | |
// See the standard JSON input's "settings" field docs for the rest. |
"settings": { | ||
// Required for Solidity: File path and the name of the contract or library this | ||
// metadata is created for. | ||
// metadata is created for. Not a valid field in the standard JSON input settings. |
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 can add even more info here:
// metadata is created for. Not a valid field in the standard JSON input settings. | |
// metadata is created for. This field is not present in the standard JSON input settings. | |
// The closest equivalent is settings.outputSelection, used to select compilation targets. |
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.
Comparing this with the Standard JSON input docs, I see we're missing a few settings fields here:
optimizer.simpleCounterForLoopUncheckedIncrement
viaIR
debug.revertStrings
Maybe you could add them?
Also eofVersion
, but this is actually undocumented for input. IMO we should add it to the input and just mark it as experimental.
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 was surprised to see the comment saying that runs
and enabled
are deprecated. It seems to be coming from here: #5959 (comment)
Just FYI, I doubt we'll actually do that. We should probably remove the comment. I'll add that to call agenda to discuss.
No description provided.