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

Reproduce file system issue with prototype of symlinking user node_modules #708

Conversation

gregmagolan
Copy link
Collaborator

No description provided.

@gregmagolan gregmagolan force-pushed the user-node-modules-proto-repro branch 8 times, most recently from 936adf7 to 381d983 Compare April 20, 2019 21:37
@gregmagolan
Copy link
Collaborator Author

gregmagolan commented Apr 20, 2019

Ok. I finally figured out what changed on master to fix the original issue that was causing the filesystem errors!

ERROR: /home/circleci/.cache/bazel/_bazel_circleci/02fc451c9ce3986cffaddce25971cb5b/external/fine_grained_deps_npm/node_modules/ajv/BUILD.bazel:213:9: unterminated string literal at eof
ERROR: /home/circleci/.cache/bazel/_bazel_circleci/02fc451c9ce3986cffaddce25971cb5b/external/fine_grained_deps_npm/node_modules/ajv/BUILD.bazel:213:22: syntax error at 'newline': expected ]
ERROR: /home/circleci/.cache/bazel/_bazel_circleci/02fc451c9ce3986cffaddce25971cb5b/external/fine_grained_deps_npm/node_modules/ajv/BUILD.bazel:174:12: Traceback (most recent call last):
	File "/home/circleci/.cache/bazel/_bazel_circleci/02fc451c9ce3986cffaddce25971cb5b/external/fine_grained_deps_npm/node_modules/ajv/BUILD.bazel", line 172
		filegroup(name = "ajv__files", srcs = $error...)
	File "/home/circleci/.cache/bazel/_bazel_circleci/02fc451c9ce3986cffaddce25971cb5b/external/fine_grained_deps_npm/node_modules/ajv/BUILD.bazel", line 174, in filegroup
		$error$

The problem was that there were two separate yarn_install rules targeting the same node_modules folder so one was reading the BUILD files while the other was writing to them. The fixing commit was here 61e35d3

I guess the fix for this is to put read the BUILD that is already there and see if it is a generated one. If it is then error out!

@gregmagolan gregmagolan force-pushed the user-node-modules-proto-repro branch from 381d983 to 1bf376c Compare April 20, 2019 21:43
@gregmagolan gregmagolan force-pushed the user-node-modules-proto-repro branch from 1bf376c to 597e790 Compare April 20, 2019 21:47
@gregmagolan
Copy link
Collaborator Author

Transitive npm deps #675 also fixed this issue which popped up after using user node_modules:

ERROR: /home/circleci/rules_nodejs/internal/e2e/rollup_fine_grained_deps/BUILD.bazel:25:1: SkylarkAction internal/e2e/rollup_fine_grained_deps/bundle_legacy.es2015.js failed (Exit 1) rollup failed: error executing command bazel-out/host/bin/external/build_bazel_rules_nodejs/internal/rollup/rollup --config bazel-out/k8-fastbuild/bin/internal/e2e/rollup_fine_grained_deps/_bundle_legacy.rollup.conf.js --output.file ... (remaining 5 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
[!] (commonjs plugin) Error: Could not resolve import '@gregmagolan/test-a' from '/home/circleci/rules_nodejs/internal/e2e/fine_grained_deps/yarn/node_modules/@gregmagolan/test-b/main.js'
Error: Could not resolve import '@gregmagolan/test-a' from '/home/circleci/rules_nodejs/internal/e2e/fine_grained_deps/yarn/node_modules/@gregmagolan/test-b/main.js'
    at Object.notResolved (/home/circleci/.cache/bazel/_bazel_circleci/02fc451c9ce3986cffaddce25971cb5b/execroot/build_bazel_rules_nodejs/bazel-out/k8-fastbuild/bin/internal/e2e/rollup_fine_grained_deps/_bundle_legacy.rollup.conf.js:157:11)
    at /home/circleci/.cache/bazel/_bazel_circleci/02fc451c9ce3986cffaddce25971cb5b/sandbox/processwrapper-sandbox/14/execroot/build_bazel_rules_nodejs/bazel-out/host/bin/external/build_bazel_rules_nodejs/internal/rollup/rollup.runfiles/build_bazel_rules_nodejs_rollup_deps/node_modules/rollup-plugin-commonjs/src/utils.js:20:68

@gregmagolan
Copy link
Collaborator Author

Case closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants