-
Notifications
You must be signed in to change notification settings - Fork 85
Compiler warnings do not appear in the output #123
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
Comments
Thanks for reporting! I'm able to reproduce the timeout, not sure what's going on here 🤔 |
I believe this comment is on the wrong issue :) |
Whoops, that comment was supposed to be for #124. Still, I'm able to reproduce. It's not necessary to enable fatal warnings to print the warning, def unwrap(oi: Option[Int]): Int = oi match {
case Some(i) => i
}
// warning: match may not be exhaustive.
// It would fail on the following input: None
// def unwrap(oi: Option[Int]): Int = oi match {
// ^^ Is that an acceptable workaround? We could add a With |
In a way mdoc basically already considers warnings to be fatal, then? I'm trying to think of scenarios where this wouldn't be acceptable. Maybe in documentation that demonstrates a bit of code that generates a warning, then uses that code to show the warning was correct? I think in my case it's perfectly sufficient, but there will inevitably be someone down the line that'll need to have warnings output and still evaluate the program :) |
Sounds good, let's close this issue then and let somebody else start a new discussion if they want to display warnings AND evaluate the code. |
Given the following code:
I would expect the mdoc output to contain the non-exhaustivity warning, or to have a
:warnings
modifier of some sort to do so.What I get instead is:
Note that there's an easy workaround, which is to make compiler warnings fatal and use
:fail
, but this might have other unwanted side effects.The text was updated successfully, but these errors were encountered: