From 2cfe2266d635871ffa71837f4c99c07ab383d630 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Thu, 19 Nov 2026 19:00:50 +0900 Subject: [PATCH] =?UTF-8?q?fix(build-logic)!:=20=EC=97=86=EB=8A=94=20?= =?UTF-8?q?=EC=A3=BC=20source=20root=EC=99=80=20=EB=B9=88=20root=EB=A1=9C?= =?UTF-8?q?=20API=20surface=EB=A5=BC=20=EC=A4=84=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8A=94=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 문제: API surface 태스크(verify<이름>ApiSurface·update<이름>ApiSurface)는 JavaPublicTypes.render가 폴더가 아닌 root를 말없이 건너뛰었다. 그래서 주 sourceRoot(기본 src/main/java)가 옮겨 가도 검사가 없었다. 추가 root는 AdditionalSourceRoots.requireExisting이 폴더가 있는지만 보아, .java 파일이 하나도 없는 폴더는 통과했다. 다른 root가 type을 내면 표면이 비지 않아 「found no public types」도 지나간다. 기준 트리에서 verify는 「removed: app.Visible」처럼 type이 지워졌다고만 말했고, update -Papprove…는 줄어든 표면을 기록하고 성공했다(cbfa77627 뒤, 2026-11-19 be-main-red2에서 넘겨받음). 고른 방법: JavaPublicTypes.render가 root마다 「폴더가 있고 .java 파일이 하나 이상」을 요구하고, 어긴 root를 「source roots that do not exist」와 「source roots with no .java file」 두 목록으로 모두 짚어 실패한다. 검사가 한 곳에 모였으므로 AdditionalSourceRoots와 태스크의 getAdditionalSourceRoots 속성을 지운다. 검사는 지금처럼 태스크 실행에서만 돈다(이미지 빌드의 의존성 단계는 소스 없이 모든 project를 설정한다, build-logic/AGENTS.md). 버린 대안: - AdditionalSourceRoots를 주 root까지 넓히고 render의 건너뛰기는 두기: 검사가 두 곳으로 나뉘고, render를 부르는 다른 길이 생기면 다시 말없이 건너뛴다. - root마다 public type이 하나 이상이길 요구: public이던 type을 모두 package-private로 바꾸는 승인된 변경까지 막는다. 이 결함은 경로 문제다. 위험·한계: 자기 Java 소스 없이 추가 root만 읽던 파생 leaf는 기본 주 root가 없어 이제 실패한다. `sourceRoot = ''`로 주 root를 뺀다. 안내는 docs/upgrade/2026-11-round9-build.md 7행이다. 이 저장소의 다섯 leaf(graphql, notification, persistence-fileserver·jpa·mongo)는 모든 root에 .java가 있다. 「found no public types」의 안내 문장은 root가 옮겨 간 경우가 앞에서 걸리므로 「public type을 가리키게 하라」로 바꿨다. 검증(desktop, 기준 59349a2b): - RED: 기준에 시험만 얹은 트리 acf16e78에서 ApiSurfaceConventionTest 19개 중 7개 실패. 새 시험 5건(주 root 이동·빈 추가 root × verify·update, 둘이 함께) 중 verify는 「removed: app.Visible」식 메시지라 단언 실패, update는 줄어든 표면을 쓰고 성공해 UnexpectedBuildSuccess. 나머지 2건은 바뀐 메시지 문구. ~/be-ci-next-logs/a2-red2.log. - GREEN: 트리 ac4055c6에서 `./gradlew -p build-logic check javadoc --no-build-cache` 164개 통과 rc=0. ~/be-ci-next-logs/a2-green2.log. - `scripts/verify.sh main --no-cache` rc=0(같은 트리, 시작 부하 4.74, :integrationCheck :mainCheck 446 executed / 21분 26초, -p build-logic test, verify-configuration-cache.sh). 시험 1975개, 실패 0, skip 19. 바깥 Gradle 명령 FROM-CACHE 0, 중첩 빌드(verifyFeatureScaffold 8, configuration cache 스크립트 4, 모두 checkstyle) 12. ~/fix-api-surface-silent-roots-logs/main.log. - 노트북 check-docs.py·check-work-docs.py rc=0. - 리뷰 1회(be-build-ci·be-testing·be-docs): Low 3(주 root 단언이 다른 root가 함께 있어도 통과, 고친 시험의 when 둘, 안내에 추가 root만 쓰는 leaf의 길 없음) → 고침, 없는 root와 빈 root가 함께인 시험을 더함. 확인 리뷰 발견 0. BREAKING CHANGE: apiSurface의 sourceRoot·additionalSourceRoots가 가리키는 폴더가 없거나 .java 파일이 없으면 surface 태스크가 실패한다. 추가 root만 읽는 leaf는 sourceRoot = ''를 둔다. --- build-logic/AGENTS.md | 2 +- .../buildlogic/ApiSurfacePolicy.java | 3 +- .../buildlogic/JavaPublicTypes.java | 49 +++++-- .../apisurface/AdditionalSourceRoots.java | 32 ----- .../apisurface/ApiSurfacePlugin.java | 7 +- .../apisurface/UpdateApiSurfaceTask.java | 7 - .../apisurface/VerifyApiSurfaceTask.java | 6 - .../apisurface/ApiSurfaceConventionTest.java | 125 ++++++++++++++++-- docs/upgrade/2026-11-round9-build.md | 1 + 9 files changed, 164 insertions(+), 68 deletions(-) delete mode 100644 build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/AdditionalSourceRoots.java diff --git a/build-logic/AGENTS.md b/build-logic/AGENTS.md index f48e37f6..ebaa148e 100644 --- a/build-logic/AGENTS.md +++ b/build-logic/AGENTS.md @@ -26,7 +26,7 @@ registry, settings, build-logic, 루트 라이프사이클이 정하는 것을 ## 설정 단계에서 보지 않는 것 - 플러그인의 `apply`·`afterEvaluate`는 leaf의 `src/` 아래 소스·자원이 있는지 보지 않는다. 이미지 빌드의 의존성 단계(`Dockerfile` builder)는 그것을 복사하지 않은 채 모든 project를 설정하고 `verifyDependencyLocks`를 돈다. 그 단계가 복사하는 것(Gradle wrapper와 설정, build 스크립트와 lockfile, `release/` 데이터, `build-logic/`)의 정본은 `Dockerfile`의 그 단계 `COPY` 줄이다. 그 단계에서 설정이 실패하면 이미지가 만들어지지 않는다. -- 파일이 있어야 하는 검사는 그 파일을 읽는 태스크의 실행에서 한다(예: `AdditionalSourceRoots`). 2026-11-13에 API surface의 추가 source root 검사를 설정 단계에 두었다가 nightly compose smoke의 18개 lane이 모두 이미지 빌드에서 멈췄다(2026-11-18 확인). 같은 Dockerfile을 쓰는 release 이미지 빌드와 로컬 `scripts/bootstrap-local.sh`도 같은 단계를 지난다. +- 파일이 있어야 하는 검사는 그 파일을 읽는 태스크의 실행에서 한다(예: API surface의 source root가 있고 `.java` 파일을 가졌는지는 surface 태스크가 부르는 `JavaPublicTypes.render`가 본다). 2026-11-13에 API surface의 추가 source root 검사를 설정 단계에 두었다가 nightly compose smoke의 18개 lane이 모두 이미지 빌드에서 멈췄다(2026-11-18 확인). 같은 Dockerfile을 쓰는 release 이미지 빌드와 로컬 `scripts/bootstrap-local.sh`도 같은 단계를 지난다. - 설정 단계 동작을 바꿨으면 desktop에서 이미지 빌드를 한 번 본다: `bash scripts/run-compose-runtime-smoke.sh --lane off-local`. ## 단계 job의 모양 diff --git a/build-logic/src/main/java/dev/caskeleton/buildlogic/ApiSurfacePolicy.java b/build-logic/src/main/java/dev/caskeleton/buildlogic/ApiSurfacePolicy.java index fa1ac8e4..ec3c0486 100644 --- a/build-logic/src/main/java/dev/caskeleton/buildlogic/ApiSurfacePolicy.java +++ b/build-logic/src/main/java/dev/caskeleton/buildlogic/ApiSurfacePolicy.java @@ -34,7 +34,8 @@ public final class ApiSurfacePolicy { owningProjectPath + ": found no public types under " + String.join(", ", roots.stream().map(File::toString).toList()) - + ". The source roots moved; fix the paths rather than accepting an empty surface."); + + ". Point the source roots at the leaf's public types rather than accepting an empty" + + " surface."); } StringBuilder header = new StringBuilder(); header.append("# ").append(description).append('\n'); diff --git a/build-logic/src/main/java/dev/caskeleton/buildlogic/JavaPublicTypes.java b/build-logic/src/main/java/dev/caskeleton/buildlogic/JavaPublicTypes.java index 14137534..16e9b719 100644 --- a/build-logic/src/main/java/dev/caskeleton/buildlogic/JavaPublicTypes.java +++ b/build-logic/src/main/java/dev/caskeleton/buildlogic/JavaPublicTypes.java @@ -28,23 +28,44 @@ import javax.tools.ToolProvider; public final class JavaPublicTypes { private JavaPublicTypes() {} + /** + * The public top-level types under {@code sourceRoots}, each root a folder that holds at least + * one {@code .java} file. A root that moved away or was emptied used to be skipped, and while + * another root still had types the surface came out smaller instead of failing, so an approved + * update recorded a whole root's types as removed. + * + * @throws IllegalStateException naming every root that does not exist or holds no Java source + */ public static List render(Collection sourceRoots) { List sources = new ArrayList<>(); + List missing = new ArrayList<>(); + List empty = new ArrayList<>(); if (sourceRoots != null) { for (File root : sourceRoots) { - if (root == null || !root.isDirectory()) { + if (!root.isDirectory()) { + missing.add(root); continue; } - try (var paths = Files.walk(root.toPath())) { - paths.filter(Files::isRegularFile) - .filter(path -> path.getFileName().toString().endsWith(".java")) - .map(java.nio.file.Path::toFile) - .forEach(sources::add); - } catch (IOException exception) { - throw new IllegalStateException("Could not walk Java source root " + root, exception); + List found = javaSources(root); + if (found.isEmpty()) { + empty.add(root); } + sources.addAll(found); } } + if (!missing.isEmpty() || !empty.isEmpty()) { + List problems = new ArrayList<>(); + if (!missing.isEmpty()) { + problems.add("source roots that do not exist: " + missing); + } + if (!empty.isEmpty()) { + problems.add("source roots with no .java file: " + empty); + } + throw new IllegalStateException( + String.join("; ", problems) + + ". Fix apiSurface.sourceRoot or apiSurface.additionalSourceRoots rather than" + + " approving a smaller surface."); + } Set types = new TreeSet<>(); for (CompilationUnitTree unit : parse(sources, "The public API surface")) { if (unit.getPackageName() == null) { @@ -84,6 +105,18 @@ public final class JavaPublicTypes { return List.copyOf(imports); } + private static List javaSources(File root) { + try (var paths = Files.walk(root.toPath())) { + return paths + .filter(Files::isRegularFile) + .filter(path -> path.getFileName().toString().endsWith(".java")) + .map(java.nio.file.Path::toFile) + .toList(); + } catch (IOException exception) { + throw new IllegalStateException("Could not walk Java source root " + root, exception); + } + } + private static List parse(Collection files, String subject) { List sources = new ArrayList<>(files); if (sources.isEmpty()) { diff --git a/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/AdditionalSourceRoots.java b/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/AdditionalSourceRoots.java deleted file mode 100644 index 4d08c40a..00000000 --- a/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/AdditionalSourceRoots.java +++ /dev/null @@ -1,32 +0,0 @@ -package dev.caskeleton.buildlogic.apisurface; - -import java.io.File; -import java.util.Collection; -import java.util.List; -import org.gradle.api.GradleException; - -/** - * The extra source roots an API surface reads, which must exist when the surface is computed. - * - *

A missing root used to be skipped without a word, so an approved update recorded a surface - * with a whole module's types gone (2026-11-12 review). The check runs when a surface task runs, - * not while Gradle configures the project: a build that configures every project without its - * sources — the image build's dependency-resolution stage copies only the build scripts — then - * failed on a folder no task of that build was going to read (nightly compose smoke, - * 2026-11-13..17). - */ -final class AdditionalSourceRoots { - - private AdditionalSourceRoots() {} - - static void requireExisting(String projectPath, Collection roots) { - List missing = - roots.stream().filter(root -> !root.isDirectory()).sorted().toList(); - if (!missing.isEmpty()) { - throw new GradleException( - projectPath - + " apiSurface.additionalSourceRoots names a folder that does not exist: " - + missing); - } - } -} diff --git a/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/ApiSurfacePlugin.java b/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/ApiSurfacePlugin.java index b459e93e..86d7da9f 100644 --- a/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/ApiSurfacePlugin.java +++ b/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/ApiSurfacePlugin.java @@ -39,8 +39,9 @@ public final class ApiSurfacePlugin implements Plugin { .filter(path -> path != null && !path.isBlank()) .map(project::file) .toList(); - // Each additional root must exist, which the surface tasks check when they run - // (AdditionalSourceRoots says why not here). + // Every root must exist and hold a .java file. JavaPublicTypes checks that when a surface + // task runs, not here: the image build's dependency stage configures every project + // without its sources (build-logic/AGENTS.md). List roots = new ArrayList<>(sourcePaths.stream().map(project::file).toList()); roots.addAll(additional); String verifyTaskName = "verify" + label + "ApiSurface"; @@ -63,7 +64,6 @@ public final class ApiSurfacePlugin implements Plugin { + label + " public API surface drifts."); task.getSourceRoots().from(roots); - task.getAdditionalSourceRoots().from(additional); task.getBaseline().fileValue(baseline); task.getLabel().set(label); task.getSurfaceDescription() @@ -93,7 +93,6 @@ public final class ApiSurfacePlugin implements Plugin { + label + " public API surface baseline after review."); task.getSourceRoots().from(roots); - task.getAdditionalSourceRoots().from(additional); task.getBaseline().fileValue(baseline); task.getLabel().set(label); task.getSurfaceDescription() diff --git a/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/UpdateApiSurfaceTask.java b/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/UpdateApiSurfaceTask.java index 6938feb1..34513dca 100644 --- a/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/UpdateApiSurfaceTask.java +++ b/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/UpdateApiSurfaceTask.java @@ -15,7 +15,6 @@ import org.gradle.api.provider.ListProperty; import org.gradle.api.provider.Property; import org.gradle.api.tasks.Input; import org.gradle.api.tasks.InputFiles; -import org.gradle.api.tasks.Internal; import org.gradle.api.tasks.OutputFile; import org.gradle.api.tasks.TaskAction; import org.gradle.work.DisableCachingByDefault; @@ -25,10 +24,6 @@ public abstract class UpdateApiSurfaceTask extends DefaultTask { @InputFiles public abstract ConfigurableFileCollection getSourceRoots(); - /** The extension's additional roots, also in {@link #getSourceRoots()}; each must exist. */ - @Internal - public abstract ConfigurableFileCollection getAdditionalSourceRoots(); - @OutputFile public abstract RegularFileProperty getBaseline(); @@ -43,8 +38,6 @@ public abstract class UpdateApiSurfaceTask extends DefaultTask { @TaskAction public void updateSurface() { - AdditionalSourceRoots.requireExisting( - getOwningProjectPath().get(), getAdditionalSourceRoots().getFiles()); if (!getApproved().get()) { throw new GradleException( getName() diff --git a/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/VerifyApiSurfaceTask.java b/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/VerifyApiSurfaceTask.java index 29af681f..14c4dc4d 100644 --- a/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/VerifyApiSurfaceTask.java +++ b/build-logic/src/main/java/dev/caskeleton/buildlogic/apisurface/VerifyApiSurfaceTask.java @@ -25,10 +25,6 @@ public abstract class VerifyApiSurfaceTask extends DefaultTask { @InputFiles public abstract ConfigurableFileCollection getSourceRoots(); - /** The extension's additional roots, also in {@link #getSourceRoots()}; each must exist. */ - @Internal - public abstract ConfigurableFileCollection getAdditionalSourceRoots(); - @Internal public abstract RegularFileProperty getBaseline(); @@ -56,8 +52,6 @@ public abstract class VerifyApiSurfaceTask extends DefaultTask { @TaskAction public void verifySurface() { - AdditionalSourceRoots.requireExisting( - getOwningProjectPath().get(), getAdditionalSourceRoots().getFiles()); if (getUpdateApproved().get()) { throw new GradleException( getName() diff --git a/build-logic/src/test/java/dev/caskeleton/buildlogic/apisurface/ApiSurfaceConventionTest.java b/build-logic/src/test/java/dev/caskeleton/buildlogic/apisurface/ApiSurfaceConventionTest.java index 322761d9..3387725c 100644 --- a/build-logic/src/test/java/dev/caskeleton/buildlogic/apisurface/ApiSurfaceConventionTest.java +++ b/build-logic/src/test/java/dev/caskeleton/buildlogic/apisurface/ApiSurfaceConventionTest.java @@ -75,17 +75,32 @@ class ApiSurfaceConventionTest { } @Test - void emptyOrUnparseableSurfaceFailsClosed() throws Exception { - writeConfiguredBuild("src/main/moved-away"); - BuildResult empty = runner("verifyFixtureApiSurface").buildAndFail(); - assertTrue(empty.getOutput().contains("found no public types"), empty.getOutput()); + void aRootWithNoPublicTypeFailsClosed() throws Exception { + // given + Path hidden = projectDir.resolve("src/hidden/java/app"); + Files.createDirectories(hidden); + Files.writeString(hidden.resolve("Hidden.java"), "package app;\nfinal class Hidden {}\n"); + writeConfiguredBuild("src/hidden/java"); - writeConfiguredBuild("src/main/java"); + // when + BuildResult result = runner("verifyFixtureApiSurface").buildAndFail(); + + // then + assertTrue(result.getOutput().contains("found no public types"), result.getOutput()); + } + + @Test + void anUnparseableSourceFailsClosed() throws Exception { + // given Files.writeString( projectDir.resolve("src/main/java/app/Broken.java"), "package app;\npublic class Broken {\n"); - BuildResult broken = runner("verifyFixtureApiSurface").buildAndFail(); - assertTrue(broken.getOutput().contains("could not be parsed"), broken.getOutput()); + + // when + BuildResult result = runner("verifyFixtureApiSurface").buildAndFail(); + + // then + assertTrue(result.getOutput().contains("could not be parsed"), result.getOutput()); } @Test @@ -194,7 +209,81 @@ class ApiSurfaceConventionTest { // then assertTrue( - result.getOutput().contains("additionalSourceRoots names a folder that does not exist"), + result + .getOutput() + .contains("source roots that do not exist: " + rootList("../moved/src/main/java")), + result.getOutput()); + } + + @ParameterizedTest + @ValueSource( + strings = { + "verifyFixtureApiSurface", + "updateFixtureApiSurface -PapproveFixtureApiSurfaceChange" + }) + @org.junit.jupiter.api.DisplayName( + "주 source root가 옮겨 가면 추가 root의 type만으로 surface를 만들지 않고 그 경로를 짚어 실패한다") + void aMovedMainSourceRootFailsInsteadOfShrinkingTheSurface(String arguments) throws Exception { + // given + recordASurfaceWithAnAdditionalSourceRoot(); + Files.move(projectDir.resolve("src/main/java"), projectDir.resolve("src/main/moved")); + + // when + BuildResult result = runner(arguments.split(" ")).buildAndFail(); + + // then + assertTrue( + result + .getOutput() + .contains("source roots that do not exist: " + rootList("src/main/java")), + result.getOutput()); + } + + @ParameterizedTest + @ValueSource( + strings = { + "verifyFixtureApiSurface", + "updateFixtureApiSurface -PapproveFixtureApiSurfaceChange" + }) + @org.junit.jupiter.api.DisplayName( + "Java 파일이 없는 추가 source root는 폴더가 있어도 건너뛰지 않고 그 경로를 짚어 실패한다") + void anEmptyAdditionalSourceRootFailsInsteadOfShrinkingTheSurface(String arguments) + throws Exception { + // given + recordASurfaceWithAnAdditionalSourceRoot(); + Files.delete(projectDir.resolve("extra/src/main/java/extra/Other.java")); + + // when + BuildResult result = runner(arguments.split(" ")).buildAndFail(); + + // then + assertTrue( + result + .getOutput() + .contains("source roots with no .java file: " + rootList("extra/src/main/java")), + result.getOutput()); + } + + @Test + @org.junit.jupiter.api.DisplayName("없는 root와 빈 root가 함께 있으면 두 목록을 모두 짚어 실패한다") + void aMissingAndAnEmptyRootAreBothNamed() throws Exception { + // given + recordASurfaceWithAnAdditionalSourceRoot(); + Files.move(projectDir.resolve("src/main/java"), projectDir.resolve("src/main/moved")); + Files.delete(projectDir.resolve("extra/src/main/java/extra/Other.java")); + + // when + BuildResult result = runner("verifyFixtureApiSurface").buildAndFail(); + + // then + assertTrue( + result + .getOutput() + .contains( + "source roots that do not exist: " + + rootList("src/main/java") + + "; source roots with no .java file: " + + rootList("extra/src/main/java")), result.getOutput()); } @@ -213,12 +302,30 @@ class ApiSurfaceConventionTest { } private void declareAMissingAdditionalSourceRoot() throws Exception { + declareAdditionalSourceRoot("../moved/src/main/java"); + } + + /** A surface recorded from both roots: {@code app.Visible} and {@code extra.Other}. */ + private void recordASurfaceWithAnAdditionalSourceRoot() throws Exception { + Path extra = projectDir.resolve("extra/src/main/java/extra"); + Files.createDirectories(extra); + Files.writeString(extra.resolve("Other.java"), "package extra;\npublic final class Other {}\n"); + declareAdditionalSourceRoot("extra/src/main/java"); + runner("updateFixtureApiSurface", "-PapproveFixtureApiSurfaceChange").build(); + } + + /** How the surface tasks print a one-root list: the absolute, normalized project path. */ + private String rootList(String relative) throws Exception { + return "[" + projectDir.toRealPath().resolve(relative).normalize() + "]"; + } + + private void declareAdditionalSourceRoot(String root) throws Exception { Files.writeString( projectDir.resolve("build.gradle"), Files.readString(projectDir.resolve("build.gradle")) .replace( "baseline = file('surface.txt')", - "baseline = file('surface.txt')\n additionalSourceRoots = ['../moved/src/main/java']")); + "baseline = file('surface.txt')\n additionalSourceRoots = ['" + root + "']")); } private void writeConfiguredBuild(String sourceRoot) throws Exception { diff --git a/docs/upgrade/2026-11-round9-build.md b/docs/upgrade/2026-11-round9-build.md index 2f163f01..d7da12d1 100644 --- a/docs/upgrade/2026-11-round9-build.md +++ b/docs/upgrade/2026-11-round9-build.md @@ -18,6 +18,7 @@ | 4 | version catalog에서 지운 칸을 쓰던 빌드 스크립트는 자기 칸을 둔다. 지운 라이브러리 칸: `errorprone-core`, `findsecbugs-plugin`, `jackson3-core`, `jmh-core`, `jmh-generator-annprocess`, `junit-platform-launcher`, `protobuf-java-legacy`, `spock-core-groovy4`, `spock-core-groovy5`. 지운 플러그인 칸: `spring-dependency-management`, `spotless`, `spotbugs`, `errorprone`(규약 플러그인이 쓰는 버전은 그대로다) | 빌드 스크립트 컴파일이 실패한다 | 그 alias를 쓰던 서비스 | | 5 | `apiSurface`의 추가 source root가 실제로 있는 폴더를 가리키는지 본다. 상대 경로 대신 `project(':x').file('src/main/java').path`를 쓴다 | 설정 단계에서 실패한다. 전에는 말없이 건너뛰어 줄어든 표면을 승인할 수 있었다 | API surface에 추가 root를 둔 leaf | | 6 | graphql의 `GraphQlDeploymentModeRegistryParityTest`는 `test`가 아니라 main 단계 lane `:adapter:inbound:graphql:graphqlDocumentContractTest`에서 돈다. 손으로 돌릴 때 그 lane을 부른다 | `test`만 돌리면 registry 대조를 보지 않는다 | graphql을 실은 서비스 | +| 7 | `apiSurface`의 주 source root(`sourceRoot`, 기본 `src/main/java`)와 추가 root가 모두 `.java` 파일을 가진 폴더인지 본다. 자기 Java 소스 없이 추가 root만 읽는 leaf는 `sourceRoot = ''`로 주 root를 뺀다. 5번의 실패도 설정 단계가 아니라 surface 태스크를 돌 때 난다 | surface 태스크(`verify<이름>ApiSurface`·`update<이름>ApiSurface`)가 경로를 짚어 실패한다(`source roots that do not exist`, `source roots with no .java file`). 전에는 없는 주 root와 빈 root를 말없이 건너뛰어, 다른 root가 남으면 줄어든 표면을 승인할 수 있었다 | API surface를 선언한 leaf | ## 3. 확인 -- 2.54.0