-
Notifications
You must be signed in to change notification settings - Fork 522
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
Regression in 1.5.0 generated rules #1787
Comments
Thanks for the small repro. Regression must be in these commits: 1.4.1...1.5.0 Still looking for the cause. |
I bisected it manually, it's caused by a6e29c2 |
alexeagle
added a commit
to alexeagle/rules_nodejs
that referenced
this issue
Apr 10, 2020
In a6e29c2 we added support for generated entry_point by adding a secondary lookup. In 863c7de we reversed the order of the lookups to make rollup work in a certain use case. Neither of these was principled, because we know ahead of time whether the entry_point is generated. We can use a single lookup. This also makes sure that programs run in the location where the linker will put them (note that the logic in question runs before the linker has created the node_modules directory in the execroot.) This is why bazel-contrib#1787 observes that some node programs were broken - we were running the entry point as bazel-out/host/bin/external/npm/@graphql-codegen/cli/bin/graphql-codegen.sh.runfiles/npm/node_modules/@graphql-codegen/cli/bin.js when it should have been node_modules/@graphql-codegen/cli/bin.js Fixes bazel-contrib#1787
alexeagle
added a commit
to alexeagle/rules_nodejs
that referenced
this issue
Apr 10, 2020
In a6e29c2 we added support for generated entry_point by adding a secondary lookup. In 863c7de we reversed the order of the lookups to make rollup work in a certain use case. Neither of these was principled, because we know ahead of time whether the entry_point is generated. We can use a single lookup. This also makes sure that programs run in the location where the linker will put them (note that the logic in question runs before the linker has created the node_modules directory in the execroot.) This is why bazel-contrib#1787 observes that some node programs were broken - we were running the entry point as bazel-out/host/bin/external/npm/@graphql-codegen/cli/bin/graphql-codegen.sh.runfiles/npm/node_modules/@graphql-codegen/cli/bin.js when it should have been node_modules/@graphql-codegen/cli/bin.js Fixes bazel-contrib#1787
alexeagle
added a commit
to alexeagle/rules_nodejs
that referenced
this issue
Apr 10, 2020
In a6e29c2 we added support for generated entry_point by adding a secondary lookup. In 863c7de we reversed the order of the lookups to make rollup work in a certain use case. Neither of these was principled, because we know ahead of time whether the entry_point is generated. We can use a single lookup. This also makes sure that programs run in the location where the linker will put them (note that the logic in question runs before the linker has created the node_modules directory in the execroot.) This is why bazel-contrib#1787 observes that some node programs were broken - we were running the entry point as bazel-out/host/bin/external/npm/@graphql-codegen/cli/bin/graphql-codegen.sh.runfiles/npm/node_modules/@graphql-codegen/cli/bin.js when it should have been node_modules/@graphql-codegen/cli/bin.js Fixes bazel-contrib#1787
gregmagolan
pushed a commit
to alexeagle/rules_nodejs
that referenced
this issue
Apr 11, 2020
In a6e29c2 we added support for generated entry_point by adding a secondary lookup. In 863c7de we reversed the order of the lookups to make rollup work in a certain use case. Neither of these was principled, because we know ahead of time whether the entry_point is generated. We can use a single lookup. This also makes sure that programs run in the location where the linker will put them (note that the logic in question runs before the linker has created the node_modules directory in the execroot.) This is why bazel-contrib#1787 observes that some node programs were broken - we were running the entry point as bazel-out/host/bin/external/npm/@graphql-codegen/cli/bin/graphql-codegen.sh.runfiles/npm/node_modules/@graphql-codegen/cli/bin.js when it should have been node_modules/@graphql-codegen/cli/bin.js Fixes bazel-contrib#1787
alexeagle
added a commit
to alexeagle/rules_nodejs
that referenced
this issue
Apr 11, 2020
In a6e29c2 we added support for generated entry_point by adding a secondary lookup. In 863c7de we reversed the order of the lookups to make rollup work in a certain use case. Neither of these was principled, because we know ahead of time whether the entry_point is generated. We can use a single lookup. However that depends on running the linker on all generated bin rules, which is a breaking change, so for now we just defer the FS check until after the linker runs. This also makes sure that programs run in the location where the linker will put them (note that the logic in question runs before the linker has created the node_modules directory in the execroot.) This is why bazel-contrib#1787 observes that some node programs were broken - we were running the entry point as bazel-out/host/bin/external/npm/@graphql-codegen/cli/bin/graphql-codegen.sh.runfiles/npm/node_modules/@graphql-codegen/cli/bin.js when it should have been node_modules/@graphql-codegen/cli/bin.js Fixes bazel-contrib#1787
gregmagolan
pushed a commit
that referenced
this issue
Apr 11, 2020
…nts (#1816) In a6e29c2 we added support for generated entry_point by adding a secondary lookup. In 863c7de we reversed the order of the lookups to make rollup work in a certain use case. Neither of these was principled, because we know ahead of time whether the entry_point is generated. We can use a single lookup. However that depends on running the linker on all generated bin rules, which is a breaking change, so for now we just defer the FS check until after the linker runs. This also makes sure that programs run in the location where the linker will put them (note that the logic in question runs before the linker has created the node_modules directory in the execroot.) This is why #1787 observes that some node programs were broken - we were running the entry point as bazel-out/host/bin/external/npm/@graphql-codegen/cli/bin/graphql-codegen.sh.runfiles/npm/node_modules/@graphql-codegen/cli/bin.js when it should have been node_modules/@graphql-codegen/cli/bin.js Fixes #1787
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐞 bug report
Affected Rule
The issue is related to the auto generated rules for
node_modules/.bin
Is this a regression?
Yes, this works in 1.4.1
Description
I'm using the auto genrated rules to run GraphQL Code Generator(https://graphql-code-generator.com)
It works fine in version 1.4.1 but in 1.5.0 in fails.
I've created a minimal reproduction of the issue here: https://github.com/purkhusid/glql-gen-repro
🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_nodejs version:
The text was updated successfully, but these errors were encountered: