-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Dottydoc fails to read symbol in scalajs project on RC2 #11943
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
Comments
Without cats-effect: import scala.scalajs.js.{|, defined, Function1, Promise, Thenable}
trait Foo {
def bar[A](p: Promise[A]) = {
val onFulfilled: Function1[A, Unit | Thenable[Unit]] = ???
val onRejected: Function1[Any, Unit | Thenable[Unit]] = ???
p.`then`[Unit](onFulfilled, defined(onRejected))
}
} Seems to have been working before #11671 |
Same problem is happening in playframework/play-json#590
Workaround there was to provide missing argument for |
I'm getting a very similar error in this file: https://github.com/tulz-app/frontroute/blob/5cd37701c6203cf1a6679960cf17f2f63f114bf3/src/main/scala/io/frontroute/RouteLocation.scala
A workaround for me was to change line 35 to be |
Standalone simpler version of the above: import scala.scalajs.js
final case class RouteLocation(loc: String, state: js.UndefOr[js.Any])
object RouteLocation:
def apply(loc: String): RouteLocation = RouteLocation(loc, js.undefined) |
I've tried to compile @djspiewak problematic project from tasty with command:
And got following error log:
So for me it looks like it's not directly related to doctool but TASTY file is invalid and causes errors when you try to compile from tasty. |
Looks like you're compiling without the scala.js standard library on the classpath. |
You're right, I've added js library on classpath, but still I get errors
|
No idea what's going on but you probably also need |
Actually I've tried to use |
Yes, that's normal, there's no Scala 3 version of scalajs-library and Scala 3 Scala.js projects always depend on the 2.13 version. |
For anyone landing here: the fix for this issue requires a new sbt release (sbt/sbt#6499), meanwhile you can disable scaladoc generation on scala 3 to work around the problem: Compile / doc / sources := {
if (scalaVersion.value.startsWith("3"))
Seq() // disabled to work around https://github.com/lampepfl/dotty/issues/11943
else
(Compile / doc / sources).value
} |
Is this fixed when using sbt 1.5.3 then? (it was released today and seems to include the PR you linked to) |
@sjrd I tried 1.5.3 and have the same error:
|
You need to try it with a nightly of the compiler too ( |
Closing since this should be fixed in 3.0.1-RC1 / sbt 1.5.3 |
Not very minimized, sorry. Here is the exact line and commit hash: https://github.com/typelevel/cats-effect/blob/dedfedecf843e4272488eeaa71581d64eeb08194/kernel/js/src/main/scala/cats/effect/kernel/AsyncPlatform.scala#L38 This compiles and runs just fine on 2.12, 2.13, RC1, and RC2. However, when I attempt to run
sbt doc
, it errors here.The text was updated successfully, but these errors were encountered: