error message of `register_label_attr`
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Check that your issue is not already filed.
- Reduce the issue to a minimal, self-contained, reproducible test case. Avoid dependencies to mathlib4 or std4.
Description
register_label_attr has the following behavior.
import Lean.LabelAttribute
register_label_attr rom
/-- error: unknown attribute [rom] -/
#guard_msgs in @[rom]
def womp : 2 + 2 = 4 := by rfl
Expected behavior: The possible solution is displayed in the error message. An error message appears saying, “Since it is not possible to register and use labels in the same file, please consider separating the files." (this message is a example)
Actual behavior: It simply displays “unknown attribute” and does not show possible solutions.
Versions
- Lean v4.7.0
Additional Information
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the minimal example with import Lean.LabelAttribute and register_label_attr rom to reproduce the diagnostic. Trace the implementation of register_label_attr and the unknown-attribute error, then make the failure explain that labels cannot be registered and used in the same file. Done means the example reports a useful suggested solution instead of only “unknown attribute”.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100