Closed BeyondEvil closed 1 year ago
Another unexpected behaviour happens if args
is:
"args": ["$1target"]
Do you want to execute this command?
echo Target //internal/ibazel/output_runner:output_runner_test up-to-date:
[y/N]y
iBazel [1:47AM]: Executing command: echo
iBazel [1:47AM]: Workspace path: /Users/jimbrannlund/dev/bazel-watcher
iBazel [1:47AM]: Executing command: `echo Target //internal/ibazel/output_runner:output_runner_test up-to-date:`
Target //internal/ibazel/output_runner:output_runner_test up-to-date:
@BeyondEvil thanks so much for your bug report. Would you be willing to add a failing testcase to our codebase so we can have a more precise conversation around the issue?
Thanks!
I can try (again). I already looked at those test in that file, but I have trouble deciphering what it's doing. 😏 🤷♂️
What's the difference between convertArg
and convertArgs
and when/how are they used?
I'm sorry, I'm unsuccessful in creating a failing test. :(
FYI: I'm running on v0.17.0 which is the latest version available by Homebrew
, but the latest release seems to be v0.20.0 🤔
Ok, no wonder I couldn't create a failing tests for args
- the issue is fixed in master (and v0.20.0) 🤦
However, it fails (and I can create a failing test for it) for commands
. commit
The -run_output_interactive
flag still isn't working tho:
❯ bazel-bin/cmd/ibazel/ibazel_/ibazel test -run_output_interactive=false //internal/ibazel/output_runner:output_runner_test
iBazel [11:36PM]: You are using an experimental filesystem watcher. If you would like to disable that, please set the environment variable
IBAZEL_USE_LEGACY_WATCHER=1
iBazel [11:36PM]: Querying for files to watch...
iBazel [11:36PM]: Bazel query failed: exit status 2
iBazel [11:36PM]: Error querying for source files: exit status 2
iBazel [11:36PM]: Bazel query failed: exit status 2
iBazel [11:36PM]: Error querying for source files: exit status 2
iBazel [11:36PM]: Testing -run_output_interactive=false //internal/ibazel/output_runner:output_runner_test
ERROR: -run_output_interactive=false :: Invalid options syntax: -run_output_interactive=false
iBazel [11:36PM]: Error running Bazel exit status 2
So, to summarize.
Homebrew
is v0.17.0
where this issue is present for both command
and args
args
but not command
in v0.20.0
v0.20.0
It seems NPM installs an even older version:
"@bazel/ibazel": "^0.16.2",
ping @achew22
Yep, the binaries that are uploaded to the release pages are up to date. There is some issue with the NPM release process that I've not been able to work out after a solid few hours of trying. I don't use ibazel through the npm ecosystem, it was contributed by someone else, but would generally recommend downloading from these release pages and not from anywhere else.
Yep, the binaries that are uploaded to the release pages are up to date. There is some issue with the NPM release process that I've not been able to work out after a solid few hours of trying. I don't use ibazel through the npm ecosystem, it was contributed by someone else, but would generally recommend downloading from these release pages and not from anywhere else.
Cool, good to know!
What about the interactive flag-issue I'm seeing? @achew22
To make the flag work, you would need to add it to the list of flags that we pass through to bazel
https://github.com/bazelbuild/bazel-watcher/blob/master/cmd/ibazel/main.go#L37. Seems like you're using one that ibazel doesn't know about.
Seems like you're using one that ibazel doesn't know about.
Not sure what you mean, but the flag is mentioned in the ibazel docs https://github.com/bazelbuild/bazel-watcher/blob/master/README.md#output-runner
Adding the flag --run_output_interactive=false will automatically run the command without prompting for confirmation.
And here's the code: https://github.com/bazelbuild/bazel-watcher/blob/3a6b20ac429a1ad35e4a2a6c7542cefd39ab4c8b/internal/ibazel/output_runner/output_runner.go#L40
@achew22
Stale issue message
Stale issue message
Describe the bug
Match group substituting in output runner fails under some conditions (see repro instructions).
Reproduction instructions
Steps to reproduce the behavior:
https://github.com/BeyondEvil/bazel-watcher/tree/beyondevil/regex-group-bug
ibazel test //internal/ibazel/output_runner:output_runner_test
Expected behavior
I'm expecting the
$1
to be replaced withoutput_runner
producing the output:but it's not performing the substitution:
It also fails for:
Version (please complete the following information):
Additional context Side not:
-run_output_interactive=false
doesn't work.