You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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.
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
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?
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!
Activity
bitwalker commentedon Mar 24, 2026
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.
feat(sema): warn on unused private constants in modules (closes 0xMid…
feat(assembly): warn about unused constants
feat(assembly): warn about unused constants
feat(assembly): warn about unused constants
feat(assembly): warn about unused constants
UfukNode commentedon Aug 14, 2026
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
UfukNode commentedon Aug 20, 2026
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
bars26 commentedon Aug 24, 2026
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?feat(assembly): warn about unused constants
bars26 commentedon Aug 25, 2026
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!