Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala cli support #997

Open
wants to merge 50 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b405fb8
draft of scli runner
Maeeen Feb 19, 2023
1616f55
Scli actor runs scripts as an SbtActor
Maeeen Feb 20, 2023
ca33883
Add instrumentation
Maeeen Feb 20, 2023
2359cbb
beginning of bsp
Maeeen Feb 22, 2023
09bebfb
blabla
Maeeen Feb 22, 2023
ff09d9f
Bsp incomprehension
Maeeen Feb 23, 2023
94d6b56
ca
Maeeen Feb 24, 2023
30fd4d0
wow bsp runs!
Maeeen Feb 24, 2023
e89ed2c
Refactoring
Maeeen Feb 26, 2023
b4db390
Refactor using Future
Maeeen Feb 27, 2023
e9ab4d9
Handle user directives from code
Maeeen Feb 27, 2023
315e1d8
Add correct compilation error handling
Maeeen Mar 3, 2023
60539a4
Remove debug code + add todo
Maeeen Mar 3, 2023
4d48833
Handle every issue
Maeeen Mar 4, 2023
59a3a2c
Add instrumentation result
Maeeen Mar 5, 2023
ec2da44
Small refactor
Maeeen Mar 6, 2023
d1f8e22
Beginning of tests
Maeeen Mar 14, 2023
d348802
Refactor instrumentation and add some test
Maeeen Mar 14, 2023
98b4bab
Add instrumentation test + some fixes
Maeeen Mar 14, 2023
0cddb92
Run now directly by the runner, add cancelation (#1)
Maeeen Mar 21, 2023
e99d606
Added log and diagnostics even if it did compile (#2)
Maeeen Mar 27, 2023
4d8de86
better (#3)
Maeeen Apr 13, 2023
2c36924
Fix of `ScastieOffsetParams`
Maeeen Apr 17, 2023
1bfd112
Reload metals option
Maeeen Apr 20, 2023
283fe18
Fix
Maeeen Apr 24, 2023
ac746e0
UI (#5)
Maeeen May 22, 2023
7c272fa
Tests (#4)
Maeeen May 22, 2023
0525903
Added reconnect and timeout parameter
Maeeen Jul 5, 2023
0138658
Updated build.sbt
Maeeen Jul 6, 2023
70ecee5
Made compilable + rebased on scalacenter/scastie
Maeeen Jul 6, 2023
cccfc1f
Fixed rebasing, now prorperly rebased to scalacenter/scastie
Maeeen Jul 19, 2023
f9dc289
Fix test of ScliRunner
Maeeen Jul 19, 2023
66c9bde
Update the LB to handle SBT and SCli snippets differently (#6)
Maeeen Jul 27, 2023
a07b00c
Scli lb (#8)
Maeeen Jul 31, 2023
fc0bd0f
Remove dead letter case of Scli runner
Maeeen Aug 3, 2023
4eaceb7
Update build.sbt to start ScliRunner
Maeeen Aug 3, 2023
0a4de5e
Make ScastieMetalsOption's code argument default to None
Maeeen Aug 11, 2023
48a6f4a
Remove generator for tests, separate api to api and runtime api
rochala Oct 9, 2023
7688d56
initial changes
rochala Oct 12, 2023
0b679be
rename packages
rochala Oct 12, 2023
af5e3b3
make tests compile
rochala Oct 13, 2023
13f2e6c
Add conversion, metals support, refactor, deployment scripts
rochala Oct 31, 2023
8e59aa0
Fix typo
rochala Oct 31, 2023
dd08e5c
Add migration script, update version to 1.0.0
rochala Dec 13, 2023
266204d
Make dispatchers thread safe, fix tests
rochala Dec 13, 2023
0da35c8
Change configuration file, add scala-cli to nix
rochala Dec 13, 2023
7af9481
Add tests, make CI more stable
rochala Dec 20, 2023
206f937
Fix metals tests
rochala Dec 20, 2023
2849579
Rebase + fixes to make code compile after rebasing
rochala Sep 14, 2024
28eff0a
Fix tests, address first comments
rochala Sep 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ jobs:

- uses: cachix/install-nix-action@v24
with:
nix_path: nixpkgs=channel:nixos-22.11
nix_path: nixpkgs=channel:nixos-23.11
- uses: VirtusLab/scala-cli-setup@main
with:
jvm: temurin:17
apps: sbtn bloop
- name: Run tests
run: |
nix-shell --command "sbt -DSnippetsContainerTest.mongo=true cachedCiTest"
nix-shell --command "yarn install && sbt -DSnippetsContainerTest.mongo=true cachedCiTest"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ generated-scripts*
dump*
*.wasm
*.scm
.scala-build
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,19 @@ You can install a pre-commit hook with `bin/hooks.sh`
| ScastieBackend | (HTTP) | +------------+ | akka+remote +-------------------------------------------+||
| +--------+ +-----------------> | |LoadBalancer| <------------------+ | SbtActor Sbt(Process) |||
| | | | | +------------+ | | | +----------+ +-----------+ |||
| | | | | | +---> | | <-----> |sbt|scastie| ||+
| | | | | | +---> | | <-------> |sbt|scastie| ||+
| | | | | | | +----------+ I/O Stream +-----------+ ++
| | | | | | +-------------------------------------------+
| | | | | |
| | | | | |
| | | | | |
| | | | | SnippetContainer(DB)|
| | | | | |
| | | | <-----------------+ oauth |
| +--------+ | SnippetProgress | static ressources |
| | (sse/websocket) +---------------------+
| InteractiveProvider |
| +--------+ | +---------------------+
| | | | | | +-------------------------------------------+
| | | | | SnippetContainer(DB)| +-------------------------------------------+|
| | | | | | akka+remote +-------------------------------------------+||
| | | | <-----------------+ oauth | <-----------+ | ScalaCliActor ScalaCli(Bsp) |||
| +--------+ | SnippetProgress | static ressources | | | +----------+ +-----------+ |||
| | (sse/websocket) +---------------------+ +---> | | <-------> |scala-cli | ||+
| InteractiveProvider | | +----------+ I/O Stream +-----------+ ++
| +--------+ | +---------------------+ +-------------------------------------------+
| | | | | |
| | | | | MetalsRunnerServer |
| | +-------------------> | |
Expand Down
8 changes: 4 additions & 4 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ https://scastie.scala-lang.org/?inputs=%7B%0A%20%20%20%20%22_isWorksheetMode%22%
See the format here:
https://github.com/scalacenter/scastie/blob/b5feb3278837cbe3393e4598f32ab84f16aa25ba/api/src/main/scala/com.olegych.scastie.api/Inputs.scala#L61

# Acknowledgements

Huge thanks to original author [`@OlegYch`](https://github.com/OlegYch) for his contributions to the ecosystem.

# Supports

Scastie is supported by the Scala Center

[![Scala Center Logo](https://i.imgur.com/kvoAElp.jpg)](https://scala.epfl.ch/)

with the help of Browser Stack for end-to-end testing

[![Browser Stack Logo](http://www.diogonunes.com/blog/wp-content/uploads/2016/07/browserstack-logo.png)](https://browserstack.com)
234 changes: 0 additions & 234 deletions api/src/main/scala/com.olegych.scastie.api/ApiModels.scala

This file was deleted.

38 changes: 0 additions & 38 deletions api/src/main/scala/com.olegych.scastie.api/CompilerInfo.scala

This file was deleted.

58 changes: 0 additions & 58 deletions api/src/main/scala/com.olegych.scastie.api/ConsoleOutput.scala

This file was deleted.

Loading
Loading