Remove dead projection recursion state - #964
Open
iuliiasobolevska wants to merge 1 commit into
Open
iuliiasobolevska wants to merge 1 commit into
iuliiasobolevska wants to merge 1 commit into
Conversation
iuliiasobolevska
requested review from
asibross,
iparadiso,
jjacobs44,
kilink,
kzwang,
paulbakker and
srinivasankavitha
as code owners
September 21, 2026 23:24
paulbakker
approved these changes
Sep 21, 2026
jiholee17
reviewed
Sep 22, 2026
| assertThat(projectionHashes) | ||
| .containsExactlyEntriesOf( | ||
| linkedMapOf( | ||
| "CycleProjectionRoot" to "2824004364fedef8ee06b9474c405fbac55a1551f28f9c23c806307aecf6b550", |
Collaborator
There was a problem hiding this comment.
Asserting the hashed values as strings feels a bit brittle, could maybe consider something like
val projectionNames = codeGenResult.clientProjections.map { it.typeSpec().name() }
assertThat(projectionNames)
.containsExactlyInAnyOrder(
"CycleProjectionRoot",
"DirectCycleProjection",
"MutualAProjection",
"MutualBProjection",
)
val projections = codeGenResult.clientProjections.associateBy { it.typeSpec().name() }
assertThat(projections.getValue("DirectCycleProjection").typeSpec().methodSpecs())
.extracting("name")
.contains("name", "self", "mutual")
...
jiholee17
approved these changes
Sep 22, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
processedEdgesandqueryDepthstate from client projection generationThe removed state was a cycle/depth guard in the retired v1 generator, but the surviving implementation only copied and forwarded it. Projection generation remains bounded by
generatedClasses.Performance
Three alternating fresh-JVM runs of the exact base (
fd6723e3) and PR (e315c9ea) revisions used the same Java 17 CLI configuration and 3.7 MB consumer schema.Median wall time improved by 9.67 seconds, or 8.4%. The base had a wide 21.31-second range, so this is best treated as a directional result for this workload rather than a precise or universal speedup. Both variants generated 9,000 byte-identical files.
Verification
JAVA_HOME=/Users/isobolevska/.sdkman/candidates/java/17.0.19-zulu ./gradlew :graphql-dgs-codegen-core:formatKotlinMain :graphql-dgs-codegen-core:formatKotlinTest :graphql-dgs-codegen-core:test --no-scandiff -rq