Skip to content

Commit

Permalink
Revert "fix: Fix bazel mod deps execution (bazelbuild#6826)"
Browse files Browse the repository at this point in the history
This reverts commit a76c79b.
  • Loading branch information
tpasternak committed Oct 4, 2024
1 parent 191d541 commit 04a0f8c
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ public class BlazeModRunnerImpl extends BlazeModRunner {
private static final String DEPS = "deps";
private static final String ROOT_WORKSPACE = "";


/**
* For some reason, dump_repo_mapping reqiures "", while deps requires "<root>".
* Probably a bazel bug
*/
private static final String ROOT_WORKSPACE_EXPLICIT = "<root>";

/**
* {@code bazel mod dump_repo_mapping} takes a canonical repository name and will dump a map from
* repoName -> canonicalName of all the external repositories available to that repository The
Expand Down Expand Up @@ -98,9 +91,12 @@ public ListenableFuture<String> getDeps(
BuildSystemName buildSystemName,
List<String> flags) {

// TODO: when 8.0.0 is released add this only if it's disabled explicitly for the repo
flags.add("--noenable_workspace");

return Futures.transform(
runBlazeModGetBytes(
project, invoker, context, ImmutableList.of(DEPS, ROOT_WORKSPACE_EXPLICIT, "--output=json"), flags),
project, invoker, context, ImmutableList.of(DEPS, ROOT_WORKSPACE, "--output=json"), flags),
bytes -> new String(bytes, StandardCharsets.UTF_8),
BlazeExecutor.getInstance().getExecutor()
);
Expand Down

0 comments on commit 04a0f8c

Please sign in to comment.