Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
51b6393
Added an interface for a remote resolver registry
rodinaarssen Jan 7, 2026
8adb46e
Ported over FileAttributesResult from rascal-lsp
rodinaarssen Jan 7, 2026
3cb33d9
Merge branch 'main' into unify-vfs-interfaces
rodinaarssen Jan 16, 2026
f300250
Renamed fallback to external in WatchRegistry
rodinaarssen Jan 16, 2026
052ae18
Fixed layout issues
rodinaarssen Jan 16, 2026
513ffb3
Changed URI to ISourceLocation in remote resolver interface
rodinaarssen Jan 16, 2026
a144fe5
Removed FallbackResolver in favor of external resolver registry in UR…
rodinaarssen Jan 16, 2026
842881a
Removed method from remote interface
rodinaarssen Jan 16, 2026
3284a32
Added IExternalResolverRegistry interface
rodinaarssen Jan 16, 2026
16c4bb2
Added client side for remote resolver registry
rodinaarssen Jan 16, 2026
9fe54a6
RascalShell connects to external resolver registry when provided with…
rodinaarssen Jan 16, 2026
82d2ae9
Merge branch 'main' into unify-vfs-interfaces
rodinaarssen Jan 22, 2026
177f099
Merge branch 'main' into unify-vfs-interfaces
rodinaarssen Jan 22, 2026
d494609
Using new GsonUtils configuration function
rodinaarssen Jan 23, 2026
01d2b66
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Jan 26, 2026
8febaae
Merge branch 'main' into unify-vfs-interfaces
rodinaarssen Jan 30, 2026
f6328c8
Merge branch 'main' into unify-vfs-interfaces
rodinaarssen Jan 30, 2026
9490e8c
Merge branch 'main' into unify-vfs-interfaces
rodinaarssen Feb 5, 2026
8cebae8
RemoteExternalResolverRegistry now correctly throws plain IOExceptions
rodinaarssen Feb 6, 2026
b25f48c
Ported over NamedThreadPool from rascal-lsp
rodinaarssen Feb 10, 2026
387b853
Ported over Watch-related classes from rascal-lsp
rodinaarssen Feb 10, 2026
f0de47f
Working on implementing remote watches
rodinaarssen Feb 10, 2026
0c56761
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Feb 10, 2026
20f6541
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Feb 11, 2026
a57d1c3
Ported over Lazy from rascal-lsp
rodinaarssen Feb 11, 2026
88a6696
Reinstated directory listing cache for jsonrpc that was present befor…
rodinaarssen Feb 11, 2026
2d1c2cc
Reinstated handling of native jsonrpc error codes from rascal-lsp
rodinaarssen Feb 11, 2026
674c6d8
Using NamedThreadPool instead of DaemonThreadPool
rodinaarssen Feb 20, 2026
8364a67
Introduced constants instead of magic numbers for errors
rodinaarssen Feb 20, 2026
32b542a
RemoteExternalResolverRegistry now forwards setLastModified to the re…
rodinaarssen Feb 20, 2026
1d728fd
RemoteExternalResolverRegistry now forwards supportsRecursiveWatch to…
rodinaarssen Feb 20, 2026
cfc7cf6
Using streaming Base64 for remote getOutputStream
rodinaarssen Feb 20, 2026
4f975d3
Fixed remote getInputStream: using (streaming) Base64 decoding
rodinaarssen Feb 20, 2026
fa96e91
Removed SourceLocation wrapper class
rodinaarssen Feb 20, 2026
f74831f
Replaced --vfsPort argument with an environment variable such that UR…
rodinaarssen Feb 20, 2026
169d811
Removed the plain join() from the remote watch call
rodinaarssen Feb 20, 2026
269b8f1
Imports
rodinaarssen Feb 20, 2026
971fd4f
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Feb 24, 2026
c7a57f7
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Feb 26, 2026
1b2f38c
Removed FileChangeEvent and FileChangeType from IRemoveResolverRegistry
rodinaarssen Mar 4, 2026
9d2862c
Added value to ISourceLocationChangeType enum
rodinaarssen Mar 4, 2026
ebc14b2
Implemented remote watch callbacks
rodinaarssen Mar 4, 2026
b5f72f5
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Mar 4, 2026
d28de94
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Mar 5, 2026
a2e6234
Moved default server implementation for remote Rascal FS access to Ra…
rodinaarssen Mar 6, 2026
65555f2
Got rid of FileAttributesResult in favor of FileAttributes
rodinaarssen Mar 6, 2026
7a901fc
Changed remote resolver interfaces to align the writeFile signature t…
rodinaarssen Mar 6, 2026
13fa13b
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Mar 10, 2026
f6eb9ab
Added option to JsonValueWriter whether or not to encode file locatio…
rodinaarssen Mar 11, 2026
78de993
Using new JsonValueWriter option in GsonUtils
rodinaarssen Mar 11, 2026
4c87e06
Update src/org/rascalmpl/uri/remote/RemoteExternalResolverRegistry.java
rodinaarssen Mar 11, 2026
2f3e97d
Merge remote-tracking branch 'refs/remotes/origin/unify-vfs-interface…
rodinaarssen Mar 11, 2026
df9b5ad
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Mar 11, 2026
8e5db3f
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Mar 12, 2026
e940415
Forwarding watch id
rodinaarssen Mar 13, 2026
eb7e4de
Removed public qualifier from interface field
rodinaarssen Mar 13, 2026
e44cb59
RemoteExternalResolverRegistry now detects disconnections and automat…
rodinaarssen Mar 13, 2026
167847d
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Mar 17, 2026
c7c087c
Removed VS Code-specific logic and exception handling from IRascalFil…
rodinaarssen Mar 18, 2026
3fd308e
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Mar 18, 2026
26a6c04
Made field private
rodinaarssen Mar 18, 2026
5135a40
Renamed IRemoteResolverRegistry to IRemoteResolverRegistryServer
rodinaarssen Mar 24, 2026
2b67b36
Added IRemoteResolverRegistryClient interface
rodinaarssen Mar 24, 2026
dc27228
Using new IRemoveResolverServer and -Client interfaces
rodinaarssen Mar 24, 2026
e9aeeac
Removed FileChangeType enum in favor of ISourceLocationChanged interf…
rodinaarssen Mar 24, 2026
0c44a28
Renamed IRascalFileSystemServices to RascalFileSystemServices as this…
rodinaarssen Mar 24, 2026
68d76fe
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Mar 24, 2026
3303ff5
Registration of remote resolver is now publicly available such that R…
rodinaarssen Mar 24, 2026
6530f8a
Fixed NPE; no synchronizing on nullable objects
rodinaarssen Mar 25, 2026
1ea9070
Changed interface to have a plain integer instead of an enum
rodinaarssen Mar 25, 2026
e1d4dfc
Fixed watch callback argument
rodinaarssen Mar 25, 2026
abd9385
Removed FileChangeEvent class in favor of ISourceLocationChanged
rodinaarssen Mar 25, 2026
466cf1d
Removed comment
rodinaarssen Mar 26, 2026
4491bc0
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Mar 26, 2026
388ac3f
Added jsonrpc request and notification classes for modularity and cha…
rodinaarssen Mar 27, 2026
4654a6a
Added jsonrpc response classes for modularity and changed the signatu…
rodinaarssen Mar 31, 2026
c2dd1f7
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Mar 31, 2026
1a086e7
Apply suggestions from code review
rodinaarssen Apr 1, 2026
3ca1ae5
Factored out catch-reconnect-throw pattern from reconnecting input/ou…
rodinaarssen Apr 1, 2026
cd94881
Removed unnecessary block scope
rodinaarssen Apr 1, 2026
9c29f77
Using @JsonSegment for cleaner jsonrpc interface defintions
rodinaarssen Apr 1, 2026
3e452a8
Removed unnecessary null check
rodinaarssen Apr 1, 2026
dd5c50f
Removed REPL prints during remote watch/unwatch calls
rodinaarssen Apr 1, 2026
2bb863d
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Apr 1, 2026
aecab65
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Apr 1, 2026
ddae704
RemoteExternalResolverRegistry now synchronizes on the directory list…
rodinaarssen Apr 1, 2026
87240dd
Fixed jsonrpc method names
rodinaarssen Apr 1, 2026
15b59ab
Javadoc
rodinaarssen Apr 2, 2026
e186aa0
The JsonValueWriter option fileLocationsAsPathOnly is now exposed as …
rodinaarssen Apr 3, 2026
b44fce1
Added missing equals/hashcode implementations for several request/res…
rodinaarssen Apr 3, 2026
290fbf9
Renamed watcher member/parameter to watchId
rodinaarssen Apr 3, 2026
6fb394b
Added comment
rodinaarssen Apr 3, 2026
60d4af2
Introduces interfaces to clean up a lot of boilerplate code in Rascal…
rodinaarssen Apr 3, 2026
84dbe7f
RascalFileSystemServices now uses streaming Base64 en/decoding
rodinaarssen Apr 3, 2026
0afa8c2
Removed unused imports
rodinaarssen Apr 3, 2026
8c8d046
Scheduling reconnect instead of a direct call
rodinaarssen Apr 3, 2026
c5c9668
Removed throwing default implementations of IRemoteResolverRegistrySe…
rodinaarssen Apr 3, 2026
8aaede2
Added copy to the IRemoteResolverRegistryServer interface and impleme…
rodinaarssen Apr 3, 2026
eb77334
Implemented missing methods in RascalFileSystemServices
rodinaarssen Apr 7, 2026
ad5db56
Removed locks in favor of double invalidation to avoid potential dead…
rodinaarssen Apr 7, 2026
aede048
Fixed indentation
rodinaarssen Apr 7, 2026
1b7c9db
Improved logic in isDirectory and isFile
rodinaarssen Apr 7, 2026
b2e358e
Watch now uses the remote call wrapper function
rodinaarssen Apr 7, 2026
714ed81
Watchers class is now private
rodinaarssen Apr 7, 2026
fd57777
Improved locking logic around registration of external resolver registry
rodinaarssen Apr 7, 2026
aec8c40
Rewrote remote watch
rodinaarssen Apr 8, 2026
f73c360
Added comment
rodinaarssen Apr 8, 2026
eaf9cb0
RemoteExternalResolverRegistry now uses a single tread pool
rodinaarssen Apr 8, 2026
84acf0c
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen Apr 8, 2026
58d4673
Removed checker framework annotations from request/response classes
rodinaarssen Apr 8, 2026
5d2bef9
Made all members of request/response classes final
rodinaarssen Apr 8, 2026
8d6ad8b
Removed enum values from ISourceLocationWatcher.ISourceLocationChange…
rodinaarssen Apr 8, 2026
1124c93
Catching socketException around available
rodinaarssen Apr 8, 2026
a03b929
Using correct translation for ISourceLocationChanged
rodinaarssen Apr 8, 2026
f1ad341
Added callback to Base64EncodingOutputStream that runs after close
rodinaarssen Apr 8, 2026
e549d40
Avoiding extra allocation of byte array by providing a callback
rodinaarssen Apr 8, 2026
25a1f53
Layout
rodinaarssen Apr 8, 2026
77bb3d0
Reordered some interfaces and renames some parameters for uniformity
rodinaarssen Apr 8, 2026
5a67222
Added license header
rodinaarssen Apr 8, 2026
4db63e4
Layout
rodinaarssen Apr 8, 2026
0261916
Unused imports
rodinaarssen Apr 8, 2026
a4514cf
Removed another Nullable annotation from request class
rodinaarssen Apr 8, 2026
7dc8080
Removed nullable annotation from RemoteExternalResolverRegistry
rodinaarssen Apr 8, 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
1 change: 1 addition & 0 deletions src/org/rascalmpl/ideservices/GsonUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public class GsonUtils {
*/
static {
writer.setRationalsAsString(true);
writer.setFileLocationsAsPathOnly(false);
typeMappings = List.of(
new TypeMapping(IBool.class, tf.boolType()),
new TypeMapping(ICollection.class), // IList, IMap, ISet
Expand Down
2 changes: 1 addition & 1 deletion src/org/rascalmpl/library/Content.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ data Response
= response(Status status, str mimeType, map[str,str] header, str content)
| fileResponse(loc file, str mimeType, map[str,str] header)
| jsonResponse(Status status, map[str,str] header, value val, str dateTimeFormat = "yyyy-MM-dd\'T\'HH:mm:ss\'Z\'", JSONFormatter[value] formatter = str (value _) { fail; },
bool explicitConstructorNames=false, bool explicitDataTypes=false, bool dateTimeAsInt=true, bool rationalsAsString=false)
bool explicitConstructorNames=false, bool explicitDataTypes=false, bool dateTimeAsInt=true, bool rationalsAsString=false, bool fileLocationsAsPathOnly=true)
;

@synopsis{Utility to quickly render a string as HTML content}
Expand Down
6 changes: 4 additions & 2 deletions src/org/rascalmpl/library/lang/json/IO.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public IValue parseJSON(IValue type, IString src, IString dateTimeFormat, IBool

public void writeJSON(ISourceLocation loc, IValue value, IBool unpackedLocations, IString dateTimeFormat,
IBool dateTimeAsInt, IBool rationalsAsString, IInteger indent, IBool dropOrigins, IFunction formatter, IBool explicitConstructorNames,
IBool explicitDataTypes) {
IBool explicitDataTypes, IBool fileLocationsAsPathOnly) {
try (JsonWriter out =
new JsonWriter(new OutputStreamWriter(URIResolverRegistry.getInstance().getOutputStream(loc, false),
Charset.forName("UTF8")))) {
Expand All @@ -123,6 +123,7 @@ public void writeJSON(ISourceLocation loc, IValue value, IBool unpackedLocations
.setFormatters(formatter)
.setExplicitConstructorNames(explicitConstructorNames.getValue())
.setExplicitDataTypes(explicitDataTypes.getValue())
.setFileLocationsAsPathOnly(fileLocationsAsPathOnly.getValue())
.write(out, value);
}
catch (IOException e) {
Expand All @@ -132,7 +133,7 @@ public void writeJSON(ISourceLocation loc, IValue value, IBool unpackedLocations

public IString asJSON(IValue value, IBool unpackedLocations, IString dateTimeFormat, IBool dateTimeAsInt, IBool rationalsAsString,
IInteger indent, IBool dropOrigins, IFunction formatter, IBool explicitConstructorNames,
IBool explicitDataTypes) {
IBool explicitDataTypes, IBool fileLocationsAsPathOnly) {
StringWriter string = new StringWriter();

try (JsonWriter out = new JsonWriter(string)) {
Expand All @@ -148,6 +149,7 @@ public IString asJSON(IValue value, IBool unpackedLocations, IString dateTimeFor
.setFormatters(formatter)
.setExplicitConstructorNames(explicitConstructorNames.getValue())
.setExplicitDataTypes(explicitDataTypes.getValue())
.setFileLocationsAsPathOnly(fileLocationsAsPathOnly.getValue())
.write(out, value);

return values.string(string.toString());
Expand Down
5 changes: 3 additions & 2 deletions src/org/rascalmpl/library/lang/json/IO.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ java void writeJSON(loc target, value val,
bool dropOrigins=true,
JSONFormatter[value] formatter = str (value _) { fail; },
bool explicitConstructorNames=false,
bool explicitDataTypes=false
bool explicitDataTypes=false,
bool fileLocationsAsPathOnly=true
);

@javaClass{org.rascalmpl.library.lang.json.IO}
Expand All @@ -184,7 +185,7 @@ java void writeJSON(loc target, value val,
@description{
This function uses `writeJSON` and stores the result in a string.
}
java str asJSON(value val, bool unpackedLocations=false, str dateTimeFormat=DEFAULT_DATETIME_FORMAT, bool dateTimeAsInt=false, bool rationalsAsString=false, int indent = 0, bool dropOrigins=true, JSONFormatter[value] formatter = str (value _) { fail; }, bool explicitConstructorNames=false, bool explicitDataTypes=false);
java str asJSON(value val, bool unpackedLocations=false, str dateTimeFormat=DEFAULT_DATETIME_FORMAT, bool dateTimeAsInt=false, bool rationalsAsString=false, int indent = 0, bool dropOrigins=true, JSONFormatter[value] formatter = str (value _) { fail; }, bool explicitConstructorNames=false, bool explicitDataTypes=false, bool fileLocationsAsPathOnly=true);

@synopsis{((writeJSON)) and ((asJSON)) uses `Formatter` functions to flatten structured data to strings, on-demand}
@description{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public class JsonValueWriter {
private IFunction formatters;
private boolean explicitConstructorNames = false;
private boolean explicitDataTypes;
private boolean fileLocationsAsPathOnly = true;

/** helper class for number serialization without quotes */
private static class RascalNumber extends Number {
Expand Down Expand Up @@ -163,6 +164,11 @@ public JsonValueWriter setExplicitDataTypes(boolean setting) {
return this;
}

public JsonValueWriter setFileLocationsAsPathOnly(boolean setting) {
this.fileLocationsAsPathOnly = setting;
return this;
}

public void write(JsonWriter out, IValue value) throws IOException {
value.accept(new IValueVisitor<Void, IOException>() {

Expand Down Expand Up @@ -262,7 +268,7 @@ public Void visitSourceLocation(ISourceLocation o) throws IOException {
}
else {
if (!o.hasOffsetLength()) {
if ("file".equals(o.getScheme())) {
if (fileLocationsAsPathOnly && "file".equals(o.getScheme())) {
out.value(o.getPath());
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import Node;
loc targetFile = |memory://test-tmp/test-<"<uuidi()>">.json|;
public int maxLong = floor(pow(2,63));

bool writeRead(type[&T] returnType, &T dt, value (value x) normalizer = value(value x) { return x; }, bool dateTimeAsInt=false, bool rationalsAsString=false, bool unpackedLocations=false, bool explicitConstructorNames=false, bool explicitDataTypes=false) {
json = asJSON(dt, dateTimeAsInt=dateTimeAsInt, rationalsAsString=rationalsAsString, unpackedLocations=unpackedLocations, explicitConstructorNames=explicitConstructorNames, explicitDataTypes=explicitDataTypes);
bool writeRead(type[&T] returnType, &T dt, value (value x) normalizer = value(value x) { return x; }, bool dateTimeAsInt=false, bool rationalsAsString=false, bool unpackedLocations=false, bool explicitConstructorNames=false, bool explicitDataTypes=false, bool fileLocationsAsPathOnly=true) {
json = asJSON(dt, dateTimeAsInt=dateTimeAsInt, rationalsAsString=rationalsAsString, unpackedLocations=unpackedLocations, explicitConstructorNames=explicitConstructorNames, explicitDataTypes=explicitDataTypes, fileLocationsAsPathOnly=fileLocationsAsPathOnly);
readBack = normalizer(parseJSON(returnType, json, explicitConstructorNames=explicitConstructorNames, explicitDataTypes=explicitDataTypes));
if (readBack !:= normalizer(dt) /* ignores additional src fields */) {
println("What is read back, a <type(typeOf(readBack),())>:");
Expand Down Expand Up @@ -59,6 +59,7 @@ test bool jsonWithNum1(num dt) = writeRead(#num, dt, normalizer=numNormalizer);

test bool jsonWithLoc1(loc dt) = writeRead(#loc, dt);
test bool jsonWithLoc2(loc dt) = writeRead(#loc, dt, unpackedLocations=true);
test bool jsonWithLoc3(loc dt) = writeRead(#loc, dt, fileLocationsAsPathOnly=false);
test bool jsonWithStr1(str dt) = writeRead(#str, dt);
test bool jsonWithDatetime1(datetime dt) = writeRead(#datetime, dt);
test bool jsonWithDatetime2(datetime dt) = writeRead(#datetime, dt, dateTimeAsInt=true);
Expand Down
2 changes: 2 additions & 0 deletions src/org/rascalmpl/library/util/TermREPL.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ private ICommandOutput handleJSONResponse(IConstructor response) {
IValue formatters = kws.getParameter("formatter");
IValue ecn = kws.getParameter("explicitConstructorNames");
IValue edt = kws.getParameter("explicitDataTypes");
IValue fpo = kws.getParameter("fileLocationsAsPathOnly");

JsonValueWriter writer = new JsonValueWriter()
.setCalendarFormat(dtf != null ? ((IString) dtf).getValue() : "yyyy-MM-dd\'T\'HH:mm:ss\'Z\'")
Expand All @@ -294,6 +295,7 @@ private ICommandOutput handleJSONResponse(IConstructor response) {
.setRationalsAsString(ras != null ? ((IBool) ras).getValue() : false)
.setExplicitConstructorNames(ecn != null ? ((IBool) ecn).getValue() : false)
.setExplicitDataTypes(edt != null ? ((IBool) edt).getValue() : false)
.setFileLocationsAsPathOnly(edt != null ? ((IBool) fpo).getValue() : true)
;

return new ICommandOutput() {
Expand Down
2 changes: 2 additions & 0 deletions src/org/rascalmpl/library/util/Webserver.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ private Response translateJsonResponse(Method method, IConstructor cons) {
IValue formatters = kws.getParameter("formatter");
IValue ecn = kws.getParameter("explicitConstructorNames");
IValue edt = kws.getParameter("explicitDataTypes");
IValue fpo = kws.getParameter("fileLocationsAsPathOnly");

JsonValueWriter writer = new JsonValueWriter()
.setCalendarFormat(dtf != null ? ((IString) dtf).getValue() : "yyyy-MM-dd\'T\'HH:mm:ss\'Z\'")
Expand All @@ -253,6 +254,7 @@ private Response translateJsonResponse(Method method, IConstructor cons) {
.setRationalsAsString(ras != null ? ((IBool) ras).getValue() : false)
.setExplicitConstructorNames(ecn != null ? ((IBool) ecn).getValue() : false)
.setExplicitDataTypes(edt != null ? ((IBool) edt).getValue() : false)
.setFileLocationsAsPathOnly(fpo != null ? ((IBool) fpo).getValue() : true)
;

try {
Expand Down
2 changes: 2 additions & 0 deletions src/org/rascalmpl/repl/http/REPLContentServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ private static Response translateJsonResponse(Method method, IConstructor cons)
IValue formatters = kws.getParameter("formatter");
IValue ecn = kws.getParameter("explicitConstructorNames");
IValue edt = kws.getParameter("explicitDataTypes");
IValue fpo = kws.getParameter("fileLocationsAsPathOnly");

JsonValueWriter writer = new JsonValueWriter()
.setCalendarFormat(dtf != null ? ((IString) dtf).getValue() : "yyyy-MM-dd\'T\'HH:mm:ss\'Z\'")
Expand All @@ -175,6 +176,7 @@ private static Response translateJsonResponse(Method method, IConstructor cons)
.setRationalsAsString(ras != null ? ((IBool) ras).getValue() : false)
.setExplicitConstructorNames(ecn != null ? ((IBool) ecn).getValue() : false)
.setExplicitDataTypes(edt != null ? ((IBool) edt).getValue() : false)
.setFileLocationsAsPathOnly(fpo != null ? ((IBool) fpo).getValue() : true);
;

try {
Expand Down
5 changes: 1 addition & 4 deletions src/org/rascalmpl/shell/RascalShell.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
package org.rascalmpl.shell;

import java.io.IOException;
import java.io.Writer;
import java.io.PrintWriter;
import java.io.Writer;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;

Expand All @@ -38,9 +38,6 @@ public static void main(String[] args) throws IOException {
for (; i < args.length; i++) {
if (args[i].equals("--remoteIDEServicesPort")) {
ideServicesPort = Integer.parseInt(args[++i]);
} else if (args[i].equals("--vfsPort")) {
System.err.println("Ignored parameter --vfsPort and its argument");
i++; // skip the argument
} else if (args[i].startsWith("--")) {
// Currently unknown named argument, skipping over this
System.err.println("Ignored parameter " + args[i]);
Expand Down
39 changes: 39 additions & 0 deletions src/org/rascalmpl/uri/IExternalResolverRegistry.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2018-2026, NWO-I CWI and Swat.engineering
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package org.rascalmpl.uri;

public interface IExternalResolverRegistry extends ISourceLocationInputOutput, ILogicalSourceLocationResolver, ISourceLocationWatcher {
@Override
default String scheme() {
throw new UnsupportedOperationException("'scheme' is not supported for external resolvers");
}

@Override
default String authority() {
throw new UnsupportedOperationException("`authority` is not supported for external resolvers");
}
}
4 changes: 2 additions & 2 deletions src/org/rascalmpl/uri/ISourceLocationInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ default long created(ISourceLocation uri) throws IOException {
/** In bytes !only for internal use! */
long size(ISourceLocation uri) throws IOException;
boolean isDirectory(ISourceLocation uri);
boolean isFile(ISourceLocation uri) ;
boolean isFile(ISourceLocation uri);
boolean isReadable(ISourceLocation uri) throws IOException;

String[] list(ISourceLocation uri) throws IOException;
String[] list(ISourceLocation uri) throws IOException;
String scheme();
boolean supportsHost();
default boolean supportsReadableFileChannel() {
Expand Down
7 changes: 3 additions & 4 deletions src/org/rascalmpl/uri/ISourceLocationWatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public interface ISourceLocationWatcher {
*/
boolean supportsRecursiveWatch();


public interface ISourceLocationChanged {
ISourceLocation getLocation();
ISourceLocationChangeType getChangeType();
Expand All @@ -63,9 +62,9 @@ default boolean isChanged() {
}

public enum ISourceLocationChangeType {
CREATED(),
DELETED(),
MODIFIED()
CREATED,
DELETED,
MODIFIED;
}

static ISourceLocationChanged created(ISourceLocation loc) {
Expand Down
Loading
Loading