Skip to content

build: jackson-yaml optional, drop unused jsonSchema + direct snakeyaml (F4)#109

Merged
DemchaAV merged 1 commit into
developfrom
chore/jackson-yaml-optional
Jun 1, 2026
Merged

build: jackson-yaml optional, drop unused jsonSchema + direct snakeyaml (F4)#109
DemchaAV merged 1 commit into
developfrom
chore/jackson-yaml-optional

Conversation

@DemchaAV
Copy link
Copy Markdown
Owner

@DemchaAV DemchaAV commented Jun 1, 2026

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>. Its
    only consumer is ConfigLoader.loadConfigWithEnv(...) on the
    YAML code path. Library consumers that load JSON configs (or
    skip ConfigLoader altogether) no longer pay the ~1.7 MB
    SnakeYAML transitive cost. Mirrors the existing poi-ooxml
    optional-pattern.
  • Removed jackson-module-jsonSchema — no reachable code path
    references it.
  • Removed the explicit snakeyaml dependency + the
    snakeyaml.version property. SnakeYAML now resolves
    transitively (also optional) through jackson-dataformat-yaml
    at the version the Jackson BOM picks (2.5), keeping it
    version-aligned with the rest of the Jackson stack.
  • ConfigLoader Javadoc now states the YAML path requires
    jackson-dataformat-yaml on the classpath and throws
    NoClassDefFoundError when the optional dep is absent.

Consumer impact

Callers that loaded YAML configs through ConfigLoader, or that
relied on jackson-module-jsonSchema / snakeyaml flowing
transitively 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) and
    snakeyaml:2.5:compile (optional) present; no
    jackson-module-jsonSchema in tree.
  • ./mvnw verify -pl . -P japicmp — semver OK vs v1.6.6.

@DemchaAV DemchaAV force-pushed the chore/jackson-yaml-optional branch from b4e874c to d08d348 Compare June 1, 2026 11:21
…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).
@DemchaAV DemchaAV force-pushed the chore/jackson-yaml-optional branch from d08d348 to bde182d Compare June 1, 2026 11:49
@DemchaAV DemchaAV merged commit 7da68ba into develop Jun 1, 2026
11 checks passed
@DemchaAV DemchaAV deleted the chore/jackson-yaml-optional branch June 1, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant