From b107ecf9adf42b0128390611113a5b33aa2d67b3 Mon Sep 17 00:00:00 2001 From: Kevin Burke Date: Fri, 5 Oct 2018 10:55:10 -0700 Subject: [PATCH] Point thread-loader at Sourcegraph fork The thread-loader package starts several subprocesses. When you send a SIGINT to thread-loader, the subprocesses terminate, but the parent process hangs while waiting for them to send data. We were not listening for the 'end' event in the parent process which meant that the webpack processes would just hang forever. This is a problem because this blocks the shutdown of goreman which means we can have orphan processes and is, in general, a huge hassle when developing the codebase locally. Fix this by listening for an 'end' event, which means we can signal to Webpack that the job terminated with an error, instead of not terminating. This means that SIGINT will actually shut down the process instead of leaving it hanging forever. Fixes sourcegraph/sourcegraph#186. Updates webpack-contrib/thread-loader#33. Updates webpack-contrib/thread-loader#34. Updates webpack-contrib/thread-loader#35. Updates webpack-contrib/thread-loader#36. --- package.json | 2 +- yarn.lock | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 29ab74b3379f..ab3f7721bd6e 100644 --- a/package.json +++ b/package.json @@ -198,7 +198,7 @@ "style-loader": "^0.23.0", "stylelint": "^9.4.0", "stylelint-formatter-compact": "^1.1.0", - "thread-loader": "^1.2.0", + "thread-loader": "sourcegraph/thread-loader#ddbb570ed8de6a44c94c248adc3486fdd3ef7a0c", "ts-loader": "^5.0.0", "ts-node": "^7.0.1", "ts-unused-exports": "^2.0.5", diff --git a/yarn.lock b/yarn.lock index b3b4ec808905..e7ced4d57e64 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10666,10 +10666,9 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" -thread-loader@^1.2.0: +thread-loader@sourcegraph/thread-loader#ddbb570ed8de6a44c94c248adc3486fdd3ef7a0c: version "1.2.0" - resolved "https://registry.yarnpkg.com/thread-loader/-/thread-loader-1.2.0.tgz#35dedb23cf294afbbce6c45c1339b950ed17e7a4" - integrity sha512-acJ0rvUk53+ly9cqYWNOpPqOgCkNpmHLPDGduNm4hDQWF7EDKEJXAopG9iEWsPPcml09wePkq3NF+ZUqnO6tbg== + resolved "https://codeload.github.com/sourcegraph/thread-loader/tar.gz/ddbb570ed8de6a44c94c248adc3486fdd3ef7a0c" dependencies: async "^2.3.0" loader-runner "^2.3.0"