Skip to content

Warn about unused constants #2898

Closed

Description

@PhilippGackstatter

The assembler currently warns about unused imports and unused docstrings, but not about unused constants.

We use warnings_as_errors in the protocol to make sure we have no unused imports and the same would be nice to have for constants (e.g. no longer used error constants).

Of course, this is not of very high priority.

Activity

  1. bitwalker commented on Mar 24, 2026

    @bitwalker
    Collaborator

    This is pretty straightforward to add for non-exported constants, probably something we can do in the next cycle, especially with work ramping up on LSP and IDE integration.

  2. added a commit that references this issue on Mar 26, 2026
    6413ce3
  3. deleted a comment from amathxbt on Mar 28, 2026
  4. added a commit that references this issue on Apr 11, 2026
    f4b7ef5
  5. added a commit that references this issue on May 4, 2026
    0c8471a
  6. linked a pull request that will close this issuefeat(assembly): warn about unused constants #2993on May 5, 2026
  7. added 2 commits that reference this issue on May 9, 2026
    4c68790
    486b7c0
  8. added this to the v0.30.0 milestone on Aug 1, 2026
  9. UfukNode commented on Aug 14, 2026

    @UfukNode
    Contributor

    I can take this one if it is still available. I’ll keep it scoped to non-exported constants and add tests around the existing unused warning path

  10. UfukNode commented on Aug 20, 2026

    @UfukNode
    Contributor

    I opened the patch as a draft in #3697 so it stays out of review until the assignment is sorted out. If this is still available, could you assign #2898 to me and I can mark the PR ready once that is in place

  11. bars26 commented on Aug 24, 2026

    @bars26
    Contributor

    I'd like to work on this — I have a fix ready (extends the existing unused-import diagnostic to const.NAME = .. declarations that are never referenced and not exported, following the same pattern used for imports). Could someone assign this to me before I open the PR, per the contributing guidelines?

  12. added a commit that references this issue on Aug 24, 2026
    ea153d0
  13. bars26 commented on Aug 25, 2026

    @bars26
    Contributor

    Ah, I see @UfukNode already has a draft PR up for this (#3697) and asked first — didn't see that when I started. I'll step back and look at a different issue instead. Good luck with the PR!

  14. self-assigned this
    on Sep 2, 2026
  15. modified the milestones: v0.31.0, v0.32.0, v0.33.0 on Sep 4, 2026
  16. modified the milestones: v0.33.0, v0.34.0 on Sep 24, 2026
  17. modified the milestones: v0.34.0, v0.36.0 on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Fields

Priority

None yet

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions