Skip to content

Rendering documentation with scaladoc should work offline #13272

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

Closed
hamdiallam opened this issue Aug 9, 2021 · 4 comments · Fixed by #13287
Closed

Rendering documentation with scaladoc should work offline #13272

hamdiallam opened this issue Aug 9, 2021 · 4 comments · Fixed by #13287

Comments

@hamdiallam
Copy link

hamdiallam commented Aug 9, 2021

Compiler version 3.0.2-RC1

The scaladoc generator requires network access. This is not good for CI machines that run jobs with commands like publishLocal without network access. The exception originates from renderResources here.

Expectation

Ability to generate docs without network access

@smarter
Copy link
Member

smarter commented Aug 10, 2021

Looks like scaladoc tries to fetch a few js files: https://github.com/lampepfl/dotty/blob/38b983c1b4a61d4c45f314ae895b95317c322c62/scaladoc/src/dotty/tools/scaladoc/renderers/Resources.scala#L95-L99
Could we instead store these files in the scaladoc jar? We'd have to check their licenses to make sure the result can be redistributed under Apache v2 first. /cc @romanowski

@smarter smarter changed the title Dotty scaladoc InvocationTargetException Rendering documentation with scaladoc should work offline Aug 10, 2021
finaglehelper pushed a commit to twitter/util that referenced this issue Aug 10, 2021
Problem:

The Scala 3.0.1 compiler includes bugs that are patched
in the 3.0.2-RC1 release. An example of this is the broken
Java APIs in JDK 11 for our `TimeLikeOps` classes because of
scala/scala3#13039.

Result / Solution:
Using the 3.0.2-RC1 release doesn't break any tests and our
projects compile fine. Let's update to this to make use of the bug
fixes until the 3.0.2 is officially released.

The new Dotty scaladoc requires network access due to a bug
scala/scala3#13272. For now let's
disable scaladoc for scala 3.

JIRA Issues: CSL-11235

Differential Revision: https://phabricator.twitter.biz/D720887
@pikinier20
Copy link
Contributor

3rd party libraries are not fetched during generation. They are included to HTMLs using URL to remote location. The real reason of this exception is fetching Inkuire from Github because Inkuire.js file needs to be locally in generated documentation. The solution is to have inkuire.js packed in scaladoc jar.

@BarkingBad
Copy link
Contributor

We should not require inkuire.js when there is no -Ygenerate-inkuire flag provided, so I think we should fix it there, not by providing inkuire.js to the jar

@smarter
Copy link
Member

smarter commented Aug 11, 2021

I think including inkuire.js in the jar would also be fine, although indeed that's less important as long as inkuire is not enabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants