-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Docs/enable snippet compiler on enums reference #19498
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
base: main
Are you sure you want to change the base?
Conversation
Why dotty.tools.dotc.MissingCoreLibraryException: Could not find package scala from compiler core libraries...?
|
|
This commit adds workaround for the MissingCoreLibraryException due to `sc:fail` and enables snippet compiler on enums reference documents. See scala#19513 (comment)
project/Build.scala
Outdated
@@ -2362,8 +2362,7 @@ object ScaladocConfigs { | |||
s"$dottyLibRoot/src/scala=compile", | |||
s"$dottyLibRoot/src/scala/compiletime=compile", | |||
s"$dottyLibRoot/src/scala/util=compile", | |||
s"$dottyLibRoot/src/scala/util/control=compile", | |||
"docs/_docs/reference/enums=compile" | |||
s"$dottyLibRoot/src/scala/util/control=compile" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, I'm confused. Is this an inclusion list or an exclusion list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for feedback. I think it is an inclusion list and I did something weird 🤔 I'll fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I have no idea why the previous contributor added files to stableScala3
instead of Scala3
task. I think it is enough to add them to Scala3
task as stableScala3
uses Scala3
value anyway. All the Scala code blocks in doc-comments and doc markdown files are type-checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there was something specific to stableScala3
task, it should have been added to stableScala3
, but I don't think there is with regard to files to apply the snippet compiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this change f3cb10b is necessary, but in case dottyLibRoot/src
is somehow different from scalaLibrarySrc
, files under dottyLibrarySrc
are also included to snippet compiler.
c310b7b
to
9f4fa00
Compare
9f4fa00
to
690de4c
Compare
In case `dottyLibRoot/src` is different from `scalaLibrarySrc`, files under `dottyLibrarySrc` are included to snippet compiler.
Related to: #12967