Open ckipp01 opened 1 year ago
I just hit on this again, which is always frustrating. For example when trying to figure out https://github.com/lampepfl/dotty/pull/17469 you would just get the following error when running ./project/scripts/cmdScaladocTests
:
+ /Users/ckipp/Documents/scala-workspace/dotty/project/scripts/../../project/scripts/sbt scaladoc/generateTestcasesDocumentation
+ echo 'generated testcases project with sbt'
generated testcases project with sbt
Which made it seem like everything was fine, but then it'd fail with:
+ diff -rq /var/folders/fq/nx_jsnyd6550xp03czx898d40000gn/T/tmp.QIHVcfwc scaladoc/output/testcases
diff: scaladoc/output/testcases: No such file or directory
You'd have to actually step through everything to find that the issue was really this command:
sbt:scala3> scaladoc/generateTestcasesDocumentation
[error] stack trace is suppressed; run last scaladoc / generateTestcasesDocumentation for the full output
[error] (scaladoc / generateTestcasesDocumentation) sbt.internal.util.Init$RuntimeUndefined: References to undefined settings at runtime.
[error] ScopedKey(Scope(Select(ProjectRef(file:/Users/ckipp/Documents/scala-workspace/dotty/,dist)), Zero, Zero, Zero),pack) referenced from setting(ScopedKey(Scope(Select(ProjectRef(file:/Users/ckipp/Documents/scala-workspace/dotty/,scaladoc)), Zero, Zero, Zero),generateTestcasesDocumentation)) at LinePosition(/Users/ckipp/Documents/scala-workspace/dotty/project/Build.scala,1501)
[error] Total time: 0 s, completed 11 May 2023, 11:20:53
Compiler version
HEAD
Minimized example
There isn't a great way to minimize this, but this is related to the issues I'm having in https://github.com/lampepfl/dotty/pull/16846. If you're making changes to scaladoc and you need to test it, the scaladoc CI has a huge mess of bash scripts. The issue is that when something is going wrong, it gives no indication about what is happening or why something is failing. For example when you run the following:
which is ran in CI, if something is failing you'll just see the following:
So the problem is that no such file or directory exists? Well why not? You have to manually re-run this command with some slight changes to actually see that scaladoc is throwing:
This is a really difficult workflow for someone unfamiliar with scaladoc or how it's all supposed to work together and it buries the actual issue.
Expectation
I'd expect to be able to run the scaladoc tests locally and somewhat easily see why something is wrong without having to dive through a bunch of bash scripts and recreate the command that I need to run from scratch to mimic it.