-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
[Bug]: Make variable substitution corrupts regex (or escaping rules undocumented!) #1045
Labels
bug
Something isn't working
Comments
jbedard
added a commit
to jbedard/rules_js
that referenced
this issue
May 9, 2023
jbedard
added a commit
to jbedard/rules_js
that referenced
this issue
May 9, 2023
jbedard
added a commit
to jbedard/rules_js
that referenced
this issue
May 9, 2023
jbedard
added a commit
to jbedard/bazel-lib
that referenced
this issue
May 9, 2023
jbedard
added a commit
to jbedard/bazel-lib
that referenced
this issue
May 10, 2023
jbedard
added a commit
to bazel-contrib/bazel-lib
that referenced
this issue
May 10, 2023
jbedard
added a commit
to jbedard/rules_js
that referenced
this issue
May 11, 2023
jbedard
added a commit
that referenced
this issue
May 11, 2023
Fix #1045 The minimum bazel-lib version was updated to 1.32.2 to include bazel-contrib/bazel-lib@b5e9238
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
Porting some code from
build_bazel_rules_nodejs
to userules_js
, I replaced agenrule
withjs_run_binary
. Command line flags containing regexes that worked fine withgenrule
get corrupted when passed to theargs
attribute ofjs_run_binary
.These used to work fine using
genrule
:In
js_run_binary
they get corrupted, and in fact as it stands cause the shell script runner to blow up before even invoking the binary, I think because the input gets truncated after the first%
of the second CLI arg and you get a shell complaint about the unmatched quote.I presume makefile variable expansion is causing the problem but I would have expected the substitution to behave the same as native genrule?
Version
Development (host) and target OS/architectures: MacOS Ventura 13.3.1a/x86
Output of
bazel --version
:bazel 7.0.0-pre.20230316.2
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:https://github.com/aspect-build/rules_js/archive/002397780d51735f1a98b362fca7018df31e85ac.tar.gz
(needed to use a commit because a fix for newer syntax of
pnpm-lock.yaml
files isn't/wasn't yet in a released build).Language(s) and/or frameworks involved:
How to reproduce
Build a simple node binary that echoes its arguments and pass those in - should be malformed.
Any other information?
No response
The text was updated successfully, but these errors were encountered: