Skip to content
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

Investigate PKG_DEL scripts #1176

Open
cbm755 opened this issue Jul 5, 2022 · 1 comment
Open

Investigate PKG_DEL scripts #1176

cbm755 opened this issue Jul 5, 2022 · 1 comment
Milestone

Comments

@cbm755
Copy link
Collaborator

cbm755 commented Jul 5, 2022

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 #1175 (comment)

@alexvong243f
Copy link
Collaborator

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

@cbm755 cbm755 added this to the 3.1.0 milestone Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants