Split codegen-plugins back into codegen-core and remove client-api#1091
Merged
Split codegen-plugins back into codegen-core and remove client-api#1091
Conversation
08e5b14 to
a41b47b
Compare
sugmanue
reviewed
Mar 20, 2026
| LOGGER.info("Successfully generated Java class files."); | ||
| } | ||
|
|
||
| private static Set<Shape> getClosure(software.amazon.smithy.model.Model model, TypeCodegenSettings settings) { |
Contributor
There was a problem hiding this comment.
Nit, replace qualified name with import.
| private static Set<Shape> getClosure(software.amazon.smithy.model.Model model, TypeCodegenSettings settings) { | ||
| Set<Shape> closure = new HashSet<>(); | ||
| settings.shapes() | ||
| .stream() |
Contributor
There was a problem hiding this comment.
Nit, replace stream API chain with loop.
| .map(model::expectShape) | ||
| .forEach(closure::add); | ||
| settings.selector() | ||
| .shapes(model) |
Contributor
There was a problem hiding this comment.
Nit, replace stream API chain with loop.
Contributor
Author
There was a problem hiding this comment.
selector().shapes() returns a Stream.
| create("internal") { | ||
| compileClasspath += sourceSets["main"].output + configurations["compileClasspath"] | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
Can we add something like:
+ main {
+ java.srcDir("src/internal/java")
+ }
to allow IntelliJ to identify the directory as a source?
Contributor
Author
Contributor
There was a problem hiding this comment.
I tried and it didn't work for me I will double check.
e50fdb7 to
43f6f46
Compare
sugmanue
approved these changes
Mar 20, 2026
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.

Issue #, if available:
Description of changes:
The original motivation for splitting client-core into client-api was to break a dependency cycle:
codegen -> client -> framework-errors -> codegen.In practice, this required moving all classes from client-core into client-api, leaving client-core as little more than an aggregator with a dependency on framework-errors. It also introduced an awkward limitation: client-api, which contains most of the actual client logic, can no longer depend on framework-errors.
We’re now taking a different approach. Instead of restructuring the client modules, we split codegen-plugins into a codegen-core module that contains the essential generators for types, and an internal (non-exposed) types plugin used by framework-errors. This breaks the cycle at the codegen layer without distorting the client module boundaries.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.