Skip to content
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

Fix scaladoc tool on JDK 11 with -release 8: Exclude sig files in Symbol.sourceFile #8849

Merged
merged 1 commit into from May 8, 2020

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Apr 1, 2020

Fixes scala/bug#11927 (running scaladoc with on JDK 11 with -release 8). Scaladoc checks for the sourceFile here:

def templateShouldDocument(aSym: Symbol, inTpl: DocTemplateImpl): Boolean =
(aSym.isTrait || aSym.isClass || aSym.isModule || typeShouldDocument(aSym, inTpl)) &&
localShouldDocument(aSym) &&
!isEmptyJavaObject(aSym) &&
// either it's inside the original owner or we can document it later:
(!inOriginalOwner(aSym, inTpl) || (aSym.isPackageClass || (aSym.sourceFile != null)))

@lrytz lrytz requested a review from retronym April 1, 2020 09:32
@scala-jenkins scala-jenkins added this to the 2.12.12 milestone Apr 1, 2020
@lrytz
Copy link
Member Author

lrytz commented Apr 1, 2020

I tested it with akka-actor/doc (akka/akka#28848)

@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Apr 30, 2020
if (
(file eq NoAbstractFile) || {
val path = file.path
path.endsWith(".class") || path.endsWith(".sig")
Copy link
Member

@dwijnand dwijnand May 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aka FileUtils.endsClass(file.path).

But you'd have to copy/move that from src/compiler's FileUtils to src/reflect's...

@lrytz lrytz merged commit 4b4eb1a into scala:2.12.x May 8, 2020
@lrytz lrytz deleted the t11927 branch May 8, 2020 13:31
@SethTisue SethTisue changed the title Exclude sig files in Symbol.sourceFile Fix scaladoc tool on JDK 11 with -release 8: Exclude sig files in Symbol.sourceFile May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes worth highlighting in next release notes
Projects
None yet
5 participants