Scastie examples in the internals docs don't work
See original GitHub issueI’m not 100% sure where this report actually belongs, but when looking at the dotty docs at the Type System information they contain scatsie links with code that allow you to run the example. I assume these aren’t meant to be ran? Currently it gives the impression that you can which leads the user to hit the play button and be met with a ton of errors.
Expectation
I’d expect that if there are runnable code blocks here that they can be ran without issue.
Sort of an aside, but I was a bit confused when looking around today for info on the type system. I first started out at https://dotty.epfl.ch/docs/internals/type-system.html but then tried to navigate to 3.1.0 via the top right version chooser and was then lead to https://scala-lang.org/api/3.1.0/ which is only the api docs, none of the Internals
section for that version like I was hoping for. Why is one on dotty.epfl.ch and the other on scala-lang, and why does the scala-lang one not hold all the other information?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Thanks for the clarification. I’d recommend even having more control over this than letting every correct snippet become a Scatsie integration. Mainly because it’s quite confusing for a user to come across a runnable snippet that does nothing. Take this one for example:
There is no error here, so the user doesn’t really see anything, but it also outputs nothing. I can imagine this could cause a lot of confusion for someone trying to run the valid snippet and not understanding what is going on here.
About Scastie: Current integration with Scastie automatically allows you to run every scala snippet even if it doesn’t compile. As @julienrf said, the documentation is still work in progress and probably it would be a good idea to allow running only correct snippets.