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(esbuild): fix depending on testonly targets #2984

Merged
merged 2 commits into from
Sep 27, 2021

Conversation

mattsoulanille
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • N/A: Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?
Fix esbuild error when depending on testonly targets.

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

When an esbuild target with non-empty args is marked as testonly, it does not mark its params_file as testonly. This causes the following error when it depends on another testonly target:

ERROR: /home/[username]/rules_nodejs/packages/esbuild/test/testonly/BUILD.bazel:16:8: in _params_file rule //packages/esbuild/test/testonly:bundle_args: non-test target '//packages/esbuild/test/testonly:bundle_args' depends on testonly target '//packages/esbuild/test/testonly:main' and doesn't have testonly attribute set

Issue Number: N/A

What is the new behavior?

No error.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@google-cla google-cla bot added the cla: yes label Sep 27, 2021
@mattsoulanille mattsoulanille changed the title fix(esbuild): fix esbuild error when depending on testonly targets fix(esbuild): fix depending on testonly targets Sep 27, 2021
@mattsoulanille mattsoulanille marked this pull request as ready for review September 27, 2021 21:43
@mattem
Copy link
Collaborator

mattem commented Sep 27, 2021

Good catch, thanks! I think at the minimum we should propagate the manual tag too.

@mattem mattem merged commit 4278ef1 into bazel-contrib:stable Sep 27, 2021
@mattsoulanille mattsoulanille deleted the fix_esbuild_testonly branch September 27, 2021 22:51
mattsoulanille added a commit to tensorflow/tfjs that referenced this pull request Sep 28, 2021
Make the default ts_library macro behave like pre-4.0 versions of rules_nodejs by automatically setting package_name to module_name if its not set.

Temporarily mark webgl tests as not testonly to work around bazel-contrib/rules_nodejs#2984 until the next release.

Add package_name to pkg_npm targets.
pyu10055 pushed a commit to tensorflow/tfjs that referenced this pull request Oct 13, 2021
Make the default ts_library macro behave like pre-4.0 versions of rules_nodejs by automatically setting package_name to module_name if its not set.

Temporarily mark webgl tests as not testonly to work around bazel-contrib/rules_nodejs#2984 until the next release.

Add package_name to pkg_npm targets.
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