Skip to content

Use correct file time for filesLoaded hash table keys #3872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion M2/Macaulay2/m2/startup.m2.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ if firstTime then (
srcdirs = {};

markLoaded = (filepath, filetime, notify) -> (
filepath = realpath toAbsolutePath filepath;
filesLoaded#filepath = filetime;
loadedFiles##loadedFiles = filepath;
if notify then printerr("loaded ", filepath));
tryLoad = (filename, filepath, loadfun, notify) -> if fileExists filepath then (
filepath = realpath toAbsolutePath filepath;
filetime := fileTime filepath;
if notify then printerr("loading ", filename);
ret := loadfun filepath;
Expand Down
3 changes: 2 additions & 1 deletion M2/Macaulay2/tests/normal/testing.m2
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
testpkg = minimizeFilename(temporaryFileName() | ".m2")
testpkg = temporaryFileName() | ".m2"
testpkg << ///newPackage("TestPackage")
beginDocumentation()
TEST "assert Equation(1 + 1, 2)"
/// << close
testpkg = minimizeFilename realpath testpkg
loadPackage("TestPackage", FileName => testpkg)
check "TestPackage"
pkgtest = tests(0, "TestPackage")
Expand Down
Loading