scalacenter / scastie

An interactive playground for Scala
https://scastie.scala-lang.org
Apache License 2.0
433 stars 103 forks source link

Scala cli support #997

Open rochala opened 8 months ago

rochala commented 8 months ago

First, I want to thank Marwan @Maeeen for adding the initial support for Scala-CLI 🎉

Now, let's talk about this PR. It contains few major improvements and refactors. They had to be done sooner or later, so I took the opportunity to address multiple issue at once.

  1. We've dropped play-json in favor of circe. The reason is, Scastie had a technical debt and long awaiting migration of the database, as many codecs were adjusted to support all snippets. Now we have only derived codecs, which will simplify the development in a major way. If you're wondering why I also migrated to circe, it has better support for http4s.

  2. The packages are renamed to match other Scalacenter repositories. Proper kudos was added in readme section.

  3. The database migration script is included in this PR, which will handle all the above. It had to happen anyway, as we now have abstraction over snippet, whether it is Sbt one or Scala-CLI one.

Now lets move to the next part. This PR doesn't address all the problems. After this PR is merged the following PR's will be added:

Lastly, let's talk about the chosen solutions in this PR:

It will first be deployed on our staging.