Skip to content

BSP: Create multiple BSP build targets #15051

Open
@stuhood

Description

@stuhood

Currently, Pants exposes a single BSP "build target" per "group" (set of Pants specs) in the config file. Because the unit of test (see #15050) is the "build target", that means that our current execution granularity for that command is "an entire set of specs".

To resolve this, we discussed (in #14943) moving group selection into the bsp command (so that the IntelliJ UI no longer needs to be used to render the groups), and then creating build targets from the transitive dependencies of the group/specs.

IntellIJ cannot just use Pants targets directly as build targets (although VSCode/Metals might be able to), because it doesn't support having multiple build targets owning a single directory. To resolve this, we should use a variant of the CoarsenedTarget algorithm (possibly via a flag to those @rules) which would execute alternating rounds of grouping by directories and coarsening to ensure both 1) no cycles, 2) non-overlapping directories for generated "build targets"/CoarsenedTargets.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions