symbolic icon indicating copy to clipboard operation
symbolic copied to clipboard

Investigate PKG_DEL scripts

Open cbm755 opened this issue 3 years ago • 1 comments

its pkg unload's fault for not giving us a hook

Not sure what exactly you need. But the PKG_DEL scripts might do something similar. See: https://docs.octave.org/latest/Creating-Packages.html Essentially, these scripts are executed whenever the path containing them is removed from Octave's load path. That is happening on pkg unload. (But admittedly, it's not a real hook but just a script.) Maybe you could use (mlocked) functions that keep some values stored in persistent variables if you need to access them from the PKG_DEL script?

Originally posted by @mmuetzel in https://github.com/cbm755/octsympy/issues/1175#issuecomment-1175083790

cbm755 avatar Jul 05 '22 19:07 cbm755

In the future, we should investigate whether to trigger cleanup in PKG_DEL script. This could simplify our current approach.

alexvong243f avatar Jul 06 '22 16:07 alexvong243f