Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
343 stars 230 forks source link

Examples being run with --no-preload #1543

Closed pzinn closed 3 years ago

pzinn commented 3 years ago

Maybe there's already an issue out there mentioning these problems, but since I haven't found any, here it is. Some examples seem to rely on certain packages. Here's one: resolution-doc.m2 tries ideal"a3-ab-c2,abc-d2-1, b3-b2-b" which fails with

currentString:10:5:(3):[25]: error: no method found for applying ideal to:
     argument   :  "a3-ab-c2,abc-d2-1, b3-b2-b" (of class String)

because the package Classic has not been loaded.

DanGrayson commented 3 years ago

Yes, I think there's not much point in trying to run package installation without preloading the usually-preloaded packages. So we don't.

This doesn't happen to you unless you try something like that, by editing the source code, does it?

mahrud commented 3 years ago

I recently added --no-preload for all packages except Macaulay2Doc. It would be good if Macaulay2Doc also didn't need it though, since it has the most number of documentation nodes and preloading time adds up. We decided it's best to instead fix the capture command so we can run examples in the same process rather than starting a new Macaulay2. The problem with that currently is that cleaning dictionaries is confusing.

pzinn commented 3 years ago

oh OK. never mind then. it does run fine now, I must've done something weird. closing.

mahrud commented 3 years ago

Wait, actually, now I can't find in which PR I made that change. I distinctly remember making the change, but I don't see it in the code! I'll reopen so this can be fixed.

mahrud commented 3 years ago

Ah, I think I stashed that change because some packages had missing dependencies and it was taking too much work to fix them all. I just made a new PR to fix it, though it'll need more work to get all packages and tests to run.

mahrud commented 3 years ago

Thanks for bringing this up again! By the way, the previous issue that discussed this was #1181.