Skip to content

Unify generation of Scala 3 API and Reference documentations #23606

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

WojciechMazur
Copy link
Contributor

@WojciechMazur WojciechMazur commented Jul 26, 2025

This PR does unify how snapshot and stable scaladoc artifacts are published:

  • docs/sidebar.yml now contains only entries visible for stable releases
  • docs/sidebar.nightly.template.yml contains entries specific for Snapshot builds (contributing guide, blog posted at https://dotty.epfl.ch/) - it does not contain reference subsection entries - this part is now generated when executing generateScalaDocumentation task. It emits a patch to docs/sidebar.yml containg combined inputs from both files
  • project/resources/referenceReplacements/_layouts/static-site-main.html was removed, instead we now inject the warning only when building snapshot docs using generateScalaDocumentation
  • project/resources/referenceReplacements/sidebar.yml is removed, we would no longer need to keep 2 files in sync
  • generateStableScala3Documentation no longer uses calculated paths to obtain compilation outputs - it was only needed in the past to allow for generation of new scaladoc for older compiler/library

Fixes #22154 - or rather introduces fix in the main repo. During the releases we're applying most of these patches manually to workaround the issue

… using sidebar.reference.yml and sidebar.nightly.template.yml.
…t on `Scala3` config instead of using hacky, manually constructed paths used in the past to build API/docs of different compiler version.
@WojciechMazur WojciechMazur requested a review from Florian3k July 26, 2025 17:18
@@ -0,0 +1,63 @@
index: index.md
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file is exactly old sidebar.yml with reference sections removed (+ additional comment)

@@ -28,12 +28,13 @@ subsection:
directory: contextual
subsection:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file is exactly the old sidebar.yml for only reference related sections.
Additions here are mostly due to diverging state of https://github.com/scala/scala3/tree/language-reference-stable that was not sync with main

@WojciechMazur
Copy link
Contributor Author

We'd like to merge it after series of ongoing changes to building Scala 2 stdlib in our build, discussed with @hamzaremmal about it.

… when generating snapshot docs, keep as default for all other tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect warning message in Scala 3 Reference on stable versions of the compiler
2 participants