Skip to content

Added NatSpec support for enum value definitions in the AST #14193

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

Closed

Conversation

veniger
Copy link
Contributor

@veniger veniger commented May 8, 2023

Adds NatSpec field to AST node for enum value definitions
Partially fixes: #12295

@github-actions
Copy link

github-actions bot commented May 8, 2023

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.

@veniger veniger force-pushed the natspec-enum-value-definition branch from f905b7f to d79badb Compare May 8, 2023 13:23
@veniger veniger marked this pull request as ready for review May 8, 2023 15:31
@veniger veniger force-pushed the natspec-enum-value-definition branch 2 times, most recently from df5e28e to 8cec8d6 Compare May 22, 2023 10:10
@r0qs
Copy link
Member

r0qs commented May 22, 2023

@veniger just a note about the failing external tests (i.e. all the ones with *_test_ext_*). Please ignore them for now, since I just noticed that due to the changes in #14242 the tests are failing for external contributions due to lack of access to the github token.

The errors in the soltests still need to be fixed in this PR though: https://app.circleci.com/pipelines/github/ethereum/solidity/29881/workflows/47cd436e-67ed-46b8-abe4-102c5f331b1d/jobs/1327332

@veniger veniger force-pushed the natspec-enum-value-definition branch from 8cec8d6 to e70062d Compare May 22, 2023 10:45
Copy link
Collaborator

@nikola-matic nikola-matic left a comment

Choose a reason for hiding this comment

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

Changelog and a rebase (to fix the build), and should be good.

@veniger veniger force-pushed the natspec-enum-value-definition branch from e70062d to f9d669f Compare June 21, 2023 12:03
@veniger veniger force-pushed the natspec-enum-value-definition branch from add1ef5 to 13fd123 Compare June 29, 2023 14:57
@veniger veniger force-pushed the natspec-enum-value-definition branch from 13fd123 to 6595ba1 Compare June 30, 2023 09:37
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.

Same as in #14166, looks ok at a glance and is very similar to one of your PRs we have already merged so we don't have to be too strict about reviewing this. If @nikola-matic approves, you have my approval too.

The only thing we might potentially add here is is to make sure that the @custom tag works and maybe update the table at https://docs.soliditylang.org/en/latest/natspec-format.html#tags.

Copy link
Collaborator

@nikola-matic nikola-matic left a comment

Choose a reason for hiding this comment

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

Hey @veniger, as @cameel mentioned, please add usage of the @custom tag to one of the tests, and it should be good to go.

Same as in #14166, looks ok at a glance and is very similar to one of your PRs we have already merged so we don't have to be too strict about reviewing this. If @nikola-matic approves, you have my approval too.

The only thing we might potentially add here is is to make sure that the @custom tag works and maybe update the table at https://docs.soliditylang.org/en/latest/natspec-format.html#tags.

Another external contributor opened a PR for this already - #14267

@ekpyron
Copy link
Member

ekpyron commented Jan 8, 2024

@nikola-matic @veniger What's the state of this?

@nikola-matic
Copy link
Collaborator

@nikola-matic @veniger What's the state of this?

I can take a another more detailed look, but should be good enough to merge after a rebase.

@zerosnacks
Copy link

zerosnacks commented Feb 20, 2025

Hi all, would be great to get this reviewed and merged, cc @cameel / @nikola-matic

If a rebase is required, @veniger would you be able to do so?

Users are proposing to implement workarounds as seen here: foundry-rs/foundry#9905 but I think it is much better to resolve the issue here.

@nikola-matic
Copy link
Collaborator

Hi all, would be great to get this reviewed and merged, cc @cameel / @nikola-matic

If a rebase is require, @veniger would you be able to do so?

Users are proposing to implement workarounds as seen here: foundry-rs/foundry#9905 but I think it is much better to resolve the issue here.

Sure, we have a release coming up soon, so I'll check with the team on Monday whether we have enough time to get this in for the upcoming release; if not, we'll get it in for the next one.

@zerosnacks
Copy link

zerosnacks commented Mar 3, 2025

Hi @nikola-matic, any updates on this? Would be great to get this in - thanks!

@nikola-matic nikola-matic added this to the 0.8.30 milestone Mar 3, 2025
@nikola-matic
Copy link
Collaborator

nikola-matic commented Mar 3, 2025

Hi @nikola-matic, any updates on this? Would be great to get this in - thanks!

I discussed it with the team and we've decided for this to go in, however, not in this release. We're currently almost exclusively focused on merging all of the storage layout (account abstraction for EOAs) PRs and will have no time for this one, especially since we're planning on releasing this week. I marked this issue (and PR) for the next release.

edit: you won't have to wait long for the (next) 8.30 release since we have some other stuff we're working for tooling as well, it's just that our priorities at the moment are on compatibility for the next hard fork.

@zerosnacks
Copy link

Hi @nikola-matic, any updates on this? Would be great to get this in - thanks!

I discussed it with the team and we've decided for this to go in, however, not in this release. We're currently almost exclusively focused on merging all of the storage layout (account abstraction for EOAs) PRs and will have no time for this one, especially since we're planning on releasing this week. I marked this issue (and PR) for the next release.

edit: you won't have to wait long for the (next) 8.30 release since we have some other stuff we're working for tooling as well, it's just that our priorities at the moment are on compatibility for the next hard fork.

Understood, not a problem - looking forward to the next releases 👍

@nikola-matic
Copy link
Collaborator

Hi @nikola-matic, any updates on this? Would be great to get this in - thanks!

I discussed it with the team and we've decided for this to go in, however, not in this release. We're currently almost exclusively focused on merging all of the storage layout (account abstraction for EOAs) PRs and will have no time for this one, especially since we're planning on releasing this week. I marked this issue (and PR) for the next release.
edit: you won't have to wait long for the (next) 8.30 release since we have some other stuff we're working for tooling as well, it's just that our priorities at the moment are on compatibility for the next hard fork.

Understood, not a problem - looking forward to the next releases 👍

I closed this PR as it was old, and opened a new one, which was just merged. The enum support for Natspec will be available in the upcoming release.

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.

[AST] Consider expanding the use of NatSpec documentation to all declarations.
6 participants