question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scastie examples in the internals docs don't work

See original GitHub issue

I’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.

Screenshot 2022-01-04 at 13 21 03

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:open
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ckipp01commented, Jan 5, 2022

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.

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:

2022-01-05 13 05 03

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.

0reactions
pikinier20commented, Jan 5, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

scalacenter/scastie - Gitter
Hello. When I first start Scastie with this URL (https://scastie.scala-lang.org/?target=dotty) and then press Run/Save with the default @main example that's in ...
Read more >
Introducing Scastie - An interactive playground for Scala.
Scastie can run any Scala program with any library in your browser. You don't need to download or install anything. scastie.
Read more >
Introducing Scastie - An interactive playground for Scala
In this example, we use scrimage, which is a simple image library. We download an image, apply a sepia filter and serve both...
Read more >
Scastie is out of beta and available to everybody!
How does Scastie work? When a user evaluates their code, the browser sends all its input to our server. We run your code...
Read more >
def Then(validatable: ValidatableResponse => Unit ... - Scastie
statusCode(200) // Change me to not-200 to see assertion failure here } When ... <p>This domain is for use in illustrative examples in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found