Skip to content

Only declare logback-classic as a runtime dependency#95

Merged
sbesson merged 1 commit intoome:masterfrom
sbesson:logback_core_transitive_dependency
Jan 7, 2025
Merged

Only declare logback-classic as a runtime dependency#95
sbesson merged 1 commit intoome:masterfrom
sbesson:logback_core_transitive_dependency

Conversation

@sbesson
Copy link
Copy Markdown
Member

@sbesson sbesson commented Jan 5, 2025

In the current POM, logback-core and logback-classic and declared separately and bumped individually by the dependabot agent. This can be an issue for logback releases including backwards-incompatible API changes. This was the case in #93 and more recently in #94 where the GitHub Actions tests failed due to the backported removal of JaninoEventEvaluator in 1.3.15.

Given the strong coupling of logback-core and logback-classic, 0a4140f removes the declaration of logback-core from pom.xml. The version should now be resolved as a transitive dependency of logback-classic.

This means logback-core is managed as a transitive dependency of
logback-classic and the compatible version is resolved through
the dependency mechanism rather than being manually managed.
@sbesson sbesson requested a review from melissalinkert January 5, 2025 14:04
Copy link
Copy Markdown
Member

@melissalinkert melissalinkert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comparing the output of mvn dependency:tree, without this change I see:

[INFO] +- ch.qos.logback:logback-core:jar:1.3.14:compile (optional) 
[INFO] +- ch.qos.logback:logback-classic:jar:1.3.14:compile (optional) 

and with this change I see:

[INFO] +- ch.qos.logback:logback-classic:jar:1.3.14:compile (optional) 
[INFO] |  \- ch.qos.logback:logback-core:jar:1.3.14:compile (optional) 

@sbesson sbesson merged commit 2410006 into ome:master Jan 7, 2025
@sbesson sbesson deleted the logback_core_transitive_dependency branch January 7, 2025 08:36
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.

2 participants