M2
M2 copied to clipboard
`needs` confuses files of the same name
Try running:
needs "code.m2"
And nothing happens. Now try running:
load "code.m2"
and you get an error that code.m2 was not found on path. This is because code.m2 is a Core script, so now all future invocations of needs for it are ignored.
What's worse, if you're developing some code in code.m2 in your local directory then needs doesn't load it at all.
This doesn't seem to be a bug -- after all, files can have the same name and be in different directories.
After M2 has loaded, the Core directory is not on the path. needs should not be confused about that.