-
Notifications
You must be signed in to change notification settings - Fork 81
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
Errors with Scala 3 nightly versions #525
Comments
So, my issue was slightly different but I did trace it down to some things. Say, you have a file test.md
We can reproduce the problem above on stable Scala 3 using nothing but Coursier: ➜ ~ java -version
openjdk version "11.0.12" 2021-07-20 LTS
OpenJDK Runtime Environment Zulu11.50+19-CA (build 11.0.12+7-LTS)
OpenJDK 64-Bit Server VM Zulu11.50+19-CA (build 11.0.12+7-LTS, mixed mode)
➜ ~ java -cp $(cs fetch -p org.scalameta:mdoc_3:2.2.23) mdoc.Main --in test.md
info: Compiling 1 file to /Users/velvetbaldmime/out
error:
test.md:2 (mdoc generated code)
package scala.compiletime does not have a member method summonFrom
object MdocSession extends _root_.mdoc.internal.document.DocumentBuilder {
error:
test.md:2 (mdoc generated code)
package scala.compiletime does not have a member method erasedValue
object MdocSession extends _root_.mdoc.internal.document.DocumentBuilder {
... Now, I suspect these is where the issues bifurcate: the OP's issue might be down to a problem in coursier's resolution: ➜ cs resolve org.scalameta::mdoc:2.2.23 --scala-version 3 | ack 'compiler|library'
org.scala-lang:scala-compiler:2.13.6:default
org.scala-lang:scala-library:2.13.6:default
➜ cs resolve org.scalameta:mdoc_3:2.2.23 --scala-version 3 | ack 'compiler|library'
org.scala-lang:scala-compiler:2.13.6:default
org.scala-lang:scala-library:2.13.6:default
org.scala-lang:scala3-compiler_3:3.0.1:default
org.scala-lang:scala3-library_3:3.0.1:default
org.scala-sbt:compiler-interface:1.3.5:default Notably, I think the issue above is caused by incorrectly formed classpath that is missing scala3-library It seems that in this case mdoc is just not picking up the classpath correctly from CLI (and it's different behaviour from 2.13), and as such it can be fixed by giving it the classpath in properties:
So the clue here is incorrect |
I can't find anything about
Not sure I understand, it seems to be present on the classpath, isin't it? Isn't the main issue that we bring both Scala 2 and 3 compiler on the same classpath for |
That would be coursier, when resolving with
So from coursier's perspective (which is a separate bug) it's present only if you manually resolve with On the other hand, only adding the full classpath to I don't think the 2 compilers stuff actually affects it - IIRC this is due to Scalameta being on 2.13 only, and it sort of worked this way since we added the support for Scala 3 to mdoc. |
I think this happened again, but for stable 3.1.0 in https://github.com/typelevel/cats-effect/pull/2428/checks?check_run_id=3927359459#step:10:22 |
@vincenzobaz could you try the latest mdoc release? I think this one should be fixed by #568 |
@dos65 I can still produce the error with this config. |
@vincenzobaz before we release new mdoc, can you test with the following snapshot: |
I obtain the following errors:
The text was updated successfully, but these errors were encountered: