Skip to content

Fix #8769: change dottydoc root to docs/ subdirectory #9756

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

Merged
merged 1 commit into from
Sep 21, 2020

Conversation

smarter
Copy link
Member

@smarter smarter commented Sep 8, 2020

Previously it defaulted to the project root which lead to various
issues, notably it meant that the whope project ended up being copied in
_site when running sbt doc, what's even more fun is that when I tried
using sbt 1.4.0-RC1 this caused a compiler crash because it ended up
trying to copy a socket file that sbt had created in target/.

Usincs "docs/" like this still doesn't really make sense when multiple
subprojects exist since we'll try using the same directory for all of
them, but it's less worse than what we had before and it doesn't seem
worth investing more time in dottydoc since it's getting replaced.

@smarter
Copy link
Member Author

smarter commented Sep 9, 2020

Arg, that fails because dottydoc exits with an error if the siteroot doesn't exist, sigh.

@abgruszecki
Copy link
Contributor

Would it work if we instead changed this in SBT for projects where we care about their docs? I think you should be able to pass the option to Dottydoc by modifying Compile / doc / scalacOptions.

@smarter
Copy link
Member Author

smarter commented Sep 9, 2020

Change what in sbt? I just want the default to not copy a million files and crash sbt

@abgruszecki
Copy link
Contributor

Right, I see the projects that care about it already set -siteroot. It should be easy to change Dottydoc to just not do anything if the site dir doesn't exist - the code for crashing if it doesn't exist is right here: https://github.com/lampepfl/dotty/blob/master/doc-tool/src/dotty/tools/dottydoc/DocDriver.scala#L59.

@smarter smarter force-pushed the dottydoc-root branch 3 times, most recently from e80a771 to b1df97e Compare September 18, 2020 16:22
Previously it defaulted to the project root which lead to various
issues, notably it meant that the whope project ended up being copied in
_site when running `sbt doc`, what's even more fun is that when I tried
using sbt 1.4.0-RC1 this caused a compiler crash because it ended up
trying to copy a socket file that sbt had created in `target/`.

Usincs "docs/" like this still doesn't really make sense when multiple
subprojects exist since we'll try using the same directory for all of
them, but it's less worse than what we had before and it doesn't seem
worth investing more time in dottydoc since it's getting replaced.
Copy link
Contributor

@abgruszecki abgruszecki left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

2 participants