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

Rule origin tracking #117

Open
AZWN opened this issue Mar 6, 2024 · 1 comment
Open

Rule origin tracking #117

AZWN opened this issue Mar 6, 2024 · 1 comment

Comments

@AZWN
Copy link
Contributor

AZWN commented Mar 6, 2024

Short description
To aid debugging, it would be valuable to see the original (file) location of a rule/constraint in the debugger.

Problem description.
When having a Rule object at runtime, it is not easy to track from which file it originated. The prefix of the rule name is the file of the predicate declaration, and no other origin information is present.

Describe the solution you'd like
An optional property on Rule and IConstraint that indicate their origin in the spec source.

Describe alternatives you've considered
An editor service that lists all rules for a predicate.

Additional context

@Virtlink
Copy link
Contributor

Virtlink commented Mar 6, 2024

This would be useful, for example, to exclude all exprOk rule definition in the BinaryOperators as part of reference synthesis, as those are never valid references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants