Skip to content
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

Scala 2.13/dotty compatibility #68

Open
zstone1 opened this issue Jun 8, 2020 · 5 comments
Open

Scala 2.13/dotty compatibility #68

zstone1 opened this issue Jun 8, 2020 · 5 comments
Labels

Comments

@zstone1
Copy link

zstone1 commented Jun 8, 2020

Hello,

I'm having a problem with scala versions. I'm trying to use KeymaeraX as a library (I want the parser, printer, expression subsitution, ect. All stuff from core). But I'm using it in a newer scala project. There seems to be a backwards incompatibility between scala 2.13 and scala 2.12 where the standard library broke some methods. Compiling works fine, but at runtime I get the error

[error] (run-main-0) java.lang.NoSuchMethodError: scala.collection.immutable.Seq$.apply(Lscala/collection/Seq;)Lscala/collection/GenTraversable;
[error] java.lang.NoSuchMethodError: scala.collection.immutable.Seq$.apply(Lscala/collection/Seq;)Lscala/collection/GenTraversable;
[error]         at edu.cmu.cs.ls.keymaerax.core.package$.<init>(package.scala:204)
[error]         at edu.cmu.cs.ls.keymaerax.core.package$.<clinit>(package.scala)
[error]         at edu.cmu.cs.ls.keymaerax.core.NamedSymbol.insistNamingConvention(Expression.scala:155)
[error]         at edu.cmu.cs.ls.keymaerax.core.NamedSymbol.insistNamingConvention$(Expression.scala:154)
[error]         at edu.cmu.cs.ls.keymaerax.core.BaseVariable.insistNamingConvention(Expression.scala:256)
[error]         at edu.cmu.cs.ls.keymaerax.core.BaseVariable.<init>(Expression.scala:257)
[error]         at edu.cmu.cs.ls.keymaerax.core.Variable$.apply(Expression.scala:252)
... a bunch of stuff from my code ...
[error]         at java.lang.reflect.Method.invoke(Method.java:498)

Looks like keymaera is using some deprecated methods.

Long story short, is there a plan to upgrade to a newer version of Scala? How hard would it be to fix these issues?

I'd try to post pull request myself, except that I don't reasonable access to mathematica on my dev machine. So the build fails catastrophically.

@rbohrer
Copy link
Member

rbohrer commented Jun 8, 2020

Hi,

I recently looked into upgrading Scala versions. Unfortunately, we depend on a number of libraries which have not released their own 2.13 versions. It is unclear when that would happen, because some of them (including a few surprisingly prominent packages) have maintainers who have not had much time for maintenance :'(

I'm not sure about the error message so I will leave that for others to chime in.

@zstone1
Copy link
Author

zstone1 commented Jun 8, 2020

Ah, that is not surprising. I guess everyone is waiting for scala 3 to do any real maintenance. Well, with no obvious path forward, I'll see about downgrading the other stuff. Thanks for the info.

@aplatzer
Copy link
Member

There is not much we can do about this until Scala itself is compatible.
While there is a fair amount of flexibility, a set of compatible scala, sbt etc versions for compiling is listed in the Building section of the README.md

@aplatzer
Copy link
Member

Applied wontfix label until Scala and libraries get more compatible

@EnguerrandPrebet
Copy link
Contributor

The latest KeYmaera X release now works with Scala 2.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants