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

feat(builtin): add js_library JSEcmaScriptModuleInfo support #2658

Merged
merged 1 commit into from
May 11, 2021

Conversation

jbedard
Copy link
Collaborator

@jbedard jbedard commented May 6, 2021

No description provided.

@google-cla google-cla bot added the cla: yes label May 6, 2021
@jbedard jbedard force-pushed the js_library_ecma-provider branch from a18acf3 to 4c895ad Compare May 6, 2021 19:28
@jbedard jbedard force-pushed the js_library_ecma-provider branch from 4c895ad to 5ff9499 Compare May 9, 2021 18:34
@jbedard jbedard force-pushed the js_library_ecma-provider branch from 5ff9499 to 7d53b6f Compare May 9, 2021 19:29
@@ -254,7 +254,8 @@ def _rollup_bundle(ctx):
for dep in ctx.attr.deps:
if JSEcmaScriptModuleInfo in dep:
deps_depsets.append(dep[JSEcmaScriptModuleInfo].sources)
elif JSModuleInfo in dep:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to fix the internal/pkg_npm/test:test_pkg test, and I don't understand why..?

Why is the esbuild dep collection so different from the rollup version? Without this change pkg_npm/test:test_pkg fails because the outputted files have slight changes (a single exports.X = undefined (or void?) and the sourcemap change).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other failing before this change was packages/rollup/test/integration. Somehow this only failed on CI and not locally though!? The error was

Compilation failed Error: '@far/a' is imported by packages/rollup/test/integration/foo.js, but could not be resolved – treating it as an external dependency

I also don't understand this one, both why it only failed on CI (not locally) and why this change fixes it?

@jbedard jbedard marked this pull request as ready for review May 10, 2021 15:55
@jbedard jbedard requested a review from alexeagle May 10, 2021 15:56
@alexeagle alexeagle merged commit 5ad1596 into bazel-contrib:stable May 11, 2021
twheys pushed a commit to twheys/rules_nodejs that referenced this pull request Jan 13, 2022
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