bazel-contrib / target-determinator

Determines which Bazel targets were affected between two git commits.
Apache License 2.0
144 stars 22 forks source link

Invalid options syntax error #71

Open recht opened 1 year ago

recht commented 1 year ago

Trying to run the command, but I get this:

/target-determinator.linux.amd64 -verbose -targets //src/... d2181321315c9864e1ec5c533c4b5f3f1d2008b2 
2023/08/24 00:27:38 Processing revision 'before' (sha: d2181321315c9864e1ec5c533c4b5f3f1d2008b2)
2023/08/24 00:27:38 Current working tree has 1 non-ignored untracked files:
2023/08/24 00:27:38  ?? src/openapi/
2023/08/24 00:27:38 Workspace is unclean, using git worktree. This will be slower the first time. You can avoid this by committing local changes and ignoring untracked files.
2023/08/24 00:27:38 Reusing git worktree in /home/joakim/.cache/target-determinator/td-worktree-crossplane-aab12449c40715569ff5e44d2da20f6d6c4c6d53
2023/08/24 00:27:39 Running cquery on deps(//src/...)
2023/08/24 00:27:56 Running cquery on //src/...
2023/08/24 00:27:58 Finding compatible targets under //src/...
Target Determinator invocation Error
2023/08/24 00:27:59 failed to process change: failed to load metadata at revision 'before' (sha: d2181321315c9864e1ec5c533c4b5f3f1d2008b2): failed to query at revision 'before' (sha: d2181321315c9864e1ec5c533c4b5f3f1d2008b2) in /home/joakim/.cache/target-determinator/td-worktree-crossplane-aab12449c40715569ff5e44d2da20f6d6c4c6d53: failed to find compatible targets: failed to run compatibility-filtering cquery on //src/...: exit status 2. Stderr:
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=0 --terminal_columns=80
INFO: Reading rc options for 'cquery' from /home/joakim/.cache/target-determinator/td-worktree-crossplane-aab12449c40715569ff5e44d2da20f6d6c4c6d53/.bazelrc:
  Inherited 'build' options: --incompatible_enable_cc_toolchain_resolution --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
ERROR: - :: Invalid options syntax: -

I don't know if it's related to .bazelrc, which contains this:

build --incompatible_enable_cc_toolchain_resolution
build --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
illicitonion commented 1 year ago

Thanks for the bug report! Would it be possible to push a git repo somewhere where we can clone it and reproduce?

recht commented 1 year ago

Unfortunately it's a large private monorepo, so I can't push it anywhere