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

[Feature Request] Docgen support for attributes on use/friend/constant constructs. #8676

Open
brmataptos opened this issue Jun 15, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request move stale-exempt Prevents issues from being automatically marked and closed as stale starter-task team:move-lang

Comments

@brmataptos
Copy link
Contributor

brmataptos commented Jun 15, 2023

🚀 Feature Request

If such attributes are useful to Move programmers, then attributes on other language constructs should perhaps be supported in docgen: use statements, constant declarations, friend declarations.

Motivation

#7932 requested that attributes be included in docgen output for Module, Function, and Struct declarations. #8636 solves this issue.

But Move also supports attributes on other language constructs: at least package, use statements, constant declarations, friend declarations, and specs (see third_party/move/move-prover/move-docgen/tests/sources/attribute_placement.move for examples), but these were not handled yet because the data is not available in the current compiler.

Pitch

When the relevant declaration code is included in docgen (e.g., for use, constant, and friend declarations) then the associated annotation should be prepended (as it shows up in the source code).

Additional context

While this might be useful for completeness and orthogonality,

  • It is not so easy to do with the current compiler, since attributes are not available on some language constructs in the AST passed to Docgen.
  • It is not clear that attributes on those language constructs are useful to anyone.
@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

This issue is stale because it has been open 45 days with no activity. Remove the stale label or comment - otherwise this will be closed in 15 days.

@github-actions github-actions bot added the Stale label Aug 1, 2023
@lbmeiyi lbmeiyi added stale-exempt Prevents issues from being automatically marked and closed as stale and removed Stale labels Aug 7, 2023
@sausagee sausagee moved this from 🆕 New to 📋 Backlog in Move Language and Runtime Aug 23, 2023
@lbmeiyi lbmeiyi moved this from 📋 Backlog to For Grabs in Move Language and Runtime Aug 31, 2023
@lbmeiyi lbmeiyi moved this from For Grabs to 📋 Backlog in Move Language and Runtime Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request move stale-exempt Prevents issues from being automatically marked and closed as stale starter-task team:move-lang
Projects
Status: 📋 Backlog
Development

No branches or pull requests

4 participants