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

load builtins do not shows a warning when a rule fails to load #1000

Open
mmatera opened this issue Feb 8, 2024 · 0 comments
Open

load builtins do not shows a warning when a rule fails to load #1000

mmatera opened this issue Feb 8, 2024 · 0 comments

Comments

@mmatera
Copy link
Contributor

mmatera commented Feb 8, 2024

#996 puts the manifest the need to check if the rules included in the rule attribute of Builtin symbols are loaded or not. This happens for example when a rule in one Builtin symbol tries to define another symbol. In that case, the symbol Quit includes a rule to define the alias Exit with the rule Exit[n___]->Quit[n]. The problem is that this rule does not define a DownValue / Upvalue/ Subvalue; in the end, it is never added as a definition in the Definitions object.

I do not have a clear idea of the best way to handle this kind of case: One thing would be to create the Definition for the symbol (if it was not already loaded) and then add the rule. This has certain complexities and drawbacks: for example, if there is a Builtin, should the rule have higher priority than the rules in the Builtin?

The other way (much simpler) would be to just to add a warning when the rule cannot be associated to a *Value of the Builtin we are processing.

rocky added a commit that referenced this issue Oct 3, 2024
This is related to #1000. There are some rules included in the `Builtin.rules` property that cannot be loaded. With this PR, if this happens, a warning is printed. In any case, the idea is to fix these cases before merging this PR.

---------

Co-authored-by: R. Bernstein <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant