-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP on new experimental build file strategy idea
- Loading branch information
Showing
15 changed files
with
812 additions
and
193 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
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
28 changes: 28 additions & 0 deletions
28
.../src/com/salesforce/bazel/eclipse/core/model/discovery/BazelBuildfileTargetDiscovery.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,28 @@ | ||
package com.salesforce.bazel.eclipse.core.model.discovery; | ||
|
||
import java.util.Collection; | ||
|
||
import org.eclipse.core.runtime.CoreException; | ||
import org.eclipse.core.runtime.IProgressMonitor; | ||
|
||
import com.google.idea.blaze.base.model.primitives.TargetExpression; | ||
import com.google.idea.blaze.base.model.primitives.WorkspacePath; | ||
import com.salesforce.bazel.eclipse.core.model.BazelWorkspace; | ||
|
||
/** | ||
* A simplification of {@link BazelQueryTargetDiscovery} which ignores targets and assumes all from selected packages. | ||
* <p> | ||
* This is recommended with the {@link BuildfileDrivenProvisioningStrategy}. | ||
* </p> | ||
*/ | ||
public class BazelBuildfileTargetDiscovery extends BazelQueryTargetDiscovery implements TargetDiscoveryStrategy { | ||
|
||
public static final String STRATEGY_NAME = "buildfiles"; | ||
|
||
@Override | ||
public Collection<TargetExpression> discoverTargets(BazelWorkspace bazelWorkspace, | ||
Collection<WorkspacePath> bazelPackages, IProgressMonitor progress) throws CoreException { | ||
return bazelPackages.stream().map(TargetExpression::allFromPackageNonRecursive).toList(); | ||
} | ||
|
||
} |
Oops, something went wrong.