-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature] add
workspace/invalidTargets
endpoint | #BAZEL-684 Done
filtering out .bazelbsp from invalid targets Merge remote-tracking branch 'origin/kasia/aspect-fallback-query' into kasia/aspect-fallback-query format invalid target's labels according to bazel version fixup! remove java class remove java class fix ProjectSyncService fixup! change isFailure value if user specified an empty set of targets change isFailure value if user specified an empty set of targets cr fixes fix test add workspace/invalidtargets ep adding invalid targets to project move invocation to project resolver refactoring + add target names from workspace context add `BazelTargetsQuery` Co-authored-by: Marcin Abramowicz <marcin.abramowicz@jetbrains.com> Merge-request: BAZEL-MR-546 Merged-by: Katarzyna Mielnik <katarzyna.anna.mielnik@jetbrains.com>
- Loading branch information
1 parent
2e5227d
commit 14a117f
Showing
11 changed files
with
86 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
20 changes: 20 additions & 0 deletions
20
...main/kotlin/org/jetbrains/bsp/bazel/server/bsp/managers/BazelBspFallbackAspectsManager.kt
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,20 @@ | ||
package org.jetbrains.bsp.bazel.server.bsp.managers | ||
|
||
import org.eclipse.lsp4j.jsonrpc.CancelChecker | ||
import org.jetbrains.bsp.bazel.bazelrunner.BazelRunner | ||
import org.jetbrains.bsp.bazel.workspacecontext.WorkspaceContextProvider | ||
|
||
class BazelBspFallbackAspectsManager( | ||
private val bazelRunner: BazelRunner, | ||
private val workspaceContextProvider: WorkspaceContextProvider | ||
) { | ||
fun getAllPossibleTargets(cancelChecker: CancelChecker): List<String> { | ||
val targets = workspaceContextProvider.currentWorkspaceContext().targets | ||
return bazelRunner.commandBuilder().query() | ||
.withTargets(targets) | ||
.withFlags(listOf("--output=label", "--keep_going")) | ||
.executeBazelCommand(parseProcessOutput = false) | ||
.waitAndGetResult(cancelChecker, ensureAllOutputRead = true) | ||
.stdoutLines | ||
} | ||
} |
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
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
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