scastie
scastie copied to clipboard
Feature: Support scala-cli style directives such as `//> using`
I'd love to be able to just paste a scala-cli script into Scastie and have it recognize //> using scala ...
(to set Scala version) and //> using option ...
(to set compiler flags) and //> using dep ...
to add dependencies, so I could easily move back and forth between the tools (Scastie and scala-cli)
This would indeed be cool! Meanwhile, as a workaround, you can use
scala-cli export . --sbt --output ../some-new-dir
to get a build definition to paste into scasties Build Settings
Thank you for the suggestion! Once the specification for configuration directives is settled, we could consider working on this issue. One challenge is that currently we assume an sbt
build by default. So, there should be an additional setting in “build settings” to switch between scala-cli based snippets and sbt based snippets.
perhaps Scastie only actually needs to support scala-cli based snippets? how much benefit is there from continuing to support the sbt style?
Feature-wise, there is no need to continue using sbt. Everything we use sbt for, we will be able to use scala-cli instead.
That being said, we may want to still support sbt because we want the existing snippets to still work.
Julien mentioned at the Scala Center's advisory board meeting today that work on this is happening at the Center.
Important side note: I am streamlining the using directives and I am almost finished. I will release 1.0.0 version as soon as I finish
I believe @bishabosha just said this is still being worked on
I'll try my best to merge it during the next week.
#919 was closed in favor of #997, which is still pending. Any update on when this feature will be available on the public Scastie instance?
This is a very tough one. We've had a bit of different priorities, mostly in Scala 3 compiler repository, that took precedence over finishing this PR.
I can't tell you the exact date, but hopefully it will happen soon (at least I'll try to find some time and finish this).