-
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 2.0.0 autogenerated test rules #2008
Comments
We removed the test that had earlier been added to prevent such a regression |
That test was intentionally removed for 2.0 as it relied on the workspace name being implicitly linkable for absolute imports such as For 2.0, you now have to explicitly make a pkg_npm in the root BUILD file with a package_name that matches the workspace name and add the things you want importable. To get the rhttps://github.com/WesleyYue/ts-jest-repro above working here is the change:
with that it works
|
We updated the 2.0 upgrade wiki to add a little more guidance on this: https://github.com/bazelbuild/rules_nodejs/wiki#no-longer-link-the-workspace-root |
Is there a better pattern to use if |
Why do you need more than one entry in the root build file? I think I'm missing something about the shape of the graph. Could you make a little repro where there are multiple things that have to be registered? |
Doesn't that defeat the point of using Bazel and a monorepo paradigm? Or am I misunderstanding what you mean? Imagine I have an org-wide monorepo with typescript tests that are unrelated from different teams, now these teams would need to mix and add the dependencies for all of their unrelated tests to the same root npm_pkg. |
Yes, the repro I was asking for is one that exhibits the problem you're describing. I agree there should not be a central point where all the deps in a monorepo need to get registered. I think this was fixed in 2.2.0 with
|
🐞 bug report
Is this a regression?
Yes, this works in 1.6.1
Description
It looks like this bug regressed in the 2.0.0 release candidates.
🔬 Minimal Reproduction
Repo to repro here.
🔥 Exception or Error
🌍 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.)Anything else relevant?
I'm building on an aarch64 platform.
The text was updated successfully, but these errors were encountered: