Record Class WorkingSet

java.lang.Object
java.lang.Record
network.ike.workspace.WorkingSet
Record Components:
root - the primary directory — the workspace root, or the single repository
manifest - the workspace.yaml path, or null for a single-repository working set
baseName - the working set's identity for derived names — the base for sibling directories (<baseName>-<feature>): the manifest workspace-root: artifactId when present, otherwise the root directory name
members - every git working tree in the set, in a deterministic order: the declared subprojects followed by the workspace root (a single-repository working set has the one repo as its sole member). The workspace root is the member whose WorkingSet.Member.directory() equals root() and whose WorkingSet.Member.kind() is WorkingSet.Member.Kind.AGGREGATOR.

public record WorkingSet(Path root, Path manifest, String baseName, List<WorkingSet.Member> members) extends Record
The co-located set of git working trees a working-tree workspace operation acts on — one repository for a single repo, or the subprojects plus the workspace root for a workspace (IKE-Network/ike-issues#609, under the console/engine boundary, #601).

A working set is resolved from context by WorkingSetResolver: a single repository is a working set of one; a workspace.yaml declares a larger one. Working-tree verbs — commit, push, sync, branch, fork, switch — act on each WorkingSet.Member; the manifest(), when present, carries the workspace metadata.

The workspace root (aggregator) is a first-class WorkingSet.Member, not an orchestrator standing outside the set: it is branched, version-qualified, committed, and tagged alongside the subprojects. Each member therefore carries a WorkingSet.Member.Kind so reports and lifecycle goals can include the aggregator and special-case it where its role differs (#764).

This is the working-set half of the scope-resolution layer; the dependency-ordered artifact cohort that release-style verbs need is modelled separately (ike-issues#610).

  • Constructor Details

    • WorkingSet

      public WorkingSet(Path root, Path manifest, String baseName, List<WorkingSet.Member> members)
      Creates an instance of a WorkingSet record class.
      Parameters:
      root - the value for the root record component
      manifest - the value for the manifest record component
      baseName - the value for the baseName record component
      members - the value for the members record component
  • Method Details

    • isWorkspace

      public boolean isWorkspace()
      Whether this working set is backed by a workspace.yaml.
      Returns:
      true for a workspace, false for a single repo
    • isSingleRepo

      public boolean isSingleRepo()
      Whether this is a single-repository working set — a working set of one.
      Returns:
      true for a single repository
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • root

      public Path root()
      Returns the value of the root record component.
      Returns:
      the value of the root record component
    • manifest

      public Path manifest()
      Returns the value of the manifest record component.
      Returns:
      the value of the manifest record component
    • baseName

      public String baseName()
      Returns the value of the baseName record component.
      Returns:
      the value of the baseName record component
    • members

      public List<WorkingSet.Member> members()
      Returns the value of the members record component.
      Returns:
      the value of the members record component