Skip to content

Commit

Permalink
ModqueryCommand added
Browse files Browse the repository at this point in the history
- `ModqueryCommand` added for the external dependency inspection `modquery` bazel command with option parsing logic implemented.

- `ModqueryOptions` added.

- `ModqueryExecutor` empty skeleton added to separate query execution logic and print to the injected output stream. Dummy test implementations provided for `tree` and `deps` query types.

bazelbuild/bazel#15365

PiperOrigin-RevId: 454914018
  • Loading branch information
Googler authored and copybara-github committed Jun 14, 2022
1 parent e8fa25e commit 1a4da6a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions third_party/bazel/src/main/protobuf/failure_details.proto
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ message FailureDetail {
StarlarkLoading starlark_loading = 179;
ExternalDeps external_deps = 181;
DiffAwareness diff_awareness = 182;
ModqueryCommand modquery_command = 183;
}

reserved 102; // For internal use
Expand Down Expand Up @@ -1274,3 +1275,14 @@ message DiffAwareness {

Code code = 1;
}

message ModqueryCommand {
enum Code {
MODQUERY_COMMAND_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
MISSING_ARGUMENTS = 1 [(metadata) = { exit_code: 2 }];
TOO_MANY_ARGUMENTS = 2 [(metadata) = { exit_code: 2 }];
INVALID_ARGUMENTS = 3 [(metadata) = { exit_code: 2 }];
}

Code code = 1;
}

0 comments on commit 1a4da6a

Please sign in to comment.