Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
cdb31e4
added initial webclient API that mirrors the Webserver API and uses t…
jurgenvinju May 11, 2026
b0c95c2
cleanup and added POST method
jurgenvinju May 11, 2026
f93bc31
added the other methods
jurgenvinju May 11, 2026
f596732
added progress bar
jurgenvinju May 11, 2026
5a10d11
fixed post
jurgenvinju May 12, 2026
3058f74
constructor typo
jurgenvinju May 12, 2026
a3a1bad
fix post bug
jurgenvinju May 12, 2026
7092ce8
added path to other requests kinds but GET and POST
jurgenvinju May 12, 2026
99ca901
Merge branch 'main' into feat/webclient
jurgenvinju May 19, 2026
a7dfdf9
started rewrite of Server and Client interface to canonically treat a…
jurgenvinju May 19, 2026
3e89716
big cleanup of Webclient, but Webserver is broken now and I still hav…
jurgenvinju May 21, 2026
0ea8d9c
debugging with @davylandman
jurgenvinju May 21, 2026
73dd585
linked up the Subscription API as well to complete the stream
jurgenvinju May 22, 2026
3bef1c0
improving error handling of common mistakes in the client
jurgenvinju May 22, 2026
7ec7468
factored out Writer-based suppliers
jurgenvinju May 22, 2026
d4d1e68
added asserts to diagnose possible race
jurgenvinju May 22, 2026
aba5882
error handling for bad URLs
jurgenvinju May 22, 2026
f16c064
removed dead use of parameter
jurgenvinju May 22, 2026
c197d9d
this seems to have fixed the race
jurgenvinju May 22, 2026
8ec4c70
comments
jurgenvinju May 22, 2026
f8f500c
deal with null messages of IOException generally
jurgenvinju May 22, 2026
39c0744
fixed off-by-one in download progress
jurgenvinju May 23, 2026
8d717be
rewrote the webserver side to accept the new Body constructors send a…
jurgenvinju May 26, 2026
5326eb7
server is working again
jurgenvinju May 27, 2026
df1b0e7
added xml and html sending and receiving, only server side reception …
jurgenvinju May 27, 2026
74f4b12
refactoring that factors common WriterToInputStream functionality int…
jurgenvinju May 27, 2026
e26aa14
fixing issues with module management in client and server
jurgenvinju May 28, 2026
d4e5744
rationalized JSON options
jurgenvinju May 28, 2026
5f04d79
cleanup of Webservice module and added some example usages
jurgenvinju May 28, 2026
84cf3ee
linked charset parameter of POST and PUT bodies
jurgenvinju May 28, 2026
a756cc1
finished charset and mimetype propagation to POSt and PUT headers
jurgenvinju May 28, 2026
c6d9105
wired server side mimeType and response for bodies
jurgenvinju May 28, 2026
ac6fd35
fixed copy/paste bug
jurgenvinju May 28, 2026
d36874e
fixed switch case missing break bug
jurgenvinju May 28, 2026
dca2731
added missing file
jurgenvinju May 28, 2026
3902b73
added more headers
jurgenvinju May 28, 2026
227cc57
Merge branch 'main' into feat/webclient
jurgenvinju May 28, 2026
566b6c5
fixing more comments by @davylandman
jurgenvinju May 28, 2026
74fcc9f
wrote a test server that does not lock the interpreter but does use a…
jurgenvinju May 28, 2026
5869541
some fixes. not yet working
jurgenvinju May 28, 2026
04c9185
test servers are working
jurgenvinju May 29, 2026
7a0e98a
writing first good tests. they still fail
jurgenvinju May 29, 2026
d0fa8f9
fixing things one-by-one
jurgenvinju May 29, 2026
e28f908
fixed sloppy NPEs
jurgenvinju May 29, 2026
d0bf6fc
fixed content-type for POST and PUT bodies in client
jurgenvinju May 29, 2026
22bf4c4
big rewrite to Undertow modern HTTP server in Java, removed clone of …
jurgenvinju Jun 1, 2026
8c05cb5
cleaning up
jurgenvinju Jun 1, 2026
ceefc0f
one more compilation error
jurgenvinju Jun 1, 2026
46a9c0e
fixed some warnings to get overview back
jurgenvinju Jun 1, 2026
e12c7c1
bumped to Java 17 because Undertow requires it
jurgenvinju Jun 1, 2026
907c3d0
solved issues with new yield keyword in Java 17
jurgenvinju Jun 1, 2026
4815bec
bumped action workflow to Java 17
jurgenvinju Jun 1, 2026
90fcc58
fixing stuff after jump to Java 17
jurgenvinju Jun 1, 2026
cd3144b
some more fixes to get the server working again. almost there
jurgenvinju Jun 1, 2026
d5ee144
fixes and cleanup
jurgenvinju Jun 2, 2026
4881bc6
can call test server with builtin client
jurgenvinju Jun 2, 2026
ce65528
fixed sending and receiving HTMLElement instances over http (client/s…
jurgenvinju Jun 2, 2026
1dc3427
added XML roundtrip testing
jurgenvinju Jun 2, 2026
64d2945
fixed XML roundtripping
jurgenvinju Jun 2, 2026
2043955
added HTMLOptions for later use by requests
jurgenvinju Jun 3, 2026
d79f5bf
rationalized and finished JSON options
jurgenvinju Jun 3, 2026
2e423b6
threaded HTML options
jurgenvinju Jun 3, 2026
570876d
streamed XML options too
jurgenvinju Jun 3, 2026
74b5d4c
added xmlOptions to BodyKind
jurgenvinju Jun 3, 2026
bb25e65
enabled automatic port allocation for util::Webserver
jurgenvinju Jun 3, 2026
e6be501
added precision parameter
jurgenvinju Jun 3, 2026
45b1d77
added precision parameter
jurgenvinju Jun 3, 2026
93ce12e
workaround
jurgenvinju Jun 3, 2026
0cb24c8
a rather difficult merge
jurgenvinju Jun 3, 2026
aeeefd3
Merge branch 'main' into feat/webclient
jurgenvinju Jun 11, 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@v5
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@v5
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@v5
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@v5
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
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
<maven-version>3.9.16</maven-version>
<exec.mainClass>org.rascalmpl.shell.RascalShell</exec.mainClass>
<rascal.test.memory>3</rascal.test.memory>
<maven.compiler.release>11</maven.compiler.release>
<rascal-maven.version>0.31.0</rascal-maven.version>
<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();

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is superfluous now

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
Loading