JOOQ作为Scala 3中的依赖性是损坏的吗?

发布于 2025-02-12 15:04:03 字数 1816 浏览 0 评论 0 原文

我正在尝试将JOOQ用作Scala 3代码库中的依赖项:

liberdyDeppentencies ++ = seq(“ org.jooq”%jooQ“ jooq”%“ 3.16.6”)

,但是当我尝试做一个从此库中导入 - 例如导入org.jooq.dslcontext - 我遇到了一个汇编错误。

重现这种重现的最简单方法是使用Ammonite:

cs launch ammonite --scala 3.1.3
Loading...
Welcome to the Ammonite Repl 2.5.4-11-4f5bf2aa (Scala 3.1.3 Java 11.0.15)
@ import $ivy.`org.jooq:jooq:3.16.6`, org.jooq.DSLContext 
Bad symbolic reference. A signature
refers to ApiStatus/T in package org.jetbrains.annotations which is not available.
It may be completely missing from the current classpath, or the version on
the classpath might be incompatible with the version used when compiling the signature.
Caught: java.lang.AssertionError: assertion failed: failure to resolve inner class:
externalName = org.jetbrains.annotations.ApiStatus$Experimental,
outerName = org.jetbrains.annotations.ApiStatus,
innerName = Experimental
owner.fullName = org.jetbrains.annotations.ApiStatus
while parsing /Users/horta/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/jooq/jooq/3.16.6/jooq-3.16.6.jar(org/jooq/Named.class) while parsing annotations in /Users/horta/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/jooq/jooq/3.16.6/jooq-3.16.6.jar(org/jooq/Named.class)
Caught: java.lang.RuntimeException: bad constant pool index: 0 at pos: 740 while parsing annotations in /Users/horta/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/jooq/jooq/3.16.6/jooq-3.16.6.jar(org/jooq/Named.class)
...

这不是完全错误,它在一系列不同的类别上会产生相同类型的错误,总是与此注释 org.jetbrains.annotations.annotations.apistatus.apistatus.permentiment.perimenty

我使用Java 11和18(OpenJDK)(使用SBT和Ammonite)重现了此版本,所有版本的Scala 3。 当使用Scala 2.13。*一切正常工作时,我们在生产中使用它。

知道这里可能会发生什么吗?是否有潜在的线索或可能的解决方法?

I am trying to use jOOQ as dependency in a Scala 3 codebase:

libraryDependencies ++= Seq("org.jooq" % "jooq" % "3.16.6")

However when I try to do an import from this library -- like import org.jooq.DSLContext -- I get a compilation error.

The easiest way to reproduce this is using ammonite:

cs launch ammonite --scala 3.1.3
Loading...
Welcome to the Ammonite Repl 2.5.4-11-4f5bf2aa (Scala 3.1.3 Java 11.0.15)
@ import $ivy.`org.jooq:jooq:3.16.6`, org.jooq.DSLContext 
Bad symbolic reference. A signature
refers to ApiStatus/T in package org.jetbrains.annotations which is not available.
It may be completely missing from the current classpath, or the version on
the classpath might be incompatible with the version used when compiling the signature.
Caught: java.lang.AssertionError: assertion failed: failure to resolve inner class:
externalName = org.jetbrains.annotations.ApiStatus$Experimental,
outerName = org.jetbrains.annotations.ApiStatus,
innerName = Experimental
owner.fullName = org.jetbrains.annotations.ApiStatus
while parsing /Users/horta/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/jooq/jooq/3.16.6/jooq-3.16.6.jar(org/jooq/Named.class) while parsing annotations in /Users/horta/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/jooq/jooq/3.16.6/jooq-3.16.6.jar(org/jooq/Named.class)
Caught: java.lang.RuntimeException: bad constant pool index: 0 at pos: 740 while parsing annotations in /Users/horta/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/jooq/jooq/3.16.6/jooq-3.16.6.jar(org/jooq/Named.class)
...

This is not the complete error, it gives the same type of error on a bunch of different classes, always related with this annotation org.jetbrains.annotations.ApiStatus.Experimental.

I've reproduced this using Java 11 and 18 (openjdk), using SBT and ammonite, with all versions of Scala 3.
When using Scala 2.13.* everything works correctly, we're using that in production.

Any idea what might be going on here? Any potential clues or possible workarounds?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

桃气十足 2025-02-19 15:04:03

从版本 3.2.0-RC1 中的Scala 3中修复了这一点。

参见中。

This is fixed in Scala 3 from version 3.2.0-RC1.

See reddit post in r/scala.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文