-
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
--nobazel_patch_module_resolver should be the default #2125
Comments
alexeagle
added
cleanup
Tech debt, resolving it improves our own velocity
package:builtin
labels
Aug 17, 2020
Finally, it is happening. 🎉 Module resolver patching has been a troublemaker. |
This was referenced Dec 1, 2020
alexeagle
pushed a commit
to alexeagle/rules_nodejs
that referenced
this issue
Dec 2, 2020
This turns off our monkey-patches for require() for nodejs_binary, nodejs_test, and macros like jasmine_node_test. Note it was previously disabled for npm_package_bin and generated index.bzl binaries in bazel-contrib#1440 BREAKING CHANGE: we no longer patch the require() function, instead you should rely on the linker to make node modules resolvable at the standard location if this breaks you, try opting-in to the require patches with templated_args = ["--bazel_patch_module_resolver"] Fixes bazel-contrib#2125
alexeagle
pushed a commit
to alexeagle/rules_nodejs
that referenced
this issue
Dec 2, 2020
This turns off our monkey-patches for require() for nodejs_binary, nodejs_test, and macros like jasmine_node_test. Note it was previously disabled for npm_package_bin and generated index.bzl binaries in bazel-contrib#1440 BREAKING CHANGE: we no longer patch the require() function, instead you should rely on the linker to make node modules resolvable at the standard location if this breaks you, try opting-in to the require patches with templated_args = ["--bazel_patch_module_resolver"] Fixes bazel-contrib#2125
alexeagle
pushed a commit
to alexeagle/rules_nodejs
that referenced
this issue
Dec 2, 2020
This turns off our monkey-patches for require() for nodejs_binary, nodejs_test, and macros like jasmine_node_test. Note it was previously disabled for npm_package_bin and generated index.bzl binaries in bazel-contrib#1440 BREAKING CHANGE: we no longer patch the require() function, instead you should rely on the linker to make node modules resolvable at the standard location if this breaks you, try opting-in to the require patches with templated_args = ["--bazel_patch_module_resolver"] Fixes bazel-contrib#2125
alexeagle
pushed a commit
to alexeagle/rules_sass
that referenced
this issue
Dec 2, 2020
bazel-contrib/rules_nodejs#2125 is going to turn off the patching of the require() function by default. The reason is that it breaks compatibility with many node programs. However rules_sass depends on this, and also has at least conceptual sharing with google3 which uses the patched require() as well. This change is a no-op for rules_nodejs 2.x where the default is true, but is required with rules_nodejs 3.0 where it will be false.
alexeagle
pushed a commit
to alexeagle/rules_sass
that referenced
this issue
Dec 2, 2020
bazel-contrib/rules_nodejs#2125 is going to turn off the patching of the require() function by default. The reason is that it breaks compatibility with many node programs. However rules_sass depends on this, and also has at least conceptual sharing with google3 which uses the patched require() as well. This change is a no-op for rules_nodejs 2.x where the default is true, but is required with rules_nodejs 3.0 where it will be false.
alexeagle
pushed a commit
to alexeagle/rules_nodejs
that referenced
this issue
Dec 2, 2020
This turns off our monkey-patches for require() for nodejs_binary, nodejs_test, and macros like jasmine_node_test. Note it was previously disabled for npm_package_bin and generated index.bzl binaries in bazel-contrib#1440 BREAKING CHANGE: we no longer patch the require() function, instead you should rely on the linker to make node modules resolvable at the standard location if this breaks you, try opting-in to the require patches with templated_args = ["--bazel_patch_module_resolver"] Fixes bazel-contrib#2125
alexeagle
pushed a commit
to alexeagle/rules_sass
that referenced
this issue
Dec 4, 2020
bazel-contrib/rules_nodejs#2125 is going to turn off the patching of the require() function by default. The reason is that it breaks compatibility with many node programs. However rules_sass depends on this, and also has at least conceptual sharing with google3 which uses the patched require() as well. This change is a no-op for rules_nodejs 2.x where the default is true, but is required with rules_nodejs 3.0 where it will be false.
nex3
pushed a commit
to bazelbuild/rules_sass
that referenced
this issue
Dec 4, 2020
bazel-contrib/rules_nodejs#2125 is going to turn off the patching of the require() function by default. The reason is that it breaks compatibility with many node programs. However rules_sass depends on this, and also has at least conceptual sharing with google3 which uses the patched require() as well. This change is a no-op for rules_nodejs 2.x where the default is true, but is required with rules_nodejs 3.0 where it will be false.
alexeagle
pushed a commit
to alexeagle/rules_nodejs
that referenced
this issue
Dec 9, 2020
This turns off our monkey-patches for require() for nodejs_binary, nodejs_test, and macros like jasmine_node_test. Note it was previously disabled for npm_package_bin and generated index.bzl binaries in bazel-contrib#1440 BREAKING CHANGE: we no longer patch the require() function, instead you should rely on the linker to make node modules resolvable at the standard location if this breaks you, try opting-in to the require patches with templated_args = ["--bazel_patch_module_resolver"] Fixes bazel-contrib#2125
alexeagle
pushed a commit
to alexeagle/rules_nodejs
that referenced
this issue
Dec 11, 2020
We are about to flip the default for this flag in bazel-contrib#2125 so we need to explicitly opt-in in places where we need the behavior. Ideally most of these should be fixed, this would be necessary if we ever want to deprecate the module resolver patches
alexeagle
pushed a commit
to alexeagle/rules_nodejs
that referenced
this issue
Dec 11, 2020
We are about to flip the default for this flag in bazel-contrib#2125 so we need to explicitly opt-in in places where we need the behavior. Ideally most of these should be fixed, this would be necessary if we ever want to deprecate the module resolver patches
alexeagle
pushed a commit
to alexeagle/rules_nodejs
that referenced
this issue
Dec 11, 2020
This turns off our monkey-patches for require() for nodejs_binary, nodejs_test, and macros like jasmine_node_test. Note it was previously disabled for npm_package_bin and generated index.bzl binaries in bazel-contrib#1440 BREAKING CHANGE: By default, we no longer patch the require() function, instead you should rely on the linker to make node modules resolvable at the standard location if this breaks you, the quickest fix is to flip the flag back on a nodejs_binary/nodejs_test/npm_package_bin with `templated_args = ["--bazel_patch_module_resolver"]`, see bazel-contrib#2344 as an example. Another fix is to explicitly use our runfiles helper library, see bazel-contrib#2341 as an example. Fixes bazel-contrib#2125
gregmagolan
pushed a commit
that referenced
this issue
Dec 11, 2020
We are about to flip the default for this flag in #2125 so we need to explicitly opt-in in places where we need the behavior. Ideally most of these should be fixed, this would be necessary if we ever want to deprecate the module resolver patches
alexeagle
pushed a commit
to alexeagle/rules_nodejs
that referenced
this issue
Dec 11, 2020
This turns off our monkey-patches for require() for nodejs_binary, nodejs_test, and macros like jasmine_node_test. Note it was previously disabled for npm_package_bin and generated index.bzl binaries in bazel-contrib#1440 BREAKING CHANGE: By default, we no longer patch the require() function, instead you should rely on the linker to make node modules resolvable at the standard location if this breaks you, the quickest fix is to flip the flag back on a nodejs_binary/nodejs_test/npm_package_bin with `templated_args = ["--bazel_patch_module_resolver"]`, see bazel-contrib#2344 as an example. Another fix is to explicitly use our runfiles helper library, see bazel-contrib#2341 as an example. Fixes bazel-contrib#2125
alexeagle
pushed a commit
that referenced
this issue
Dec 11, 2020
This turns off our monkey-patches for require() for nodejs_binary, nodejs_test, and macros like jasmine_node_test. Note it was previously disabled for npm_package_bin and generated index.bzl binaries in #1440 BREAKING CHANGE: By default, we no longer patch the require() function, instead you should rely on the linker to make node modules resolvable at the standard location if this breaks you, the quickest fix is to flip the flag back on a nodejs_binary/nodejs_test/npm_package_bin with `templated_args = ["--bazel_patch_module_resolver"]`, see #2344 as an example. Another fix is to explicitly use our runfiles helper library, see #2341 as an example. Fixes #2125
Fixed by #2347 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my last change 7d070ff#diff-ccd16b070808615570daf5b61d659258 I wrote
we should do this for 3.0
The text was updated successfully, but these errors were encountered: