Skip to content

Fix publishing docs for scala3 libraries #11578

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 5 commits into from
Mar 26, 2021

Conversation

BarkingBad
Copy link
Contributor

No description provided.

@BarkingBad BarkingBad linked an issue Mar 2, 2021 that may be closed by this pull request
Copy link
Contributor

@romanowski romanowski left a comment

Choose a reason for hiding this comment

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

We should also reuse scaladoc confitguration with generate... tasks

@BarkingBad
Copy link
Contributor Author

We should also reuse scaladoc configuration with generate... tasks

Could you tell more details?

@romanowski
Copy link
Contributor

We should also reuse scaladoc configuration with generate... tasks

Could you tell more details?

Wn set options to control external configuration for scaladoc/javadoc as well as source mapping, revision, logo and more for generateScala3doc task. We should try to reuse some of those options standard doc tasks using Compile / doc / scalacOptions setting

@BarkingBad BarkingBad force-pushed the scaladoc/scala3-docs-in-jar branch 5 times, most recently from bca9af4 to 110c7ef Compare March 8, 2021 13:49
@BarkingBad BarkingBad requested a review from romanowski March 8, 2021 14:04
@BarkingBad BarkingBad force-pushed the scaladoc/scala3-docs-in-jar branch from 110c7ef to 302c450 Compare March 8, 2021 14:19
@@ -741,7 +770,6 @@ object Build {
// when compiling a project that depends on scala3-staging (see sbt-dotty/sbt-test/sbt-dotty/quoted-example-project),
// but we always need it to be present on the JVM classpath at runtime.
dependsOn(dottyCompiler(Bootstrapped) % "provided; compile->runtime; test->test").
settings(commonBootstrappedSettings).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess that line was redundant in context of line 739

@@ -752,7 +780,6 @@ object Build {
// when compiling a project that depends on scala3-tasty-inspector (see sbt-dotty/sbt-test/sbt-dotty/tasty-inspector-example-project),
// but we always need it to be present on the JVM classpath at runtime.
dependsOn(dottyCompiler(Bootstrapped) % "provided; compile->runtime; test->test").
settings(commonBootstrappedSettings).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess that line was redundant in context of line 750

Copy link
Contributor

@romanowski romanowski left a comment

Choose a reason for hiding this comment

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

It seems that this PR breaks linking to external documentation in output of generateScala task

@BarkingBad BarkingBad requested a review from romanowski March 12, 2021 12:52
@BarkingBad BarkingBad force-pushed the scaladoc/scala3-docs-in-jar branch 3 times, most recently from c5a2f86 to 8093a91 Compare March 12, 2021 15:40
@romanowski romanowski force-pushed the scaladoc/scala3-docs-in-jar branch 2 times, most recently from 981c403 to 09059a3 Compare March 23, 2021 14:13
Comment on lines +1220 to +1221
lazy val `scaladoc-js` = project.in(file("scaladoc-js")).asScaladocJs(Bootstrapped)
lazy val `scaladoc-js-nonBootstrapped` = project.in(file("scaladoc-js")).asScaladocJs(NonBootstrapped)
Copy link
Member

Choose a reason for hiding this comment

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

Is scaladoc-js-nonBootstrapped actually needed for anything? Otherwise you could just keep the bootstrapped version and avoid some complexity in the build.

Copy link
Contributor

Choose a reason for hiding this comment

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

We need to compile scala-js parts of scaladoc-nonBootstraped. Its output will be used in documentation shipped to Maven Central.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I understand, we never publish non-bootstrapped projects on maven central.

Copy link
Contributor

Choose a reason for hiding this comment

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

scaladoc-js compiles into javascript code that is included in the documentation generated by scaladoc (implementation of search etc.). In order to document e.g. scala3-library-bootstrapped we need to use not bootstrapped scaladoc and hence we need non bootstrapped version of scaladoc-js to add all the javascript pieced to documentation.

If there is better way to implement this I am happy to change it after RC2 is released.

Copy link
Member

Choose a reason for hiding this comment

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

In order to document e.g. scala3-library-bootstrapped we need to use not bootstrapped scaladoc

Oh I see, this is tricky indeed but it might be possible to avoid a cycle if we can do things in this order: compile scala3-library-bootstrapped -> compile scaladoc-js -> use this scaladoc-js to generate the scala3-library-bootstrapped docs, but that could be done post-RC2 indeed.

@romanowski romanowski force-pushed the scaladoc/scala3-docs-in-jar branch from 09059a3 to 28fe3e9 Compare March 24, 2021 15:19
@romanowski romanowski requested a review from smarter March 24, 2021 17:48
@romanowski romanowski added this to the 3.0.0-RC2 milestone Mar 25, 2021
@romanowski romanowski merged commit 45e77e8 into scala:master Mar 26, 2021
@Kordyjan Kordyjan modified the milestones: 3.0.0-RC2, 3.0.0 Aug 2, 2023
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.

Package Scala3 documentation together with the release
4 participants