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

Update metadata docs for "libraries" and "compilationSettings" fields #15895

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

kuzdogan
Copy link
Member

No description provided.

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.

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.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// 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.
Copy link
Member

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:

Suggested change
// 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.

Copy link
Member

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.

Copy link
Member

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.

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