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

Never remove cached node_modules or binary modules #1230

Merged
merged 2 commits into from Apr 13, 2022

Conversation

dl748
Copy link
Contributor

@dl748 dl748 commented May 16, 2021

Description

Adding node_modules check to orphan unloading.

Motivation and Context

if the module in question included a binary plugin, this can cause problems when reloading. We should probably never unload a node_modules package and require the developer to restart if they update or change them. This will force any code outside of node_modules to reload which I think is acceptable, however, if the developer has their OWN binary plugin, this could still be an issue.

How Has This Been Tested?

Included a binary module into the handler that is only used there and called the handler more than once

Screenshots (if appropriate):

@dl748 dl748 changed the title Never removed cached node_modules Never removed cached node_modules or binary modules May 16, 2021
@dl748 dl748 changed the title Never removed cached node_modules or binary modules Never remove cached node_modules or binary modules May 16, 2021
@ned-kelly
Copy link

Can we get this one merged into SLS offline?

@thekushpatel
Copy link

I can confirm that we've been using this fork for months, works like a charm 💯

@ned-kelly
Copy link

Yep, problem is it's now behind master ... Be great if someone from the SLS team can approve this! @dherault ?

Copy link
Collaborator

@pgrzesik pgrzesik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @dl748 - could you please rebase your changes on top of current master branch and push again?

@dl748 dl748 marked this pull request as draft March 20, 2022 00:21
@dl748
Copy link
Contributor Author

dl748 commented Mar 20, 2022

Well rebasing didn't work, now I lost those changes.

@dl748 dl748 force-pushed the do_not_uncache_node_modules branch from a6ee025 to 52d1efd Compare March 20, 2022 00:45
@pgrzesik
Copy link
Collaborator

Hey @dl748 - it looks good but it's marked as draft - is it ready for a re-review?

@dherault dherault marked this pull request as ready for review April 13, 2022 18:26
@dherault
Copy link
Owner

Thanks, @dl748, welcome to the club!

@dherault dherault merged commit dbf30e8 into dherault:master Apr 13, 2022
@dherault
Copy link
Owner

Published in v8.6.0 (in a few hours)

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.

None yet

5 participants