Skip to content
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

mdoc:fail behaving weirdly #309

Closed
erikerlandson opened this issue Jul 10, 2022 · 5 comments
Closed

mdoc:fail behaving weirdly #309

erikerlandson opened this issue Jul 10, 2022 · 5 comments

Comments

@erikerlandson
Copy link
Owner

@armanbilge I am seeing weird behaviors for mdoc code blocks where error (:fail) is expected.

It is behaving as if it is keeping a previous error message instead of reporting the actual error message:

image

That error is from previous fail demo with a deliberately bad Quantity expression, instead of the error for 7 + false

@erikerlandson
Copy link
Owner Author

All the code blocks that compile correctly seem to be rendering fine.

@armanbilge
Copy link
Contributor

armanbilge commented Jul 10, 2022

That is really really strange 🤔 I don't think I've used the :fail modifier so I can't think why it might do that. If you can minimize it seems like a bug. It might even be Scala 3 specific since that's a new compiler and perhaps this part of the mdoc/Scala 3 integration hasn't been tested.

@erikerlandson
Copy link
Owner Author

I'll file an issue for mdoc, but here is a minimal example

```scala mdoc:fail
val nope = "foo" * "goo"
```

```scala mdoc:fail
val bad = "moo" * "loo"
```

image

@erikerlandson
Copy link
Owner Author

xref: scalameta/mdoc#663

@erikerlandson
Copy link
Owner Author

scalameta/mdoc#664 Fixes this - I am building with a snapshot to pick it up until it makes it into a release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants