docs: apply snippet compiler on new types reference docs - #19513
Conversation
This commit addresses a part of scala#12967. To make documents pass snippet checking, I modified some Scala code blocks while keeping original code as much as possible. Snippet check for docs raises "dotty.tools.dotc.MissingCoreLibraryException: Could not find package scala from compiler core libraries." on CI(not on my local machine), so I skip adding docs to Build.scala for now.
|
Even when I do not change Build.scala, it fails ðĪ
https://github.com/lampepfl/dotty/actions/runs/7616330659/job/20742843404?pr=19513 |
undo unnecessary changes
|
I believe snippet checking has not been applied to docs/_docs/*. Why minor changes to code and code block metadata in docs result in error? |
Before this commit, `generateReferenceDocumentation` failed with MissingCoreLibraryException even though it didn't use snipet checking. It turned out that `sc:fail` causes the problem, but I do not know exact reason for this. Nothing but snippet compiler should use the `sc:fail` metadata.
|
It turned out that |
The change in unin-types-spec.md is workaround. It should be `sc:fail` instead of `sc:nocompile`, but it causes generateReferenceDocumentation task to fail with MissingCoreLibraryException.
This commit adds workaround for the MissingCoreLibraryException due to `sc:fail` and enables snippet compiler on enums reference documents. See scala#19513 (comment)
5276247 to
9039fce
Compare
|
@i10416 What is the status of this PR? Do you mean to work on it in the near future, or should we close it? |
|
Same comment as in the other PR. |
âĶeck-on-new-types
c79c30b to
ab6a0ad
Compare
|
Merged |
|
Here, we should more carefully go over the changes, as some snippets received more context, which we might want to put between the magic comments |
|
I'll see what I can do |
âĶeck-on-new-types
44a9fb0 to
706f7d7
Compare
|
Should be ready for re-review |
|
Bump @bracevac |
This commit addresses a part of #12967.
To make documents pass snippet checking, I modified some Scala code blocks while keeping original code as much as possible.
I guessed snippet check for docs raises "dotty.tools.dotc.MissingCoreLibraryException: Could not find package scala from compiler core libraries." on CI
(not on my local machine), so I skipped adding docs to Build.scala, but it still fails ðĪ