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
Yes, the previous version in which this bug was not present was: ....
This does not affect symlink_node_modules = False, which used to be the default, so maybe it can be considered a regression? But I don't think it ever worked correctly with symlink_node_modules = False.
Description
.npmrc and .yarnrc are never declared as inputs to npm_install and yarn_install, even though running npm and yarn in the workspace means they are read. That means the repository rules are not reevaluated when those files change.
🔬 Minimal Reproduction
Assuming you have a project with a .yarnrc like this:
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
yarn-path ".yarn/releases/yarn-1.21.1.js"
disable-self-update-check true
yarn
# this passes
bazel build //...
# this passes
rm .yarn/releases/yarn-1.21.1.js
yarn
# this fails with Cannot find module '.yarn/releases/yarn-1.21.1.js'
bazel build //...
# this passes
🌍 Your Environment
Operating System:
Darwin MacBook-Pro-108.local 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64
When symlink_node_modules = True, you have to manually add all of the inputs to yarn_install and npm_install to the data attribute. #1866 improves the docstring for data and also includes a fix so that Bazel will evaluate all of the labels in data to ensure they are valid files.
🐞 bug report
Affected Rule
The issue is caused by the rule:npm_install
,yarn_install
Is this a regression?
Yes, the previous version in which this bug was not present was: ....This does not affect
symlink_node_modules = False
, which used to be the default, so maybe it can be considered a regression? But I don't think it ever worked correctly withsymlink_node_modules = False
.Description
.npmrc
and.yarnrc
are never declared as inputs tonpm_install
andyarn_install
, even though runningnpm
andyarn
in the workspace means they are read. That means the repository rules are not reevaluated when those files change.🔬 Minimal Reproduction
Assuming you have a project with a
.yarnrc
like this:🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_nodejs version:
(Please check that you have matching versions between WORKSPACE file and
@bazel/*
npm packages.)The text was updated successfully, but these errors were encountered: