Skip to content

[POM-leading for DSLs] Routing to dedicated remote language servers#1069

Open
toinehartman wants to merge 85 commits into
feature/1010-pom-leading-for-dsls/finalfrom
feature/1010-pom-leading-for-dsls/remote-routing
Open

[POM-leading for DSLs] Routing to dedicated remote language servers#1069
toinehartman wants to merge 85 commits into
feature/1010-pom-leading-for-dsls/finalfrom
feature/1010-pom-leading-for-dsls/remote-routing

Conversation

@toinehartman
Copy link
Copy Markdown
Member

@toinehartman toinehartman commented Apr 28, 2026

This PR is the first of a series. gradually implementing POM-leading behavior in DSLs/the parametric server.
This PR introduces a routing language server, which delegates incoming LSP requests to the appropriate parametric language server, dedicated to a single language. A dedicated server is started upon initial language registration.

Closes #1076

@toinehartman toinehartman self-assigned this Apr 28, 2026
@toinehartman toinehartman added the enhancement New feature or request label Apr 28, 2026
@toinehartman toinehartman changed the base branch from main to feature/1010-pom-leading-for-dsls/final April 28, 2026 16:23
@toinehartman toinehartman force-pushed the feature/1010-pom-leading-for-dsls/remote-routing branch from b434ff4 to 6f475fe Compare May 11, 2026 14:57
@toinehartman toinehartman force-pushed the feature/1010-pom-leading-for-dsls/remote-routing branch from 600df56 to 3ed29d4 Compare May 12, 2026 11:51
@toinehartman toinehartman force-pushed the feature/1010-pom-leading-for-dsls/remote-routing branch from 3ed29d4 to 2b01979 Compare May 12, 2026 11:59
@toinehartman toinehartman marked this pull request as ready for review May 12, 2026 12:22
@toinehartman toinehartman linked an issue May 12, 2026 that may be closed by this pull request
, "-cp", classPath
, "org.rascalmpl.vscode.lsp.parametric.ParametricLanguageServer"
, "--exitWhenEmpty"
// , new GsonBuilder().create().toJson(lang, LanguageParameter.class).replace("\"", "\\\"") // escape JSON string on command line
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.

It would be nice you use the dedicated language feature of the parametric LSP here, but then we should also probably swallow the registerLanguage call that triggered this, as otherwise, we are registering twice and wasting resources.

Copy link
Copy Markdown
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.

I think this is heading in the right direction. But it's not ready yet.

private final Map<String, String> languagesByExtension = new ConcurrentHashMap<>();
// NOTE
// 1. This map should only contains running server processes.
// 2. Upon removal from this map, the process should be killed to avoid resource leaks.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we should also register a shutdown hook to always close our child processes.

@toinehartman toinehartman force-pushed the feature/1010-pom-leading-for-dsls/remote-routing branch from 7ff9ea8 to 7e04b27 Compare May 14, 2026 11:57
@toinehartman toinehartman force-pushed the feature/1010-pom-leading-for-dsls/remote-routing branch from 7e04b27 to 754297e Compare May 14, 2026 12:19
@toinehartman toinehartman force-pushed the feature/1010-pom-leading-for-dsls/remote-routing branch from e44a9fe to 9ce67cd Compare May 15, 2026 13:34
@sonarqubecloud
Copy link
Copy Markdown

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parametric routing layer with dedicated servers

2 participants