Macaulay2 / M2

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

Escaped message printed during findProgram examples #3292

Closed mahrud closed 2 weeks ago

mahrud commented 3 weeks ago
 -- capturing example results for "findProgram"                             This program writes out version information of the Gfan installation.
[[0,0,0,1],[1,0,0,1],[0,1,0,1],[1,1,0,1],[0,0,1,1],[1,0,1,1],[0,1,1,1],[1,1,1,1]]
[[7,6,5,4,3,2,1,0],[6,7,4,5,2,3,0,1],[4,6,5,7,0,2,1,3],[0,4,2,6,1,5,3,7]]
This program writes out version information of the Gfan installation.
 -- 0.267105 seconds elapsed
mahrud commented 3 weeks ago

Also:

 -- warning: R cannot be found; ending
d-torrance commented 3 weeks ago

The R message is intended. I think it's useful for the user to know that the RInterface package wasn't properly loaded.

mahrud commented 3 weeks ago

During installPackage "Macaulay2Doc" is not the intention, is it? The user never tried loading that package to begin with!

 -- warning: method has no documentation: Macaulay2Doc :: compositions(ZZ), key (compositions,ZZ), package Macaulay2Doc
 -- warning: R cannot be found; ending
 -- warning: missing node: InexactNumber % RingElement cited by %
d-torrance commented 3 weeks ago

Yeah, that's weird. I suppose that's coming from when Macaulay2Doc is building the "packages provided with Macaulay2" page?

mahrud commented 3 weeks ago

I thought so as well, but that page only calls readPackage "RInterface" which should stop after the call to newPackage. Other possibility is a link to a documentation node in RInterface which isn't prefaced with RInterface::, I think.

d-torrance commented 3 weeks ago

I think I figured out the problem. At the end of installPackage, when we actually generate the info and/or html files for the "packages provided with Macaulay2" page, we call info TO pkg and/or html TO pkg for every package. They in turn call fixup(DocumentTag), which eventually calls the following, completely loading the package: https://github.com/Macaulay2/M2/blob/ec9e9ac60ed4a8e791448942202f077a88a87e15/M2/Macaulay2/m2/packages.m2#L200

d-torrance commented 3 weeks ago

Related: #1643

d-torrance commented 3 weeks ago

@mahrud - Now that #3293 is merged, and with #1643 already addressing the underlying issue behind the RInterface cruft during the installation of Macaulay2Doc, do you think this can be closed?