-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Support bazel 8 and
--noenable_workspace
mode (#6990)
* fix: Support bazel 8 and `--noenable_workspace` mode closes #6984
- Loading branch information
Tomasz Pasternak
authored
Nov 13, 2024
1 parent
b3eea97
commit fc3990b
Showing
6 changed files
with
55 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
base/src/com/google/idea/blaze/base/sync/aspects/strategy/OverrideFlags.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.google.idea.blaze.base.sync.aspects.strategy; | ||
|
||
import org.jetbrains.annotations.Contract; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class OverrideFlags { | ||
@Contract(pure = true) | ||
static @NotNull String newRepositoryFlag(boolean useInjectedRepository) { | ||
if (useInjectedRepository) { | ||
return "--inject_repository"; | ||
} else { | ||
return "--override_repository"; | ||
} | ||
} | ||
|
||
public static @NotNull String overrideRepositoryFlag(boolean useInjectedRepository) { | ||
return String.format("%s=intellij_aspect", newRepositoryFlag(useInjectedRepository)); | ||
} | ||
|
||
public static @NotNull String overrideRepositoryTemplateFlag(boolean useInjectedRepository) { | ||
return String.format("%s=intellij_aspect_template", newRepositoryFlag(useInjectedRepository)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters