-
Notifications
You must be signed in to change notification settings - Fork 185
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
Fix warn messages in doc #1255
Fix warn messages in doc #1255
Conversation
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.
Nice, fixes #1190 ?
yes, it will fix #1190 |
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.
👍 what about using -Xfatal-warnings
so that docs remain up to date as deprecations are added?
docs/developers/semantic-type.md
Outdated
@@ -49,7 +49,7 @@ Use `MethodSignature.returnType` to get the types of vals. | |||
|
|||
```scala mdoc | |||
def getType(symbol: Symbol): SemanticType = | |||
symbol.info.get.signature match { | |||
(symbol.info.get.signature: @unchecked) match { |
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.
maybe it's clearer with a case _
?
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.
You mean adding a case _ ?
So the return type will be Option[A]..
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.
That would make the doc harder to read indeed... Does removing the --unchecked
from scalacOption
for the doc project silence these exceptions? If not, there is scala/scala#8373 that could be used as well to avoid repeating this everywhere (which should be usable since the doc is built using 2.13?).
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.
removing -unchecked doesn't silence these exceptions
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 am not a big fun of -Xfatal-warnings on documentation. I hesitated between adding a @unchecked
or finding the correct scalacOptions to remove warning on exhaustive pattern match. I found on google the @unchecked
first
docs/developers/semantic-type.md
Outdated
@@ -49,7 +49,7 @@ Use `MethodSignature.returnType` to get the types of vals. | |||
|
|||
```scala mdoc | |||
def getType(symbol: Symbol): SemanticType = | |||
symbol.info.get.signature match { | |||
(symbol.info.get.signature: @unchecked) match { |
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.
You mean adding a case _ ?
So the return type will be Option[A]..
why? |
|
I fixed last warning and I added xfatal-wanings , and also used -Wconf to silence pattern match errors. |
fixes #1190