[slf4j-dev] [JIRA] Updates for SLF4J-578: Restore full binary compatibility and add baseline-tooling to enforce it in the future

QOS.CH (JIRA) noreply-jira at qos.ch
Tue Mar 14 11:15:00 CET 2023


SLF4J / SLF4J-578 [Open]
Restore full binary compatibility and add baseline-tooling to enforce it in the future

==============================

Here's what changed in this issue in the last few minutes.

This issue has been created

There are 2 comments.
This issue is now assigned to you.


View or comment on issue using this link
https://jira.qos.ch/browse/SLF4J-578

==============================
 Issue created
------------------------------

Ceki Gülcü created this issue on 14/Mar/23 11:09 AM

Summary:              Restore full binary compatibility and add baseline-tooling to enforce it in the future
Issue Type:           Bug
Assignee:             SLF4J developers list
Created:              14/Mar/23 11:09 AM
Priority:             Major
Reporter:             Ceki Gülcü
Description:
  Reporter:             Hannes Wellmann
  
    The documentation claims that SLF4-2 is binary compatible to slf4j-1, from a client perspective:
     * [https://www.slf4j.org/faq.html#compatibility]
     * [https://www.slf4j.org/faq.html#changesInVersion200]
  
    But for example [LoggingEvent.getMarker() in [slf4j-1.7|https://github.com/qos-ch/slf4j/blob/e9ee55cca93c2bf26f14482a9bdf961c750d2a56/slf4j-api/src/main/java/org/slf4j/event/LoggingEvent.java#L14]
  was changed to [LoggingEvent.getMarkers() in 
  slf4j-2|https://github.com/qos-ch/slf4j/blob/f85104040ce44ac545e15e4f41ef771a7a7f7add/slf4j-api/src/main/java/org/slf4j/event/LoggingEvent.java#L26]
  and now returns a List of Markers instead of a single Marker.
  
    This looks like a binary incompatible change to me. Would it be possible to
  restore the old {{getMarker()}} method as deprecated, in order to restore the
  binary compatibility?
  
    If you are interested, to avoid such changes in the future the
  [bnd-baseline-maven-plugin could help to avoid such change.
    |https://github.com/bndtools/bnd/tree/master/maven-plugins/bnd-baseline-maven-plugin]But
  I would have to find out first, if it is possible to perform the check like if
  the major version was not increment and thus removals are forbidden.
    Maybe this will also find other binary incompatible changes.
  
  

==============================
 2 comments
------------------------------

Ceki Gülcü on 14/Mar/23 11:13 AM

Ceki Gülcü on 15/Dec/22 8:33 PM
[~HannesWell] In version 1.7, LoggingEvent was used internally and in 2.0.0 it is intended for use by implementations via the fluent API. 



------------------------------

Ceki Gülcü on 14/Mar/23 11:14 AM

Hannes Wellmann on 16/Dec/22 3:05 PM
Thanks for the clearification and the false alarm.

Nevertheless are you interested in having some tooling support in the build to ensure binary compatibility?




==============================
 This message was sent by Atlassian Jira (v9.6.0#960000-sha1:a3ee8af)



More information about the slf4j-dev mailing list