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

fix(typescript): support @npm_bazel_typescript workspace with install_bazel_dependencies for @bazel/typescript package #2039

Closed
wants to merge 1 commit into from

Conversation

gregmagolan
Copy link
Collaborator

@gregmagolan gregmagolan commented Jul 15, 2020

This allows for rules_nodejs 2.0 compatability with the current @angular/bazel package, which imports from @npm_bazel_typescript, without having to patch the nnpm package. LinkablePackageInfo was added in @angular/bazel 10.1.0-next.0 release. Together with this fix this allows us to remove the @angular/bazel patches from examples/angular_view_engine entirely.

Future release of @angular/bazel will be updated to the new package format and support @npm//@angular/bazel:index.bzl loads. This is in progress in angular/angular#37727.

@npm_bazel_typescript support will likely be removed in rules_nodejs 3.0.

…_bazel_dependencies for @bazel/typescript package

This allows for rules_nodejs 2.0 compatability with the current @angular/bazel package, which imports from @npm_bazel_typescript, without having to patch the nnpm package. LinkablePackageInfo was added in @angular/bazel 10.1.0-next.0 release. Together with this fix this allows us to remove the patches from examples/angular_view_engine.

Future release of @angular/bazel will be updated to the new package format and support @npm//@angular/bazel:index.bzl loads. This is in progress in angular/angular#37727.

This support will likely be removed in rules_nodejs 3.0.
@gregmagolan
Copy link
Collaborator Author

Nevermind. This is impossible as for @bazel/typescript 2.0.0 the internal import paths such as load("//@bazel/typescript/internal:ts_config.bzl", "TsConfigInfo") assume it is in an @npm repository where the package files are payed out under /@bazel/typescript.

npm_bazel_typescript/internal/build_defs.bzl: Label '@npm_bazel_typescript//@bazel/typescript/internal:ts_config.bzl' is invalid because '@bazel/typescript/internal' is not a package; perhaps you meant to put the colon here: '@npm_bazel_typescript//:@bazel/typescript/internal/ts_config.bzl'?
INFO: Elapsed time: 0.605s

We will need a minimal patch to @angular/bazel to support rules_nodejs 2.0 until angular/angular#37727 lands and make it into a release.

gregmagolan pushed a commit to gregmagolan/rules_nodejs that referenced this pull request Jul 15, 2020
…ext.0

LinkablePackageInfo now part of ng_module with that release so patch can be simplified to just patching the @npm_bazel_typescript imports. That minimal path is required for @angular/bazel until the package is upgraded to new rules_nodejs 2.0 package format. See bazel-contrib#2039 (comment) for more info.
gregmagolan pushed a commit to gregmagolan/rules_nodejs that referenced this pull request Jul 16, 2020
…ext.0

LinkablePackageInfo now part of ng_module with that release so patch can be simplified to just patching the @npm_bazel_typescript imports. That minimal path is required for @angular/bazel until the package is upgraded to new rules_nodejs 2.0 package format. See bazel-contrib#2039 (comment) for more info.
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