M2 icon indicating copy to clipboard operation
M2 copied to clipboard

Printing a Resolution Within a Function Affects Which Keys Are Returned

Open David-GW opened this issue 2 years ago • 1 comments

Running

R=ZZ/2[x];
testFunction=M->(
    FR:=res M;
    return keys FR;
);
testFunction R^1

returns {Resolution, dd, ring, cache}, however

R=ZZ/2[x];
testFunction=M->(
    FR:=res M;
    print FR;
    return keys FR;
);
testFunction R^1

returns {0, 1, complete, Resolution, ring, dd, cache} after printing the resolution.

This is using version 1.22, and also occurs on the web interface.

David-GW avatar Jul 26 '23 21:07 David-GW

That's the expected behavior. If a resolution is created by the engine, then we lazily import the free modules and homomorphisms from the engine to the front end.

DanGrayson avatar Jul 27 '23 19:07 DanGrayson