-
-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix: close compiler on SIGINT #2919
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also let's add test on 130 code and close for serve (it is already implemented in dev server)
Codecov Report
@@ Coverage Diff @@
## master #2919 +/- ##
==========================================
- Coverage 95.13% 95.00% -0.13%
==========================================
Files 31 31
Lines 1684 1701 +17
Branches 481 484 +3
==========================================
+ Hits 1602 1616 +14
- Misses 82 85 +3
Continue to review full report at Codecov.
|
af33801
to
859a6c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, let's add tests for build
/watch
/serve
, just enable logging and check on https://github.com/webpack/webpack/blob/main/lib/cache/PackFileCacheStrategy.js#L1263 or you can implement custom plugin and use compiler.cache.hooks.shutdown.tapPromise()
with { stage: 9999 }
to ensure we will run after cache was stored
b3c5f1f
to
5da505a
Compare
5da505a
to
52d9a0c
Compare
I will add tests |
@snitin315 We need improve logic here: we need allow to graceful close and allow immutability disable, my idea - when developer run |
Makes sense, I will update it in near future. |
@snitin315 hello, let's finish, just copy logic from dev server |
@alexander-akait sure 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you rebase?
@@ -132,6 +132,40 @@ class ServeCommand { | |||
|
|||
const servers = []; | |||
|
|||
const stopAllServers = () => { | |||
Promise.all( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to make this a variable and passing the variable to the promise expression
What kind of change does this PR introduce?
fix
Did you add tests for your changes?
No
If relevant, did you update the documentation?
No
Summary
Fix #2918
Does this PR introduce a breaking change?
None
Other information
No