code improvements, add pipeline stages
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ public class BuildStack {
|
||||
public final ReadOnlyList<ProjectId> topologicalOrder;
|
||||
public final ReadOnlyList<ProjectId> reverseTopologicalOrder;
|
||||
|
||||
public BuildStack(ReadOnlyList<ProjectId> topologicalOrder) {
|
||||
public BuildStack(final ReadOnlyList<ProjectId> topologicalOrder) {
|
||||
this.topologicalOrder = topologicalOrder;
|
||||
this.reverseTopologicalOrder = topologicalOrder.invert();
|
||||
}
|
||||
|
||||
+2
-13
@@ -2,23 +2,12 @@ package p.studio.compiler.models;
|
||||
|
||||
import p.studio.compiler.source.identifiers.ProjectId;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public record ResolvedWorkspace(
|
||||
ProjectId projectId,
|
||||
ProjectId mainProjectId,
|
||||
FrontendSpec frontendSpec,
|
||||
WorkspaceGraph graph,
|
||||
BuildStack stack) {
|
||||
|
||||
public ProjectDescriptor mainProject() {
|
||||
return graph.projectDescriptor(projectId);
|
||||
}
|
||||
|
||||
public Stream<ProjectId> topologicalOrder() {
|
||||
return stack.topologicalOrder.stream();
|
||||
}
|
||||
|
||||
public Stream<ProjectId> reverseTopologicalOrder() {
|
||||
return stack.reverseTopologicalOrder.stream();
|
||||
return graph.projectDescriptor(mainProjectId);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
package p.studio.compiler.models;
|
||||
|
||||
import p.studio.compiler.source.identifiers.ProjectId;
|
||||
import p.studio.compiler.source.tables.ProjectTable;
|
||||
import p.studio.compiler.source.tables.ProjectTableReader;
|
||||
import p.studio.utilities.structures.ReadOnlyList;
|
||||
|
||||
public record WorkspaceGraph(
|
||||
ProjectTable projectTable,
|
||||
ProjectTableReader projectTable,
|
||||
ReadOnlyList<ReadOnlyList<ProjectId>> dependenciesByProjectId) {
|
||||
|
||||
public ProjectDescriptor projectDescriptor(final ProjectId projectId) {
|
||||
|
||||
Reference in New Issue
Block a user