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

Fix #3940: unload plugin modules on updates #3942

Closed
wants to merge 2 commits into from

Conversation

JohnXLivingston
Copy link
Contributor

Description

Properly unload modules loaded by plugins when updating them.

Related issues

This is a fix for #3940

Has this been tested?

  • 👍 yes, I added tests to the test suite
  • 👍 yes, light tests as follows are enough
  • 💭 no, because this PR is a draft and still needs work
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

@JohnXLivingston
Copy link
Contributor Author

I replaced the call to delete require.cache[...] by a call to decache. It is done in registerPlugin when upgrading a plugin.
Maybe we should also do it when unregistring plugins?

@Chocobozzz
Copy link
Owner

Thanks, I'll merge this PR manually

@JohnXLivingston
Copy link
Contributor Author

Thanks, I'll merge this PR manually

Can you wait a moment? I'm going to add decache calls in config reloading code (cf comment on the issue)

@Chocobozzz
Copy link
Owner

I added it in bae9303

Thanks @JohnXLivingston for the PR and the tests!

@Chocobozzz Chocobozzz closed this Apr 9, 2021
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

Successfully merging this pull request may close these issues.

2 participants