scalacenter / student-projects

The list of the available projects at the Scala Center for bachelor and master students.
8 stars 0 forks source link

Scala CLI mode in Scastie #10

Closed julienrf closed 1 year ago

julienrf commented 2 years ago

Description

Scastie is an online Scala playground that allows everyone to write, run, and share Scala programs from their web browser.

Currently, Scastie allows users to configure their programs by exposing its sbt build definition. Users can add dependencies and set compiler options, for instance. This approach has several drawbacks:

As an alternative, we would like to allow the users to configure their program via Scala CLI directives. This would solve the issues mentioned above: the configuration would be part of the source code (as magic comments), and copying the program content to a local file would be enough to execute it locally (with scala-cli run).

Corresponding issue: scalacenter/scastie#603

Expected Outcome

Scastie supports a Scala CLI mode where the program configuration is defined with standard Scala CLI directives.

More specifically:

Supervisors

Julien Richard-Foy (julien.richard-foy@epfl.ch): Technical director of the Scala Center. Jędrzej Rochala (jrochala@virtuslab.com): Software engineer at VirtusLab.

julienrf commented 1 year ago

Taken by @Maeeen

kubukoz commented 10 months ago

Is this already available in Scastie? I don't see anything non-sbt-specific in the web version, and directives don't seem to work OOTB.

rochala commented 10 months ago

@kubukoz The implementation has been finished 3 weeks ago and the PR is waiting for the review. Hopefully it will be merged in January.

kubukoz commented 10 months ago

Thanks for the update!