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

Invalid --error-limit flag added for esbuild >= 0.9.0 #2552

Closed
shosti opened this issue Mar 26, 2021 · 0 comments · Fixed by #2559
Closed

Invalid --error-limit flag added for esbuild >= 0.9.0 #2552

shosti opened this issue Mar 26, 2021 · 0 comments · Fixed by #2559

Comments

@shosti
Copy link

shosti commented Mar 26, 2021

🐞 bug report

Affected Rule

The issue is caused by the rule:

esbuild

Is this a regression?

No

Description

Trying the esbuild rule with the latest version of esbuild (0.10.0), I got the following error:

ERROR: .../ui/test/BUILD.bazel:15:8: Bundling Javascript ui/test/main.mjs [esbuild] failed (Exit 1) esbuild failed: error executing command external/esbuild_linux/bin/esbuild --bundle bazel-out/k8-fastbuild/bin/ui/test/main.mjs --sourcemap --keep-names '--platform=browser' '--target=es2015' '--log-level=info' ... (remaining 6 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
 > error: Invalid build flag: "--error-limit=0"

It looks like esbuild renamed --error-limit to --log-limit in 0.9.0: https://github.com/evanw/esbuild/releases/tag/v0.9.0

🔬 Minimal Reproduction

Add the following to WORKSPACE:

_ESBUILD_VERSION = "0.10.0"
http_archive(
    name = "esbuild_linux",
    urls = [
        "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-%s.tgz" % _ESBUILD_VERSION,
    ],
    strip_prefix = "package",
    build_file_content = """exports_files(["bin/esbuild"])""",
    sha256 = "1208fdef28f052cfbef308401040a9d7635401333ed8e9c60930fb2e77777309",
)

Then try to use an esbuild rule.

🔥 Exception or Error





ERROR: .../ui/test/BUILD.bazel:15:8: Bundling Javascript ui/test/main.mjs [esbuild] failed (Exit 1) esbuild failed: error executing command external/esbuild_linux/bin/esbuild --bundle bazel-out/k8-fastbuild/bin/ui/test/main.mjs --sourcemap --keep-names '--platform=browser' '--target=es2015' '--log-level=info' ... (remaining 6 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
 > error: Invalid build flag: "--error-limit=0"

🌍 Your Environment

Operating System:

  
Ubuntu 20.10
  

Output of bazel version:

  
Build label: 3.5.0
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Sep 2 20:11:46 2020 (1599077506)
Build timestamp: 1599077506
Build timestamp as int: 1599077506
  

Rules_nodejs version:

(Please check that you have matching versions between WORKSPACE file and @bazel/* npm packages.)

  
3.2.3
  

Anything else relevant?

jbedard added a commit to jbedard/rules_nodejs that referenced this issue Mar 26, 2021
jbedard added a commit to jbedard/rules_nodejs that referenced this issue Mar 26, 2021
jbedard added a commit to jbedard/rules_nodejs that referenced this issue Mar 29, 2021
jbedard added a commit to jbedard/rules_nodejs that referenced this issue Apr 1, 2021
jbedard added a commit to jbedard/rules_nodejs that referenced this issue Apr 6, 2021
jbedard added a commit to jbedard/rules_nodejs that referenced this issue Apr 6, 2021
jbedard added a commit to jbedard/rules_nodejs that referenced this issue Apr 6, 2021
jbedard added a commit to jbedard/rules_nodejs that referenced this issue Apr 6, 2021
jbedard added a commit to jbedard/rules_nodejs that referenced this issue Apr 6, 2021
mattem pushed a commit that referenced this issue Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants