Macaulay2 / M2

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

checking a package changes the namespace #1787

Closed mikestillman closed 3 years ago

mikestillman commented 3 years ago

The following code appears to assign a value to f.

needsPackage "Complexes"
check Complexes
f
mahrud commented 3 years ago

Ah, it's because I'm passing the UserMode option of check to capture: https://github.com/Macaulay2/M2/blob/9a7832bc6d77020eb146e93899afc8617644dee7/M2/Macaulay2/m2/testing.m2#L43

If you do check(Complexes, UserMode => false) it should go away, or if you start M2 with -q.

But perhaps we should change this. Either default value of [check, UserMode] should be false, or check should always pass UserMode => false to capture. Which would you prefer?