Skip to content

Inconsistent Javadoc generation failure when referencing excluded classes  #114

@kristoffSC

Description

@kristoffSC

Hi,
I have stumble upon an issue during Javadoc generation from sbt-unidoc. Javadoc creation succeeds even though there are Errors during doc generation.
I have a reproducer available here under https://github.com/kristoffSC/DocTests

Details about project and configuration.
The reproducer is a very simple SBT project having only two Java classes where one of them is under "internal" package.
The "internal" package is filter out from sbt-unidoc configuration like so:
.map(_.filterNot(_.getCanonicalPath.contains("/internal/")))

Case 1:
Use a @code tag to reference HideEntity.java from MainEntity.java in Javadoc comments.
MainEntity.java uses HideEntity.java in its signatures.

As an end result, the Javadoc are generated, HideEntity is excluded BUT in build logs we can find this:
image
My question is, are those in fact ERRORS or this should be rather Warnings?

The logs for this case can be found here ("Run DocModule tests" step)
https://github.com/kristoffSC/DocTests/runs/5157553355?check_suite_focus=true

Case 2:
Use a @link tag to reference HideEntity.java from MainEntity.java in Javadoc comments.
MainEntity.java uses HideEntity.java in its signatures.

As an end result, the Javadoc IS NOT generated and build has additional errors on top of ones from Case 1:
Additional Errors:
image

The logs for this case can be found here ("Run DocModule tests" step)
https://github.com/kristoffSC/DocTests/runs/5157461756?check_suite_focus=true

Case 3.
Run exact setup for Case 1 but on Windows 10 machine and execute sbt "++ 2.11.12" DocModule/test or sbt DocModule/test
When running the build for case 1 on Windows it fails totally, not generating any Javadoc.
In this case the error logs looks like this (only a portion of logs included)
image

In details, full logs for Case 1 and Case 3, even thou executed against the same code base, are looking slightly different, especially for order of line logs.

In all cases the same Scala ( 2.11.12 ) and SBT (1.6.1) version was used.
For me the most important information would be, if errors in case 1 are in fact errors which should fail javadoc generation and we just stumble on them or those should be warnings.

In our use project, we actually happy with end result of case 1, because we DO want to have Javadoc generated for "public" classes which are referencing "internal" classes in signatures. We are just worry that this behavior is actually a bug of sbt-unidode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions