guardian / guardian/simple-configuration
Update from 1.5.7 to 1.5.8 failed because of slf4j-api update (I think)
- Dominant language
- Scala
- Stars
- 14
- Forks
- 2
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 2
Description
Updating support-frontend’s dependency on this project from 1.5.7 to 1.5.8 failed with an error message about logs:
```
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J: Ignoring binding found at [jar:file:/Users/emily_bourke/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/ch/qos/logback/logback-classic/1.2.11/logback-classic-1.2.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.
[error] java.lang.ClassCastException: class org.slf4j.helpers.NOPLoggerFactory cannot be cast to class ch.qos.logback.classic.LoggerContext (org.slf4j.helpers.NOPLoggerFactory and ch.qos.logback.classic.LoggerContext are in unnamed module of loader play.runsupport.NamedURLClassLoader @46961f8d)
[error] at play.api.libs.logback.LogbackLoggerConfigurator.configure(LogbackLoggerConfigurator.scala:91)
[error] at play.api.libs.logback.LogbackLoggerConfigurator.init(LogbackLoggerConfigurator.scala:31)
[error] at play.core.server.DevServerStart$.$anonfun$mainDev$1(DevServerStart.scala:106)
[error] at play.utils.Threads$.withContextClassLoader(Threads.scala:22)
[error] at play.core.server.DevServerStart$.mainDev(DevServerStart.scala:76)
[error] at play.core.server.DevServerStart$.mainDevHttpMode(DevServerStart.scala:50)
[error] at play.core.server.DevServerStart.mainDevHttpMode(DevServerStart.scala)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[error] at play.runsupport.Reloader$.startDevMode(Reloader.scala:306)
[error] at play.sbt.run.PlayRun$.devModeServer$lzycompute$1(PlayRun.scala:100)
[error] at play.sbt.run.PlayRun$.devModeServer$1(PlayRun.scala:83)
[error] at play.sbt.run.PlayRun$.$anonfun$playRunTask$3(PlayRun.scala:107)
[error] at play.sbt.run.PlayRun$.$anonfun$playRunTask$3$adapted(PlayRun.scala:67)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] stack trace is suppressed; run last Compile / run for the full output
[error] (Compile / run) java.lang.reflect.InvocationTargetException
[error] Total time: 49 s, completed 6 Sep 2023, 11:52:21
```
I think this is because of [the increase in the slf4j-api dependency version](https://github.com/guardian/simple-configuration/commit/ae49fb2aa806057a46d4083b3ad288e1f60c2d7a). Should that dependency upgrade cause a minor or major version bump (now or in future), to signal that it may cause breakage? From reading a bit about semantic versioning, I don’t think it’s required, but I wanted to create an issue to start a discussion about it anyway.
(I’m also not too familiar with slf4j and logback, so this may be a known issue!)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the slf4j-api dependency change in commit ae49fb2aa806057a46d4083b3ad288e1f60c2d7a and the reported stack trace, especially LogbackLoggerConfigurator.scala. Reproduce the support-frontend update from 1.5.7 to 1.5.8 and determine whether the dependency change causes the logging incompatibility. Done means reaching a supported compatibility or versioning decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100