Skip to content

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

@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)

- title: Contextual Abstractions
index: reference/contextual/contextual.md
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.

@WojciechMazur WojciechMazur added this to the 3.8.0 milestone Aug 7, 2025
@hamzaremmal
Copy link
Member

This one (#23744) is going through today (probably). It might affect the work here.

@WojciechMazur
Copy link
Contributor Author

WojciechMazur commented Oct 25, 2025

Rebased (and squashed) onto the current main. The second main restores configuration for using markdown syntax and snippet compiler (test locally)

This change:
image

Vs snapshot (apparently for version 3.8.0-RC1-bin-20250822-658c8bd-NIGHTLY found on https://dotty.epfl.ch/, https://nightly.scala-lang.org/ has 3 days older version. Maybe publishing nightly docs is broken?

image

… using sidebar.reference.yml and sidebar.nightly.template.yml.

Regenerate reference-expected-links

Ensure the warnings emitted during `generateScalaDocumentation` are pointing to original sources

Improve generateScalaDocumentation task description
@WojciechMazur WojciechMazur force-pushed the docs/unify-docs-generation branch from 86b4135 to e992574 Compare November 8, 2025 11:32
@WojciechMazur WojciechMazur added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Nov 10, 2025
@WojciechMazur WojciechMazur merged commit 9ba8854 into scala:main Nov 10, 2025
53 checks passed
@WojciechMazur WojciechMazur deleted the docs/unify-docs-generation branch November 10, 2025 11:11
WojciechMazur added a commit that referenced this pull request Nov 12, 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

[Cherry-picked 9ba8854]
WojciechMazur added a commit that referenced this pull request Nov 12, 2025
…ons" to 3.8.0 (#24400)

Backports #23606 to the 3.8.0-RC1.

PR submitted by the release tooling.
[skip ci]
@WojciechMazur WojciechMazur added backport:done This PR was successfully backported. and removed backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. labels Nov 13, 2025
@tgodzik
Copy link
Contributor

tgodzik commented Nov 17, 2025

This will need a separate PR to the LTS branch @WojciechMazur

@hamzaremmal
Copy link
Member

Why even backport it when we don't release nightly documentation for the LTS? The old system works there and can still be used for the next year and a half.

@WojciechMazur
Copy link
Contributor Author

Mostly to cleanup the docs when doing the release, otherwise each time we need to manually remove nightly warning, blogs, and contributing sections. So in fact for LTS we can just remove these without doing a full backport

@hamzaremmal
Copy link
Member

Mostly to cleanup the docs when doing the release, otherwise each time we need to manually remove nightly warning, blogs, and contributing sections. So in fact for LTS we can just remove these without doing a full backport

Then it is a different thing. not a backport.

HarrisL2 pushed a commit to HarrisL2/scala3 that referenced this pull request Nov 18, 2025
…#23606)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:done This PR was successfully backported.

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

4 participants