-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
slf4j missing uses constraints #682
Comments
A workaround is to make sure that only a single version of SLF4J is installed. |
That should be the goal also to ensure the logging works correctly. On the other hand that would make it impossible to use two libraries where one requires strictly slf4j<2 (because it has not yet updated its import-package ranges) and the other requires slf4j>=2. The logging will then likely be flaky, but if one does not care about that, it is not possible anymore. |
Is there anything to do on releng side here or it can be closed? |
I think so, the slf4j that platform now pulls in has no uses clauses (unlike the slf4j that orbit repackages). This leads to wiring errors. I understand the move away from orbit, but if the upstream package is missing uses clauses and we encourage consumers of slf4j to use import package, then we should ensure that uses clauses exist. |
I hope that someone will open issue against slf4j requesting uses clauses to be added. |
Thank you Jonah for string qos-ch/slf4j#324. |
New slf4j version with Jonah's change has been released qos-ch/slf4j@v_2.0.5...v_2.0.6 . Please provide the needed updates so we can finish this one. |
@HannesWell can you make this change in platform? |
Does it mean that Platform is going to switch to SLF4J 2.x? |
Yes, I do. But after looking in more detail in your change I noticed that it for example changed the BSN. At the moment slf4j has now a mixtured of generating the manifest and using static manifest files under version control. I have started to prepare a follow-up on your change and plan to complete it this evening, that completely migrates to generating the manifests, thus removing all static manifest files.
Yes, we do. See #588 But I'm considering (and bndtools/bnd#5477 (comment) strengthened this consideration) to ask SLF4J to export its packages in a 1.7.x version and 2 version, so that libaries that import slf4j below version 2 can just use slf4j-2 without changes. |
Created qos-ch/slf4j#327. |
I noticed this resolution failure (in Tycho 4.0.0-SNAPSHOT) when trying to fully resolve the requirements of
What is supposed to satisfy that requirement? |
The (reference) Implementation of the OSGi ServiceLoader Mediator specification I usually use is Apache Aries SPI-fly: That should provide that capabilty. |
Okay, that helps! With that included, it gets to this failure:
|
Do you have a recent SLF4J-provider in the TP? In case of Eclipse-Platform we probably want to only reference to no-op provider and let actual application/product builds choose a suitable one for them: |
That fixes the problem! You're the best. 🚀 |
Should this one be closed now? |
Unfortunately the metadata of the current slf4j-release are still different than before in same parts:
Therefore I'm not sure if we should use that version. |
Since version 2.0.7 the slf4j.api bundle exports the user-api package 'org.slf4j' in version 2.x.y and 1.7.36. This allows to also use libraries, which are programmed against slf4j-1 and import the package 'org.slf4j' with an exclusive upper bound of 2 like '[1.7,2)', with the slf4-api version 2 in OSGi environments. According to SLF4J the client/user facing API is compatible with slf4j-1: - https://www.slf4j.org/faq.html#changesInVersion200 - https://www.slf4j.org/faq.html#compatibility Only the logging-backends/bindings/providers have match the requirements of the specific slf4j version. The corresponding SLF4J issue and change is - https://jira.qos.ch/browse/SLF4J-579 - qos-ch/slf4j#331 Fixes eclipse-platform#588 Fixes eclipse-platform#682
The mentioned SLF4J PR is merged and released as slf4j-api 2.0.7. |
Since version 2.0.7 the slf4j.api bundle exports the user-api package 'org.slf4j' in version 2.x.y and 1.7.36. This allows to also use libraries, which are programmed against slf4j-1 and import the package 'org.slf4j' with an exclusive upper bound of 2 like '[1.7,2)', with the slf4-api version 2 in OSGi environments. According to SLF4J the client/user facing API is compatible with slf4j-1: - https://www.slf4j.org/faq.html#changesInVersion200 - https://www.slf4j.org/faq.html#compatibility Only the logging-backends/bindings/providers have match the requirements of the specific slf4j-api version in use. Since version 2 the slf4j-api uses the ServiceLoader mechanism and requires a 'Service Loader Mediator' implementation in an OSGi runtime. Therefore the Apache Aries SPI Fly Dynamic Weaving Bundle is added with this change. The corresponding SLF4J issue and change is - https://jira.qos.ch/browse/SLF4J-579 - qos-ch/slf4j#331 Fixes eclipse-platform#588 Fixes eclipse-platform#682
Since version 2.0.7 the slf4j.api bundle exports the user-api package 'org.slf4j' in version 2.x.y and 1.7.36. This allows to also use libraries, which are programmed against slf4j-1 and import the package 'org.slf4j' with an exclusive upper bound of 2 like '[1.7,2)', with the slf4-api version 2 in OSGi environments. According to SLF4J the client/user facing API is compatible with slf4j-1: - https://www.slf4j.org/faq.html#changesInVersion200 - https://www.slf4j.org/faq.html#compatibility Only the logging-backends/bindings/providers have match the requirements of the specific slf4j-api version in use. Since version 2 the slf4j-api uses the ServiceLoader mechanism and requires a 'Service Loader Mediator' implementation in an OSGi runtime. Therefore the Apache Aries SPI Fly Dynamic Weaving Bundle is added with this change. The corresponding SLF4J issue and change is - https://jira.qos.ch/browse/SLF4J-579 - qos-ch/slf4j#331 Fixes eclipse-platform#588 Fixes eclipse-platform#682
Since version 2.0.7 the slf4j.api bundle exports the user-api package 'org.slf4j' in version 2.x.y and 1.7.36. This allows to also use libraries, which are programmed against slf4j-1 and import the package 'org.slf4j' with an exclusive upper bound of 2 like '[1.7,2)', with the slf4-api version 2 in OSGi environments. According to SLF4J the client/user facing API is compatible with slf4j-1: - https://www.slf4j.org/faq.html#changesInVersion200 - https://www.slf4j.org/faq.html#compatibility Only the logging-backends/bindings/providers have match the requirements of the specific slf4j-api version in use. Since version 2 the slf4j-api uses the ServiceLoader mechanism and requires a 'Service Loader Mediator' implementation in an OSGi runtime. Therefore the Apache Aries SPI Fly Dynamic Weaving Bundle is added with this change. The corresponding SLF4J issue and change is - https://jira.qos.ch/browse/SLF4J-579 - qos-ch/slf4j#331 Fixes eclipse-platform#588 Fixes eclipse-platform#682
Since version 2.0.7 the slf4j.api bundle exports the user-api package 'org.slf4j' in version 2.x.y and 1.7.36. This allows to also use libraries, which are programmed against slf4j-1 and import the package 'org.slf4j' with an exclusive upper bound of 2 like '[1.7,2)', with the slf4-api version 2 in OSGi environments. According to SLF4J the client/user facing API is compatible with slf4j-1: - https://www.slf4j.org/faq.html#changesInVersion200 - https://www.slf4j.org/faq.html#compatibility Only the logging-backends/bindings/providers have match the requirements of the specific slf4j-api version in use. Since version 2 the slf4j-api uses the ServiceLoader mechanism and requires a 'Service Loader Mediator' implementation in an OSGi runtime. Therefore the Apache Aries SPI Fly Dynamic Weaving Bundle is added with this change. The corresponding SLF4J issue and change is - https://jira.qos.ch/browse/SLF4J-579 - qos-ch/slf4j#331 Fixes eclipse-platform#588 Fixes eclipse-platform#682
Since version 2.0.7 the slf4j.api bundle exports the user-api package 'org.slf4j' in version 2.x.y and 1.7.36. This allows to also use libraries, which are programmed against slf4j-1 and import the package 'org.slf4j' with an exclusive upper bound of 2 like '[1.7,2)', with the slf4-api version 2 in OSGi environments. According to SLF4J the client/user facing API is compatible with slf4j-1: - https://www.slf4j.org/faq.html#changesInVersion200 - https://www.slf4j.org/faq.html#compatibility Only the logging-backends/bindings/providers have match the requirements of the specific slf4j-api version in use. Since version 2 the slf4j-api uses the ServiceLoader mechanism and requires a 'Service Loader Mediator' implementation in an OSGi runtime. Therefore the Apache Aries SPI Fly Dynamic Weaving Bundle is added with this change. The corresponding SLF4J issue and change is - https://jira.qos.ch/browse/SLF4J-579 - qos-ch/slf4j#331 Fixes eclipse-platform#588 Fixes eclipse-platform#682
Since version 2.0.7 the slf4j.api bundle exports the user-api package 'org.slf4j' in version 2.x.y and 1.7.36. This allows to also use libraries, which are programmed against slf4j-1 and import the package 'org.slf4j' with an exclusive upper bound of 2 like '[1.7,2)', with the slf4-api version 2 in OSGi environments. According to SLF4J the client/user facing API is compatible with slf4j-1: - https://www.slf4j.org/faq.html#changesInVersion200 - https://www.slf4j.org/faq.html#compatibility Only the logging-backends/bindings/providers have match the requirements of the specific slf4j-api version in use. Since version 2 the slf4j-api uses the ServiceLoader mechanism and requires a 'Service Loader Mediator' implementation in an OSGi runtime. Therefore the Apache Aries SPI Fly Dynamic Weaving Bundle is added with this change. The corresponding SLF4J issue and change is - https://jira.qos.ch/browse/SLF4J-579 - qos-ch/slf4j#331 Fixes eclipse-platform#588 Fixes eclipse-platform#682
Since version 2.0.7 the slf4j.api bundle exports the user-api package 'org.slf4j' in version 2.x.y and 1.7.36. This allows to also use libraries, which are programmed against slf4j-1 and import the package 'org.slf4j' with an exclusive upper bound of 2 like '[1.7,2)', with the slf4-api version 2 in OSGi environments. According to SLF4J the client/user facing API is compatible with slf4j-1: - https://www.slf4j.org/faq.html#changesInVersion200 - https://www.slf4j.org/faq.html#compatibility Only the logging-backends/bindings/providers have match the requirements of the specific slf4j-api version in use. Since version 2 the slf4j-api uses the ServiceLoader mechanism and requires a 'Service Loader Mediator' implementation in an OSGi runtime. Therefore the Apache Aries SPI Fly Dynamic Weaving Bundle is added with this change. The corresponding SLF4J issue and change is - https://jira.qos.ch/browse/SLF4J-579 - qos-ch/slf4j#331 Fixes eclipse-platform#588 Fixes eclipse-platform#682
Since version 2.0.7 the slf4j.api bundle exports the user-api package 'org.slf4j' in version 2.x.y and 1.7.36. This allows to also use libraries, which are programmed against slf4j-1 and import the package 'org.slf4j' with an exclusive upper bound of 2 like '[1.7,2)', with the slf4-api version 2 in OSGi environments. According to SLF4J the client/user facing API is compatible with slf4j-1: - https://www.slf4j.org/faq.html#changesInVersion200 - https://www.slf4j.org/faq.html#compatibility Only the logging-backends/bindings/providers have match the requirements of the specific slf4j-api version in use. Since version 2 the slf4j-api uses the ServiceLoader mechanism and requires a 'Service Loader Mediator' implementation in an OSGi runtime. Therefore the Apache Aries SPI Fly Dynamic Weaving Bundle is added with this change. The corresponding SLF4J issue and change is - https://jira.qos.ch/browse/SLF4J-579 - qos-ch/slf4j#331 Fixes eclipse-platform#588 Fixes eclipse-platform#682
The SLF4J is missing uses constraints. This leads to runtime errors like this (I added line breaks for readability) if there are multiple versions of slf4j installed.
The text was updated successfully, but these errors were encountered: