gilcloud / sbt-gitlab

sbt plugin to allow dependency resolution and artifact publishing for gitlab
Apache License 2.0
26 stars 20 forks source link

sbt-gitlab is not compatible with sbt 1.7.0+ #30

Closed kyusu closed 1 year ago

kyusu commented 2 years ago

Using sbt in version 1.7.0 or above breaks this plugin as it relies on okhttp3 which has been dropped from 1.7.0

resulting stack trace

java.lang.NoClassDefFoundError: okhttp3/Interceptor
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:398)
    at sbt.internal.inc.ModuleUtilities$.getObject(ModuleUtilities.scala:24)
    at sbt.internal.inc.ModuleUtilities$.getCheckedObject(ModuleUtilities.scala:32)
    at sbt.internal.inc.ModuleUtilities$.$anonfun$getCheckedObjects$1(ModuleUtilities.scala:37)
    at scala.collection.immutable.Stream.$anonfun$map$1(Stream.scala:418)
    at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1173)
    at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1163)
    at scala.collection.generic.Growable.loop$1(Growable.scala:57)
    at scala.collection.generic.Growable.$plus$plus$eq(Growable.scala:61)
    at scala.collection.generic.Growable.$plus$plus$eq$(Growable.scala:53)
    at scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:184)
    at scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:47)
    at scala.collection.TraversableLike.to(TraversableLike.scala:786)
    at scala.collection.TraversableLike.to$(TraversableLike.scala:783)
    at scala.collection.AbstractTraversable.to(Traversable.scala:108)
    at scala.collection.TraversableOnce.toList(TraversableOnce.scala:350)
    at scala.collection.TraversableOnce.toList$(TraversableOnce.scala:350)
    at scala.collection.AbstractTraversable.toList(Traversable.scala:108)
    at scala.collection.immutable.List.$plus$plus(List.scala:216)
    at sbt.internal.PluginDiscovery$.discoverAll(PluginDiscovery.scala:58)
    at sbt.internal.Load$.loadPlugins(Load.scala:1329)
    at sbt.internal.Load$.loadPluginDefinition(Load.scala:1274)
    at sbt.internal.Load$.buildPlugins(Load.scala:1253)
    at sbt.internal.Load$.plugins(Load.scala:1232)
    at sbt.internal.Load$.$anonfun$loadUnit$2(Load.scala:700)
    at sbt.internal.Load$.timed(Load.scala:1406)
    at sbt.internal.Load$.$anonfun$loadUnit$1(Load.scala:700)
    at sbt.internal.Load$.timed(Load.scala:1406)
    at sbt.internal.Load$.loadUnit(Load.scala:694)
    at sbt.internal.Load$.$anonfun$builtinLoader$4(Load.scala:492)
    at sbt.internal.BuildLoader$.$anonfun$componentLoader$5(BuildLoader.scala:180)
    at sbt.internal.BuildLoader.apply(BuildLoader.scala:245)
    at sbt.internal.Load$.loadURI$1(Load.scala:554)
    at sbt.internal.Load$.loadAll(Load.scala:570)
    at sbt.internal.Load$.loadURI(Load.scala:500)
    at sbt.internal.Load$.load(Load.scala:479)
    at sbt.internal.Load$.$anonfun$apply$1(Load.scala:241)
    at sbt.internal.Load$.timed(Load.scala:1406)
    at sbt.internal.Load$.apply(Load.scala:241)
    at sbt.internal.Load$.defaultLoad(Load.scala:56)
    at sbt.BuiltinCommands$.liftedTree1$1(Main.scala:953)
    at sbt.BuiltinCommands$.doLoadProject(Main.scala:953)
    at sbt.BuiltinCommands$.$anonfun$loadProjectImpl$2(Main.scala:906)
    at sbt.Command$.$anonfun$applyEffect$4(Command.scala:150)
    at sbt.Command$.$anonfun$applyEffect$2(Command.scala:145)
    at sbt.Command$.process(Command.scala:189)
    at sbt.MainLoop$.$anonfun$processCommand$5(MainLoop.scala:245)
    at scala.Option.getOrElse(Option.scala:189)
    at sbt.MainLoop$.process$1(MainLoop.scala:245)
    at sbt.MainLoop$.processCommand(MainLoop.scala:278)
    at sbt.MainLoop$.$anonfun$next$5(MainLoop.scala:163)
    at sbt.State$StateOpsImpl$.runCmd$1(State.scala:289)
    at sbt.State$StateOpsImpl$.process$extension(State.scala:325)
    at sbt.MainLoop$.$anonfun$next$4(MainLoop.scala:163)
    at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
    at sbt.MainLoop$.next(MainLoop.scala:163)
    at sbt.MainLoop$.run(MainLoop.scala:144)
    at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:119)
    at sbt.io.Using.apply(Using.scala:27)
    at sbt.MainLoop$.runWithNewLog(MainLoop.scala:112)
    at sbt.MainLoop$.runAndClearLast(MainLoop.scala:66)
    at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:51)
    at sbt.MainLoop$.runLogged(MainLoop.scala:42)
    at sbt.StandardMain$.runManaged(Main.scala:215)
    at sbt.xMain$.$anonfun$run$11(Main.scala:133)
    at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
    at scala.Console$.withIn(Console.scala:230)
    at sbt.internal.util.Terminal$.withIn(Terminal.scala:577)
    at sbt.internal.util.Terminal$.$anonfun$withStreams$1(Terminal.scala:358)
    at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
    at scala.Console$.withOut(Console.scala:167)
    at sbt.internal.util.Terminal$.$anonfun$withOut$2(Terminal.scala:567)
    at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
    at scala.Console$.withErr(Console.scala:196)
    at sbt.internal.util.Terminal$.withOut(Terminal.scala:567)
    at sbt.internal.util.Terminal$.withStreams(Terminal.scala:358)
    at sbt.xMain$.withStreams$1(Main.scala:87)
    at sbt.xMain$.run(Main.scala:121)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at sbt.internal.XMainConfiguration.run(XMainConfiguration.java:57)
    at sbt.xMain.run(Main.scala:46)
    at xsbt.boot.Launch$.$anonfun$run$1(Launch.scala:149)
    at xsbt.boot.Launch$.withContextLoader(Launch.scala:176)
    at xsbt.boot.Launch$.run(Launch.scala:149)
    at xsbt.boot.Launch$.$anonfun$apply$1(Launch.scala:44)
    at xsbt.boot.Launch$.launch(Launch.scala:159)
    at xsbt.boot.Launch$.apply(Launch.scala:44)
    at xsbt.boot.Launch$.apply(Launch.scala:21)
    at xsbt.boot.Boot$.runImpl(Boot.scala:78)
    at xsbt.boot.Boot$.run(Boot.scala:73)
    at xsbt.boot.Boot$.main(Boot.scala:21)
    at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.lang.ClassNotFoundException: okhttp3.Interceptor
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 96 more
listba commented 2 years ago

@gilandose Any chance we could get a fix in for this? I'm willing to work on it / make a pr. Just dont want to spend the time digging into this without knowing it will get merged in.

gilandose commented 2 years ago

Will certainly merge on if a PR is raised yep

On Tue, 23 Aug 2022, 23:21 Ben List, @.***> wrote:

@gilandose https://github.com/gilandose Any chance we could get a fix in for this? I'm willing to work on it / make a pr. Just dont want to spend the time digging into this without knowing it will get merged in.

— Reply to this email directly, view it on GitHub https://github.com/gilcloud/sbt-gitlab/issues/30#issuecomment-1224949189, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXUPC5PLG2SJI55BJRGFZTV2VFIPANCNFSM53NQW6GA . You are receiving this because you were mentioned.Message ID: @.***>

listba commented 2 years ago

fyi @kyusu or anyone else who stumbles upon this. I forked and published the fix for sbt 1.7 support over here:

https://github.com/TangramFlex/sbt-gitlab

esamson commented 2 years ago

Just sharing that I've also seen this fork (not mine) also has a fix for this issue:

https://github.com/azolotko/sbt-gitlab

gilandose commented 1 year ago

released 0.1.2