Skip to content

doctool: propagate errors from inspectAllTastyFiles #495

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
wants to merge 2 commits into
base: lts-3.3
Choose a base branch
from

Conversation

katrinafyi
Copy link

it's not pretty, but it does work. reported errors in inspectAllTastyFiles will now cause errors in scaladoc.

honestly, i can't tell if continuing past tasty errors was the intended behaviour or not. however, tasty failures will prevent scaladoc generation, so it doesn't seem useful to continue in the presence of tasty errors.

tested with:

sbt 'scaladoc/runMain dotty.tools.scaladoc.Main ./bad -d a -siteroot empty'

and it will produce something like

-- Error: src/main/scala/Main.scala:26:12 --------------------------------------
undefined: m.parse # -1: TermRef(TermRef(NoPrefix,val m),parse) at readTasty
1 error found
Failure
[error] nonzero exit code returned from runner: 1
[error] (scaladoc / Compile / runMain) nonzero exit code returned from runner: 1

related to scala#23561

it's not pretty, but it does work.

tested with:
```
sbt 'scaladoc/runMain dotty.tools.scaladoc.Main ./bad -d a -siteroot empty'
```
and it will produce something like
```
-- Error: src/main/scala/Main.scala:26:12 --------------------------------------
undefined: m.parse # -1: TermRef(TermRef(NoPrefix,val m),parse) at readTasty
1 error found
Failure
[error] nonzero exit code returned from runner: 1
[error] (scaladoc / Compile / runMain) nonzero exit code returned from runner: 1
```
Co-authored-by: Tomasz Godzik <[email protected]>
@katrinafyi
Copy link
Author

By merely enabling the errors without fixing other bugs, the failures which were previously ignored (and led to broken docs) will now fail the build. This isn't great.

What prevented #95 from getting merged, do you remember?

@tgodzik
Copy link

tgodzik commented Jul 24, 2025

What prevented #95 from getting merged, do you remember?

I think there was too many conflicts there and couldn't make it work in a sensible amount of time.

@tgodzik
Copy link

tgodzik commented Jul 24, 2025

Looks like one of the community builds failed, we might need to backport more of the changes then. Dig into all the scaladoc changes that were not backported 🤔 I will retry it later after backporting the current changes

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

Successfully merging this pull request may close these issues.

2 participants