M2
M2 copied to clipboard
unhelpful warning message
I have a package that I am writing, and I get the following behavior when loading it. This package loads a number of other packages too.
i1 : needsPackage "StringTorics"
warning: 'intersectionNumbers' redefined
: here is the first use of 'intersectionNumbers'
: debug with expression debug 2671 or with command line option --debug 2671
This appears to be a bug? I try debug 2671 and get nothing useful either.
I'll look into this to try to boil the problem down.
I kept getting a similar error in a different context as well, and calling debug didn't seem to do anything.
Here is a minimal example:
newPackage "Foo"
f = x -> x
f = x -> x
The warning message is intentional.
Maybe it should be made clearer, but calling debug with that number should throw you into the debugger when you run the code again.
After I got that error message, I tried what you suggest (call debug with that number), and I now forgot what error message I then got, but it wasn’t useful and didn’t point to the location of the redefinition (or definition).
On Aug 25, 2022, at 8:55 AM, Daniel R. Grayson @.***> wrote:
Maybe it should be made clearer, but calling debug with that number should throw you into the debugger when you run the code again.
— Reply to this email directly, view it on GitHub https://github.com/Macaulay2/M2/issues/2582#issuecomment-1227220179, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAY6R3M6IG2QEXC3O6N5JTV25UKVANCNFSM57PJX6AQ. You are receiving this because you authored the thread.
Maybe try restarting M2 and doing everything the same, except insert "--debug 2671" on the command line.