Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
10d71ba
added initial webclient API that mirrors the Webserver API and uses t…
jurgenvinju May 11, 2026
645d334
cleanup and added POST method
jurgenvinju May 11, 2026
61cadea
added the other methods
jurgenvinju May 11, 2026
6cce6de
added progress bar
jurgenvinju May 11, 2026
17723ff
fixed post
jurgenvinju May 12, 2026
b9c1e6e
constructor typo
jurgenvinju May 12, 2026
8c9c0da
fix post bug
jurgenvinju May 12, 2026
ddf4bfa
added path to other requests kinds but GET and POST
jurgenvinju May 12, 2026
6b37e74
Merge branch 'main' into feat/webclient
jurgenvinju May 19, 2026
53ae8a0
started rewrite of Server and Client interface to canonically treat a…
jurgenvinju May 19, 2026
cd8bdda
big cleanup of Webclient, but Webserver is broken now and I still hav…
jurgenvinju May 21, 2026
8c51344
debugging with @davylandman
jurgenvinju May 21, 2026
748dcc7
linked up the Subscription API as well to complete the stream
jurgenvinju May 22, 2026
ae4eefe
improving error handling of common mistakes in the client
jurgenvinju May 22, 2026
9f7b1b5
factored out Writer-based suppliers
jurgenvinju May 22, 2026
06b20ad
added asserts to diagnose possible race
jurgenvinju May 22, 2026
e1f8367
error handling for bad URLs
jurgenvinju May 22, 2026
76abafe
removed dead use of parameter
jurgenvinju May 22, 2026
bee60e8
this seems to have fixed the race
jurgenvinju May 22, 2026
345585e
comments
jurgenvinju May 22, 2026
548aac6
deal with null messages of IOException generally
jurgenvinju May 22, 2026
db4c552
fixed off-by-one in download progress
jurgenvinju May 23, 2026
0ad2cb2
rewrote the webserver side to accept the new Body constructors send a…
jurgenvinju May 26, 2026
c1ffd9e
server is working again
jurgenvinju May 27, 2026
0f450c2
added xml and html sending and receiving, only server side reception …
jurgenvinju May 27, 2026
73f21f0
refactoring that factors common WriterToInputStream functionality int…
jurgenvinju May 27, 2026
f9416a0
fixing issues with module management in client and server
jurgenvinju May 28, 2026
7bc2ee5
rationalized JSON options
jurgenvinju May 28, 2026
50faa40
cleanup of Webservice module and added some example usages
jurgenvinju May 28, 2026
111d4f4
linked charset parameter of POST and PUT bodies
jurgenvinju May 28, 2026
8123624
finished charset and mimetype propagation to POSt and PUT headers
jurgenvinju May 28, 2026
c969047
wired server side mimeType and response for bodies
jurgenvinju May 28, 2026
6a047d3
fixed copy/paste bug
jurgenvinju May 28, 2026
c0311de
fixed switch case missing break bug
jurgenvinju May 28, 2026
58c5ff2
added missing file
jurgenvinju May 28, 2026
49c6a4e
added more headers
jurgenvinju May 28, 2026
b9a1c6a
Merge branch 'main' into feat/webclient
jurgenvinju May 28, 2026
c9134db
fixing more comments by @davylandman
jurgenvinju May 28, 2026
fe1b7a0
wrote a test server that does not lock the interpreter but does use a…
jurgenvinju May 28, 2026
6869703
some fixes. not yet working
jurgenvinju May 28, 2026
0304c83
test servers are working
jurgenvinju May 29, 2026
9018c05
writing first good tests. they still fail
jurgenvinju May 29, 2026
223ea5e
fixing things one-by-one
jurgenvinju May 29, 2026
9953b5e
fixed sloppy NPEs
jurgenvinju May 29, 2026
98e32c4
fixed content-type for POST and PUT bodies in client
jurgenvinju May 29, 2026
e4f2434
big rewrite to Undertow modern HTTP server in Java, removed clone of …
jurgenvinju Jun 1, 2026
97fca4d
cleaning up
jurgenvinju Jun 1, 2026
6573779
one more compilation error
jurgenvinju Jun 1, 2026
3021254
fixed some warnings to get overview back
jurgenvinju Jun 1, 2026
0b96380
bumped to Java 17 because Undertow requires it
jurgenvinju Jun 1, 2026
6fb2d38
solved issues with new yield keyword in Java 17
jurgenvinju Jun 1, 2026
9464ac0
bumped action workflow to Java 17
jurgenvinju Jun 1, 2026
d3031ad
fixing stuff after jump to Java 17
jurgenvinju Jun 1, 2026
f86e26e
some more fixes to get the server working again. almost there
jurgenvinju Jun 1, 2026
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: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# mirrors: '[{"id": "usethesource-gh", "name": "uts mirror", "mirrorOf": "usethesource", "url": "${{ secrets.MAVEN_MIRROR_URL }}"}]'
- uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: 'temurin'
cache: 'maven'
overwrite-settings: false
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:

- uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: 'temurin'
cache: 'maven'
overwrite-settings: false
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
# mirrors: '[{"id": "usethesource-gh", "name": "uts mirror", "mirrorOf": "usethesource", "url": "${{ secrets.MAVEN_MIRROR_URL }}"}]'
- uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: 'temurin'
cache: 'maven'
overwrite-settings: false
Expand Down Expand Up @@ -204,7 +204,7 @@ jobs:
# mirrors: '[{"id": "usethesource-gh", "name": "uts mirror", "mirrorOf": "usethesource", "url": "${{ secrets.MAVEN_MIRROR_URL }}"}]'
- uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: 'temurin'
cache: 'maven'
overwrite-settings: false
Expand Down
6 changes: 3 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature=do not generate
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.shareCommonFinallyBlocks=disabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand Down Expand Up @@ -169,7 +169,7 @@ org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.compiler.storeAnnotations=disabled
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<maven-version>3.9.12</maven-version>
<exec.mainClass>org.rascalmpl.shell.RascalShell</exec.mainClass>
<rascal.test.memory>3</rascal.test.memory>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.release>17</maven.compiler.release>
<rascal-maven.version>0.30.7</rascal-maven.version>
<jline.version>3.29.0</jline.version> <!-- do not upgrade unless https://github.com/jline/jline3/issues/1445 is solved-->
</properties>
Expand Down Expand Up @@ -550,9 +550,9 @@
<version>2.0.6.1</version>
</dependency>
<dependency>
<groupId>org.nanohttpd</groupId>
<artifactId>nanohttpd</artifactId>
<version>2.3.1</version>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
<version>2.4.1.Final</version>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
Expand Down
4 changes: 2 additions & 2 deletions src/org/rascalmpl/ast/AbstractAST.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public Result<IValue> assignment(AssignableEvaluator eval) {

/**
* Computes internal type representations for type literals and patterns.
* @param instantiateTypeParameters TODO
* @param instantiateTypeParameters
*/
public Type typeOf(Environment env, IEvaluator<Result<IValue>> eval, boolean instantiateTypeParameters) {
throw new NotYetImplemented(this);
Expand All @@ -174,7 +174,7 @@ public Type __evaluate(org.rascalmpl.interpreter.BasicTypeEvaluator eval) {

/**
* Recursively build a matching data-structure, use getMatcher if you are just a client of IMatchingResult.
* @param bindTypeParameters TODO
* @param bindTypeParameters
*/
public IMatchingResult buildMatcher(IEvaluatorContext eval, boolean bindTypeParameters) {
throw new UnsupportedPattern(toString(), this);
Expand Down
13 changes: 12 additions & 1 deletion src/org/rascalmpl/debug/DebugHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static org.rascalmpl.debug.AbstractInterpreterEventTrigger.newNullEventTrigger;

import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.Map;
import java.util.function.IntSupplier;
Expand All @@ -35,6 +34,7 @@
import org.rascalmpl.interpreter.result.Result;
import org.rascalmpl.repl.output.ICommandOutput;
import org.rascalmpl.repl.rascal.RascalValuePrinter;
import org.rascalmpl.values.IRascalValueFactory;
import org.rascalmpl.values.functions.IFunction;
import org.rascalmpl.values.parsetrees.ITree;

Expand Down Expand Up @@ -376,6 +376,16 @@ protected Function<IValue, IValue> liftProviderFunction(IFunction func) {
}
};
}

@Override
protected IRascalMonitor getMonitor() {
return evaluator.getMonitor();
}

@Override
protected IRascalValueFactory getRascalValueFactory() {
return evaluator.getFunctionValueFactory();
}
};

synchronized (evaluator) { // The evaluator is synchronized here, under the assumption that the evaluator is currently suspended by this thread
Expand Down Expand Up @@ -479,6 +489,7 @@ public void processMessage(IDebugMessage message) {
case SET:
switch (message.getDetail()) {
case CONDITIONAL:
@SuppressWarnings("unchecked")
Pair<ISourceLocation, String> payload = (Pair<ISourceLocation, String>) message.getPayload();
addBreakpoint(payload.getFirst(), payload.getSecond());
break;
Expand Down
10 changes: 9 additions & 1 deletion src/org/rascalmpl/exceptions/RuntimeExceptionFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ public static Throw io(String msg) {
}

private static String mapIOException(IOException ex) {

var msg = ex.getMessage();
if (ex instanceof FileSystemException) {
// nio exceptions lack proper messages, they are encoded in the class name
Expand All @@ -466,12 +467,19 @@ private static String mapIOException(IOException ex) {
return "Not a directory: " + msg;
}
}

if (ex instanceof FileNotFoundException) {
// not all paths throw a proper message, they often only have the path name
return "No such file: " + msg;
}

if (msg == null || msg.length() == 0) {
// the class name has the information about what is going on
msg = ex.getClass().getSimpleName();
}

// otherwise fallback to the message
return msg;
return msg + (ex.getCause() != null ? (", due to: " + ex.getCause().getMessage()) : "");
}

public static Throw io(IOException ex) {
Expand Down
6 changes: 5 additions & 1 deletion src/org/rascalmpl/interpreter/utils/JavaBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,11 @@ public Set<ISourceLocation> findResources(String fileName) {
throw new JavaMethodLink(className, e.getMessage(), e);
}
catch (InvocationTargetException e) {
throw new JavaMethodLink(className, e.getMessage(), e);
String cause = e.getTargetException().getMessage();
if (cause == null || cause.length() == 0 || "null".equals(cause)) {
cause = e.getTargetException().getClass().getSimpleName();
}
throw new JavaMethodLink(className, cause, e);
}
catch (SecurityException e) {
throw new JavaMethodLink(className, e.getMessage(), e);
Expand Down
Loading