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

support docs on 'define_named_enum' #5993

Merged

Conversation

fdefelici
Copy link

@fdefelici fdefelici commented Apr 4, 2025

Description

This patch allows define_name_enum!(..) macro to accept docs comment.
This is needed in case one wants to use this macro in some packages (like stacks-signer) is defined #![forbid(missing_docs)] attribute, otherwise a compilation error is emitted (see issue #5992 for related analisys)

Applicable issues

Additional info (benefits, drawbacks, caveats)

The patch is backwards compatible where define_name_enum is used without docs comment.
Basically the docs comment are managed as optional within the macro generation.

Checklist

  • Test coverage for new or modified code paths
  • Changelog is updated
  • Required documentation changes (e.g., docs/rpc/openapi.yaml and rpc-endpoints.md for v2 endpoints, event-dispatcher.md for new events)
  • New clarity functions have corresponding PR in clarity-benchmarking repo
  • New integration test(s) added to bitcoin-tests.yml

Sorry, something went wrong.

@fdefelici fdefelici requested a review from a team as a code owner April 4, 2025 08:12
@fdefelici fdefelici self-assigned this Apr 4, 2025
@fdefelici fdefelici changed the title allow docs on 'define_named_enum' support docs on 'define_named_enum' Apr 4, 2025
@fdefelici fdefelici force-pushed the fix/improve-named-enum-macro branch from 3f62c6d to ce9cd5d Compare April 4, 2025 08:54
@kantai kantai requested review from kantai and obycode April 4, 2025 15:07
Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

LGTM. I've never used this meta functionality before so something new I learned today!

Copy link

codecov bot commented Apr 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.25%. Comparing base (4273af8) to head (ce9cd5d).
Report is 33 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5993      +/-   ##
===========================================
+ Coverage    84.20%   84.25%   +0.04%     
===========================================
  Files          527      527              
  Lines       384140   384171      +31     
  Branches       323      323              
===========================================
+ Hits        323461   323667     +206     
+ Misses       60671    60496     -175     
  Partials         8        8              
Files with missing lines Coverage Δ
stacks-common/src/util/macros.rs 87.22% <100.00%> (+1.50%) ⬆️

... and 44 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a58ac52...ce9cd5d. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@obycode obycode added this pull request to the merge queue Apr 7, 2025
Merged via the queue into stacks-network:develop with commit c98dbcf Apr 7, 2025
198 of 200 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants