Fix scaladoc TastyInspector regressions #21716
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #20476 (which would previously crash in the
ReadTasty
phase) and #18231 (LTS-only issue, only applicable after backport)Adds an
inspectAllTastyFilesInContext
method in scaladoc-only version of TastyInspector (similarly to how it was before #18989, where the regressions were introduced). I still do not know the exact reason why those regressions happen, but I think this is kind of a fix is better than a whole revert we would have to do otherwise.Notably, those issues are not being fixed in the stable TastyInspector - this is scaladoc only.
Also the scaladoc copy of the TastyInspector had to be renamed, as otherwise we run into classpath issues with the stable tasty inspector taking precedence.
I really wanted to include the test for both issues, but both required non-standard specification, so I could not use
scaladoc-testcases
and ended up having to use sbt scripted tests unfortunately.