-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from Together-Java/feature/multi-snippets
Feature/multi snippets
- Loading branch information
Showing
38 changed files
with
856 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker run --rm -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock --name jshellapi togetherjava.org:5001/togetherjava/jshellbackend:master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker run --rm -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock --name jshellapi togetherjava.org:5001/togetherjava/jshellbackend:master |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
JShellAPI/src/main/java/org/togetherjava/jshellapi/dto/JShellEvalAbortion.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package org.togetherjava.jshellapi.dto; | ||
|
||
public record JShellEvalAbortion(String sourceCause, String remainingSource, JShellEvalAbortionCause cause) { | ||
} |
26 changes: 26 additions & 0 deletions
26
JShellAPI/src/main/java/org/togetherjava/jshellapi/dto/JShellEvalAbortionCause.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.togetherjava.jshellapi.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonTypeInfo; | ||
import com.fasterxml.jackson.annotation.JsonTypeName; | ||
|
||
import java.util.List; | ||
|
||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME) | ||
public sealed interface JShellEvalAbortionCause { | ||
|
||
@JsonTypeName("TIMEOUT") | ||
record TimeoutAbortionCause() implements JShellEvalAbortionCause { | ||
} | ||
|
||
@JsonTypeName("UNCAUGHT_EXCEPTION") | ||
record UnhandledExceptionAbortionCause(String exceptionClass, String exceptionMessage) implements JShellEvalAbortionCause { | ||
} | ||
|
||
@JsonTypeName("COMPILE_TIME_ERROR") | ||
record CompileTimeErrorAbortionCause(List<String> errors) implements JShellEvalAbortionCause { | ||
} | ||
|
||
@JsonTypeName("SYNTAX_ERROR") | ||
record SyntaxErrorAbortionCause() implements JShellEvalAbortionCause { | ||
} | ||
} |
4 changes: 0 additions & 4 deletions
4
JShellAPI/src/main/java/org/togetherjava/jshellapi/dto/JShellExceptionResult.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
JShellAPI/src/main/java/org/togetherjava/jshellapi/dto/JShellSnippetResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.togetherjava.jshellapi.dto; | ||
|
||
import org.springframework.lang.Nullable; | ||
|
||
public record JShellSnippetResult( | ||
SnippetStatus status, | ||
SnippetType type, | ||
int id, | ||
String source, | ||
@Nullable | ||
String result) { | ||
} |
2 changes: 1 addition & 1 deletion
2
JShellAPI/src/main/java/org/togetherjava/jshellapi/dto/SnippetStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package org.togetherjava.jshellapi.dto; | ||
|
||
public enum SnippetStatus { | ||
VALID, RECOVERABLE_DEFINED, RECOVERABLE_NOT_DEFINED, REJECTED, ABORTED | ||
VALID, RECOVERABLE_DEFINED, RECOVERABLE_NOT_DEFINED, REJECTED | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
7 changes: 0 additions & 7 deletions
7
JShellAPI/src/main/resources/jshell_startup/scripts/CUSTOM_DEFAULT.jsh
This file was deleted.
Oops, something went wrong.
Empty file.
Oops, something went wrong.