Skip to content

Commit a816bf9

Browse files
committed
Add warning message when reloading package
Each type from the package is redefined, so existing instances won't work any more.
1 parent b190ace commit a816bf9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

M2/Macaulay2/m2/packages.m2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ loadPackage String := opts -> pkgname -> (
168168
if opts.Reload === true then (
169169
dismiss pkgname;
170170
if isPackageLoaded pkgname then (
171+
printerr("warning: reloading ", pkgname,
172+
"; recreate instances of types from this package");
171173
closePackage value PackageDictionary#pkgname;
172174
-- clear out the value of the symbol
173175
PackageDictionary#pkgname <- PackageDictionary#pkgname));

0 commit comments

Comments
 (0)