Unverified Commit 9d089e3a authored by Zack Tanner's avatar Zack Tanner Committed by GitHub

remove --watch from `generate_types` task (#55748)

This was causing issues due to needing to run the watcher in a detached process to avoid it clobbering the other build tasks. For now this disables the watcher so we still get the initial types which is generally all that's needed
parent 69a88786
...@@ -2602,26 +2602,9 @@ export async function build(task, opts) { ...@@ -2602,26 +2602,9 @@ export async function build(task, opts) {
} }
export async function generate_types(task, opts) { export async function generate_types(task, opts) {
// running this detached so that --watch doesn't hijack the other tasks watchers await execa.command('pnpm run types', {
const detached = !!opts.dev stdio: 'inherit',
const subprocess = await execa.command( })
`pnpm run types${opts.dev ? ' --watch' : ''}`,
{
stdio: 'inherit',
detached,
}
)
if (detached) {
function cleanup() {
subprocess.kill('SIGTERM', { forceKillAfterTimeout: 2000 })
}
// since we're runnning in detached mode, make sure the subprocess is killed
process.on('SIGINT', cleanup)
process.on('SIGTERM', cleanup)
process.on('exit', cleanup)
}
} }
export default async function (task) { export default async function (task) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment