Skip to content

Compilation fails #18

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

Closed
cgrigis opened this issue Sep 30, 2019 · 7 comments
Closed

Compilation fails #18

cgrigis opened this issue Sep 30, 2019 · 7 comments

Comments

@cgrigis
Copy link
Contributor

cgrigis commented Sep 30, 2019

I have this error when attempting compilation:

$ sbt universal:stage
[info] Loading settings for project global-plugins from metals.sbt,plugins.sbt ...
[info] Loading global plugins from /home/cgrigis/.sbt/1.0/plugins
[info] Loading settings for project smart-test-build from plugins.sbt ...
[info] Loading project definition from /home/cgrigis/C4DT/Projects/smart-test/project
[info] Updating ProjectRef(uri("file:/home/cgrigis/C4DT/Projects/smart-test/project/"), "smart-test-build")...
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] Loading settings for project root from build.sbt ...
[info] Set current project to root (in build file:/home/cgrigis/C4DT/Projects/smart-test/)
[info] Packaging /home/cgrigis/C4DT/Projects/smart-test/frontends/scalac/target/scala-2.12/stainless-scalac_2.12-0.3.2s-3-ge6f4350-javadoc.jar ...
[info] Done packaging.
[info] Packaging /home/cgrigis/C4DT/Projects/smart-test/frontends/scalac/target/scala-2.12/stainless-scalac_2.12-0.3.2s-3-ge6f4350-sources.jar ...
[info] Done packaging.
[info] Updating stainless-core...
[info] Done updating.
[info] Updating stainless-scalac...
[info] Done updating.
[info] Wrote /home/cgrigis/C4DT/Projects/smart-test/frontends/scalac/target/scala-2.12/stainless-scalac_2.12-0.3.2s-3-ge6f4350.pom
[info] Compiling 201 Scala sources to /home/cgrigis/C4DT/Projects/smart-test/core/target/scala-2.12/classes ...
[error] /home/cgrigis/C4DT/Projects/smart-test/core/src/main/scala/stainless/utils/StringUtils.scala:10:33: value mkString is not a member of java.util.stream.Stream[?0]
[error]     text.lines.map(prefix ++ _).mkString("\n")
[error]                                 ^
[error] one error found
[error] (stainless-core / Compile / compileIncremental) Compilation failed
[error] Total time: 22 s, completed 30 Sep 2019, 14:51:07

Anything wrong with my setup?

@jad-hamza
Copy link
Collaborator

It's working for me, but I saw that earlier you posted this: epfl-lara/stainless#706
Could it be due to the java version (running with version 8 for me)? We need to add/fix the checks for the java version

@romac
Copy link
Member

romac commented Sep 30, 2019

@cgrigis
Copy link
Contributor Author

cgrigis commented Oct 1, 2019

Could it be due to the java version (running with version 8 for me)? We need to add/fix the checks for the java version

Right, I forgot to mention it here (I thought about that too): I am running version 11:

$ java --version
openjdk 11.0.4 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Debian-1deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Debian-1deb10u1, mixed mode, sharing)

@cgrigis
Copy link
Contributor Author

cgrigis commented Oct 1, 2019

Looks related: scala/scala3/issues/5463

@romac
Copy link
Member

romac commented Oct 1, 2019

Yes it was due to the Java version returned by java -version not being in the form 1.X.Y anymore, rather X.Y (likely since Java 9 or 10).

Stainless should work fine on Java 11 (modulo some warnings about use of reflection due to ScalaZ3). It is however not compatible with Java 13 (but neither is sbt 1.3.0/Scala 2.13 if I am not mistaken).

@romac
Copy link
Member

romac commented Oct 1, 2019

Apologies, I thought the comment I was replying to was on epfl-lara/stainless#706.

Smart is probably on an older version of Stainless, where this was fixed in epfl-lara/stainless@38d4846.

@jad-hamza
Copy link
Collaborator

Fixed in #19 (please reopen if that's not the case)

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

No branches or pull requests

3 participants