You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've observed our internal codebase a pattern that looks like this:
Change a 1p dep to have a typescript error, or a syntax error. It happily picks up the change, builds it and, in the case of a syntax error, prints the error to the console.
All JS is served correctly. The file with the error is output with the error present, which can result in runtime errors which makes sense.
Fix the error I introduced.
Observe that js_run_devserver.mjs crashes.
Here's the error that it prints with the debug logs enabled just before the crash
+ Syncing 25322 files & folders...
+ Syncing 24743 non-node_modules files & folders...
Skipping file code-components-transpiler/shared/dist/__test__/compile_code.test.js since its timestamp has not changed
Skipping file code-components-transpiler/shared/dist/__test__/compile_code.test.js.map since its timestamp has not changed
Skipping file code-components-transpiler/shared/dist/__test__/tailwind.test.js since its timestamp has not changed
Skipping file code-components-transpiler/shared/dist/__test__/tailwind.test.js.map since its timestamp has not changed
Skipping file code-components-transpiler/shared/dist/compile_code.js since its timestamp has not changed
...
Skipping file share/ts-lib/dist/abort.js.map since its timestamp has not changed
[Error: ENOENT: no such file or directory, lstat '/home/ubuntu/.cache/bazel/_bazel_ubuntu/webpack-server/execroot/figma/bazel-out/k8-fastbuild/bin/share/ts-lib/dist/array.js'] {
errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path: '/home/ubuntu/.cache/bazel/_bazel_ubuntu/webpack-server/execroot/figma/bazel-out/k8-fastbuild/bin/share/ts-lib/dist/array.js'
}
DEBUG: aspect_rules_js[js_run_devserver]: exit code: 1
iBazel [11:21PM]: Error waiting for process: exit status 1
Notably this doesn't happen 100% reproducibly, but it's pretty easy to reproduce with ~5-10 minutes of attempts. Sometimes it happens many times in a row.
The general issue I believe is that because js_run_devserver's sync process may be running concurrently with arbitrary bazel build commands, it can't assume that any of the desired files will exist in the output directory at any given moment. Bazel may be in the middle of removing and replacing an output.
Version
Development (host) and target OS/architectures:
Output of bazel --version: 8.0.0
Version of the Aspect rules, or other relevant rules from your WORKSPACE or MODULE.bazel file:
What happened?
I've observed our internal codebase a pattern that looks like this:
It looks like it's erroring on this line.
Notably this doesn't happen 100% reproducibly, but it's pretty easy to reproduce with ~5-10 minutes of attempts. Sometimes it happens many times in a row.
The general issue I believe is that because js_run_devserver's sync process may be running concurrently with arbitrary bazel build commands, it can't assume that any of the desired files will exist in the output directory at any given moment. Bazel may be in the middle of removing and replacing an output.
Version
Development (host) and target OS/architectures:
Output of
bazel --version
: 8.0.0Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:Language(s) and/or frameworks involved:
How to reproduce
Still working on this!
Any other information?
No response
The text was updated successfully, but these errors were encountered: