Skip to content

Unify VFS interfaces#2641

Draft
rodinaarssen wants to merge 57 commits intomainfrom
unify-vfs-interfaces
Draft

Unify VFS interfaces#2641
rodinaarssen wants to merge 57 commits intomainfrom
unify-vfs-interfaces

Conversation

@rodinaarssen
Copy link
Member

@rodinaarssen rodinaarssen commented Feb 11, 2026

Closes #2701

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 2.85714% with 442 lines in your changes missing coverage. Please review.
✅ Project coverage is 46%. Comparing base (3e0ccc6) to head (e44cb59).

Files with missing lines Patch % Lines
...mpl/uri/remote/RemoteExternalResolverRegistry.java 0% 235 Missing ⚠️
...ascalmpl/uri/remote/IRascalFileSystemServices.java 0% 108 Missing ⚠️
...org/rascalmpl/uri/vfs/IRemoteResolverRegistry.java 0% 63 Missing ⚠️
src/org/rascalmpl/uri/URIResolverRegistry.java 21% 9 Missing and 2 partials ⚠️
src/org/rascalmpl/util/NamedThreadPool.java 0% 10 Missing ⚠️
src/org/rascalmpl/uri/watch/WatchRegistry.java 0% 6 Missing ⚠️
src/org/rascalmpl/util/Lazy.java 0% 5 Missing ⚠️
...c/org/rascalmpl/uri/IExternalResolverRegistry.java 0% 2 Missing ⚠️
...pl/library/lang/json/internal/JsonValueWriter.java 75% 0 Missing and 1 partial ⚠️
src/org/rascalmpl/uri/ISourceLocationWatcher.java 85% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##              main   #2641    +/-   ##
========================================
- Coverage       46%     46%    -1%     
+ Complexity    6679    6674     -5     
========================================
  Files          795     801     +6     
  Lines        65905   66314   +409     
  Branches      9881    9911    +30     
========================================
- Hits         30716   30707     -9     
- Misses       32804   33222   +418     
  Partials      2385    2385            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@toinehartman toinehartman left a comment

Choose a reason for hiding this comment

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

All of this (and the companion PR usethesource/rascal-language-servers#967) look like a nice unification and clean-up of interfaces.

Copy link
Member

@DavyLandman DavyLandman left a comment

Choose a reason for hiding this comment

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

It's making progress, but it's not there yet.

return this.callbacks.isEmpty();
}

public void publish(ISourceLocationWatcher.ISourceLocationChanged changed) {
Copy link
Member

Choose a reason for hiding this comment

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

this method should be called somewhere from the jsonrpc side?

this.externalRegistry = externalRegistry;
watchers.setExternalRegistry(externalRegistry);
}

Copy link
Member

Choose a reason for hiding this comment

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

what if this is called after loadServices then it will never be seen. The rest of this URIRegistryResolver has a lot of logic to make sure it loads resolvers correctly, no matter which path is taken.

I think we should consider something like an environment setting or something like that to make sure we don't get into messy initialization bugs.

import io.usethesource.vallang.ISourceLocation;

public interface IRascalFileSystemServices extends IRemoteResolverRegistry {
static final URIResolverRegistry reg = URIResolverRegistry.getInstance();
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
static final URIResolverRegistry reg = URIResolverRegistry.getInstance();
private static final URIResolverRegistry reg = URIResolverRegistry.getInstance();

Copy link
Member Author

@rodinaarssen rodinaarssen Mar 11, 2026

Choose a reason for hiding this comment

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

private is not allowed on interface fields

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adapt VS Code & rascal lsp to be able to start a repl a rascal version thats not the one shipped with VS Code

3 participants