build: jackson-yaml optional, drop unused jsonSchema + direct snakeyaml (F4)#109
Merged
Conversation
b4e874c to
d08d348
Compare
…ml (F4) F1 audit flagged jackson-module-jsonSchema and the direct snakeyaml declaration as unused, and called out jackson-dataformat-yaml as a candidate for optional-scope since it is consumed only by `com.demcha.compose.ConfigLoader.loadConfigWithEnv(...)` on the YAML code path. Library consumers that load JSON configs (or skip ConfigLoader entirely) should not pay the ~1.7MB SnakeYAML transitive cost. - Mark jackson-dataformat-yaml as <optional>true</optional>, mirroring the existing poi-ooxml pattern. ConfigLoader still compiles against the type but consumers must add jackson-dataformat-yaml explicitly if they load YAML configs through it; without it, ConfigLoader throws NoClassDefFoundError when it constructs YAMLFactory. - Remove jackson-module-jsonSchema entirely (no code reference). - Remove the explicit snakeyaml dependency and the snakeyaml.version property. SnakeYAML now resolves transitively (and optional) through jackson-dataformat-yaml at the version Jackson's BOM picks (2.5), which version-aligns it with the rest of the Jackson stack. - Add Javadoc on ConfigLoader.loadConfigWithEnv documenting the optional-dep requirement and the NoClassDefFoundError it raises when YAML support is requested without jackson-dataformat-yaml on the classpath. Consumer impact: callers that loaded YAML through ConfigLoader, or that relied on jackson-module-jsonSchema / snakeyaml flowing transitively through GraphCompose, must add those dependencies explicitly. Gates: 1031 tests pass; dependency:tree shows jackson-dataformat-yaml + snakeyaml as optional, no jackson-module-jsonSchema; japicmp vs v1.6.6 reports semver OK (no incompatible changes).
d08d348 to
bde182d
Compare
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
Continues the v1.6.7 dependency-cleanup cycle. Implements track
F4 from the readiness taskboard using the
F1 audit as input.
What changed
jackson-dataformat-yaml→<optional>true</optional>. Itsonly consumer is
ConfigLoader.loadConfigWithEnv(...)on theYAML code path. Library consumers that load JSON configs (or
skip
ConfigLoaderaltogether) no longer pay the ~1.7 MBSnakeYAML transitive cost. Mirrors the existing
poi-ooxmloptional-pattern.
jackson-module-jsonSchema— no reachable code pathreferences it.
snakeyamldependency + thesnakeyaml.versionproperty. SnakeYAML now resolvestransitively (also optional) through
jackson-dataformat-yamlat the version the Jackson BOM picks (2.5), keeping it
version-aligned with the rest of the Jackson stack.
ConfigLoaderJavadoc now states the YAML path requiresjackson-dataformat-yamlon the classpath and throwsNoClassDefFoundErrorwhen the optional dep is absent.Consumer impact
Callers that loaded YAML configs through
ConfigLoader, or thatrelied on
jackson-module-jsonSchema/snakeyamlflowingtransitively through GraphCompose, must declare those dependencies
explicitly.
Test plan
./mvnw test -pl .— 1031 tests, 0 failures, 0 errors./mvnw dependency:tree -pl .—jackson-dataformat-yaml:2.21.3:compile (optional)andsnakeyaml:2.5:compile (optional)present; nojackson-module-jsonSchemain tree../mvnw verify -pl . -P japicmp— semver OK vs v1.6.6.