Skip to content

scaladoc generates warnings: No DRI found for query: ... #17578

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

Open
reid-spencer opened this issue May 24, 2023 · 5 comments
Open

scaladoc generates warnings: No DRI found for query: ... #17578

reid-spencer opened this issue May 24, 2023 · 5 comments

Comments

@reid-spencer
Copy link

Compiler version

3.3.0-RC6

Minimized code

The symptom occurs in https://github.com/reactific/riddl/testkit only. Other modules in that repository do not produce the symptomatic warnings. The warnings relate to code locations within the compiler, not within in the input source.

Output

[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:1301:13 ---
[warn] No DRI found for query: TestPendingException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:1091:13 ---
[warn] No DRI found for query: NullArgumentException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:1072:13 ---
[warn] No DRI found for query: NullArgumentException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:1053:13 ---
[warn] No DRI found for query: NullArgumentException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:757:13 ----
[warn] No DRI found for query: TestFailedException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:983:13 ----
[warn] No DRI found for query: TestFailedException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:959:13 ----
[warn] No DRI found for query: TestFailedException
[warn] -- Warning: dotty/wordspec/target/scala-3/src_managed/main/org/scalatest/wordspec/AnyWordSpecLike.scala:1110:25 
[warn] No DRI found for query: NullArgumentException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:1153:13 ---
[warn] No DRI found for query: NullArgumentException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:1134:13 ---
[warn] No DRI found for query: NullArgumentException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:1115:13 ---
[warn] No DRI found for query: NullArgumentException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:531:13 ----
[warn] No DRI found for query: NullArgumentException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:472:13 ----
[warn] No DRI found for query: TestFailedException
[warn] -- Warning: dotty/wordspec/target/scala-3/src_managed/main/org/scalatest/wordspec/AnyWordSpecLike.scala:1230:15 
[warn] No DRI found for query: NullArgumentException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:632:13 ----
[warn] No DRI found for query: NullArgumentException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:579:13 ----
[warn] No DRI found for query: TestCanceledException
[warn] -- Warning: dotty/wordspec/target/scala-3/src_managed/main/org/scalatest/wordspec/AnyWordSpecLike.scala:1186:25 
[warn] No DRI found for query: NullArgumentException
[warn] -- Warning: dotty/core/target/scala-3/src_managed/main/org/scalatest/Suite.scala:758:12 
[warn] No DRI found for query: NullArgumentException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:818:13 ----
[warn] No DRI found for query: TestFailedException
[warn] -- Warning: dotty/core/src/main/scala/org/scalatest/Assertions.scala:1195:6 ----
[warn] No DRI found for query: NullArgumentException
[warn] 20 warnings found

Expectation

The warnings are not put out.

@reid-spencer reid-spencer added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels May 24, 2023
@julienrf julienrf added area:doctool and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels May 25, 2023
@julienrf
Copy link
Contributor

@Dedelweiss Could you have a look at this issue?

@Dedelweiss
Copy link
Contributor

Dedelweiss commented May 25, 2023

So from what I've noticed in my tests. I don't think the problem comes directly from Dotty but from the Scalatest comments used by Scaladoc. In fact, I've isolated the problem in a smaller project with the scalatest dependency and the Assertion and AnyWordSpec imports and I end up with the same warnings.
Screenshot 2023-05-25 at 21 37 05
Screenshot 2023-05-25 at 21 37 11

I think it's the @throws that are incorrectly handled or something like that. I'll take a deeper look and see what I can do.
In Scalatest.Assertions.scala:
Screenshot 2023-05-25 at 21 38 46

@Dedelweiss
Copy link
Contributor

Dedelweiss commented May 30, 2023

Hello @reid-spencer, thank you for waiting. The problem does indeed come from Scalatest (and perhaps Dotty too). I'll see later if it's an Issue but currently Scaladoc can't make the link to the classes in the throws parameter of the comments if there isn't a complete path.
So I've made a PR on Scalatest to correct it, erase the warning and now I just have to wait for it to pass.
I'll keep you informed of any progress. Thank you very much.

@julienrf
Copy link
Contributor

It seems in Scala 2 it was possible to use a symbol in a Scaladoc directive without writing its fully qualified name if the symbol was previously imported. It would be good to support the same in Scala 3. Do you know what it would take?

@reid-spencer
Copy link
Author

@ Dedelweiss & julienrf
Thanks for the analysis. I have noted in Scala2, many times, that a fully qualified name is needed in references to code. Your help is appreciated but I don't think this is a major issue, unlike #17577 which is a blocker for me.

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

No branches or pull requests

4 participants