Skip to content

Commit

Permalink
fix: Use "" alias for for the root module back
Browse files Browse the repository at this point in the history
It is still not documented well, but "<root>" caused crashes on Windows

closes #6850
  • Loading branch information
tpasternak committed Oct 4, 2024
1 parent 438af63 commit 0980638
Showing 1 changed file with 1 addition and 9 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 @@ -97,10 +90,9 @@ public ListenableFuture<String> getDeps(
BlazeContext context,
BuildSystemName buildSystemName,
List<String> flags) {

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 0980638

Please sign in to comment.