small fixes
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@ public final class DependencyContext {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
public static DependencyContext seed(DependencyConfig config) {
|
||||
public static DependencyContext basedOn(DependencyConfig config) {
|
||||
return new DependencyContext(config);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ public final class DependencyService {
|
||||
public ResolvedWorkspace run(
|
||||
final DependencyConfig config,
|
||||
final LogAggregator logs) {
|
||||
final var ctx = DependencyContext.seed(config);
|
||||
final var ctx = DependencyContext.basedOn(config);
|
||||
|
||||
for (final var dependencyPhase : phases) {
|
||||
final var issues = dependencyPhase.run(ctx);
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ public final class StackPhase implements DependencyPhase {
|
||||
.collect(joining("\n"));
|
||||
|
||||
var issue = BuildingIssue.builder().error(true).message(msg).build();
|
||||
return ReadOnlyCollection.wrap(List.of(issue));
|
||||
return ReadOnlyCollection.with(issue);
|
||||
}
|
||||
|
||||
ctx.stack = new BuildStack(ReadOnlyList.wrap(travesalOrder));
|
||||
|
||||
+4
-6
@@ -5,11 +5,9 @@ import p.studio.compiler.models.DependencyContext;
|
||||
import p.studio.compiler.workspaces.DependencyPhase;
|
||||
import p.studio.utilities.structures.ReadOnlyCollection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public final class ValidatePhase implements DependencyPhase {
|
||||
@Override
|
||||
public ReadOnlyCollection<BuildingIssue> run(DependencyContext ctx) {
|
||||
public ReadOnlyCollection<BuildingIssue> run(final DependencyContext ctx) {
|
||||
// ensure rootProjectId is set
|
||||
if (ctx.rootProjectId == null) {
|
||||
final var issue = BuildingIssue
|
||||
@@ -17,7 +15,7 @@ public final class ValidatePhase implements DependencyPhase {
|
||||
.error(true)
|
||||
.message("[DEPS]: rootProjectId ProjectId not set")
|
||||
.build();
|
||||
return ReadOnlyCollection.wrap(List.of(issue));
|
||||
return ReadOnlyCollection.with(issue);
|
||||
}
|
||||
|
||||
// ensure the dependenciesByProject matches the number of projectDescriptors
|
||||
@@ -27,7 +25,7 @@ public final class ValidatePhase implements DependencyPhase {
|
||||
.error(true)
|
||||
.message("[DEPS]: internal error: dependenciesByProject and projectDescriptors size mismatch")
|
||||
.build();
|
||||
return ReadOnlyCollection.wrap(List.of(issue));
|
||||
return ReadOnlyCollection.with(issue);
|
||||
}
|
||||
|
||||
// ensure uniformity to version across the same projects (associated by name)
|
||||
@@ -40,7 +38,7 @@ public final class ValidatePhase implements DependencyPhase {
|
||||
.error(true)
|
||||
.message("[DEPS]: inconsistent version for project: " + name + " (" + versions + ")")
|
||||
.build();
|
||||
return ReadOnlyCollection.wrap(List.of(issue));
|
||||
return ReadOnlyCollection.with(issue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user