bazel-contrib / bazel-contrib/target-determinator

Invalid options syntax error

Open
#71 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
182
Forks
33
PR merge metrics
No merged PRs in 30d

Description

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
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the command shown in the issue from the repository revision and inspect the .bazelrc options alongside the compatibility-filtering cquery invocation. Trace which argument produces the reported “Invalid options syntax: -” error, then verify that the command handles this configuration without the malformed option.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.