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

Add support for Scaladoc 3 #1190

Merged
merged 3 commits into from
Mar 6, 2021
Merged

Add support for Scaladoc 3 #1190

merged 3 commits into from
Mar 6, 2021

Conversation

jodersky
Copy link
Member

@jodersky jodersky commented Mar 2, 2021

This adds support for docJar generation under Scala 3.0.0-RC1, which is currently broken[1].

I've tried to keep backwards compatibility as much as I could. However, there is one sort-of-breaking change with this: docJar now has a dependency on the compile task (because Scaladoc 3 uses tasty files, not source files anymore). This dependency prevents generating documentation for projects that would previously not compile but could still generate documentation.

[1]: See the discussion on Gitter if you're interested, but the gist of it is that Scaladoc 3 is really not compatible with dottydoc, yet dottydoc is no longer available for Scala >= 3.0.0-RC1.

@jodersky jodersky requested review from lihaoyi and lefou March 2, 2021 19:58
@jodersky jodersky marked this pull request as ready for review March 2, 2021 19:58
@jodersky
Copy link
Member Author

jodersky commented Mar 2, 2021

FYI: the integration test failure of BetterFiles seems unrelated. It currently also fails on my machine under mill master (c500ca9).

@lefou
Copy link
Member

lefou commented Mar 3, 2021

I'm pretty sure I review and commented before, but I can't find these comment anymore. Strange. I'll try to review soon again. Thanks for the PR.

@lefou
Copy link
Member

lefou commented Mar 3, 2021

I'm pretty sure I review and commented before, but I can't find these comment anymore. Strange. I'll try to review soon again. Thanks for the PR.

I'm sorry, I mixed up PRs. There is already a PR for scaladoc 3 #1154, on which I commented.

@jodersky
Copy link
Member Author

jodersky commented Mar 3, 2021

oh, no! How did I miss this? Let me also take a look at the other one

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@lefou
Copy link
Member

lefou commented Mar 6, 2021

I'm in favor merging this PR despite the fact that we have another older PR #1154 . This one handles doc resources better and comes with additional tests.

Unrelated to merging this one, I think we should better document all these different isDotty, isScala3, isScala3Milestone util method to better understand why and when to use them.

Thanks for this PR!

@lefou lefou merged commit 4ad87fa into com-lihaoyi:master Mar 6, 2021
@lefou lefou added this to the after 0.9.5 milestone Mar 6, 2021
alexarchambault added a commit to alexarchambault/Ammonite that referenced this pull request Mar 18, 2021
To benefit from com-lihaoyi/mill#1190, required for Scala 3.0.0-RC1
scaladocs.
@hmf
Copy link

hmf commented Apr 17, 2021

I would like to know if static site generation was tested. The API is generated correctly, However the static site files are just copied over to the destination directory. I may have an error on my side but just checking.
TIA

EDIT: I forced an incorrect template name and an error is generated. So it seems like static site generatton is partially working. However, no files are converted (templates or md).

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.

3 participants