Skip to content

Clean up unused LSPIDEServices class#1038

Closed
toinehartman wants to merge 4 commits intomainfrom
fix/uncouple-and-cleanup
Closed

Clean up unused LSPIDEServices class#1038
toinehartman wants to merge 4 commits intomainfrom
fix/uncouple-and-cleanup

Conversation

@toinehartman
Copy link
Copy Markdown
Member

While working on the design for #1010, I ran into some unused/obsolete classes.

@toinehartman toinehartman self-assigned this Mar 30, 2026
@toinehartman toinehartman added the enhancement New feature or request label Mar 30, 2026
@toinehartman toinehartman force-pushed the fix/uncouple-and-cleanup branch from 8383533 to 1b4686f Compare March 30, 2026 15:35
@toinehartman toinehartman marked this pull request as ready for review March 30, 2026 15:52
@sonarqubecloud
Copy link
Copy Markdown

Reader.nullReader(),
logWriter(customLog, Level.INFO),
logWriter(customLog, Level.ERROR),
services
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.

I'm unsure if this is unused.

What if a DSL does edit from a VS Code action, how will that get wired through to VS Code?

I think the bird IDE contains an example like that.

It might also mean we have to grow our test set before we start working on #1010

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.

All the places where services have been replaced with monitor expected an IRascalMonitor, not a more specialized type like the removed LSPIDEServices. All of the IDE services have been moved in #856 IIUC. :edit is here:

public CompletableFuture<Void> edit(ISourceLocation loc, int viewColumn) {

Copy link
Copy Markdown
Member Author

@toinehartman toinehartman Mar 30, 2026

Choose a reason for hiding this comment

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

Extending the test coverage before rewiring all of this is definitely a good idea.

Copy link
Copy Markdown
Member Author

@toinehartman toinehartman Mar 31, 2026

Choose a reason for hiding this comment

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

Btw, we already have a test for :edit:

it("edit call module via repl", async() => {
const repl = new RascalREPL(bench, driver);
await repl.start();
await repl.execute(":edit demo::lang::pico::LanguageServer", true, Delays.extremelySlow);
await driver.wait(async () => await (await bench.getEditorView().getActiveTab())?.getTitle() === "LanguageServer.rsc", Delays.slow, "LanguageServer should be opened");
});

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.

My concern is about the util::IDEServices::edit function. For which the evaluator casts the monitor to an IDEServices interface if it implements it.

So imagine a VS Code action that has as a side effect edit or perhaps applyDocumentsEdits. This can be both from a rascal evaluator, or a dsl (aka parametric) evaluator.

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.

I think this log from the failing test answers your question:

Warning: 1 07:42:29.631 [warning] [parametric-40] org.rascalmpl.vscode.lsp.parametric.InterpretedLanguageContributions[Pico] |unknown:///| : Could not execute FileSystemChange due to File system error: ENOPRO: No file system provider found for resource 'lsp
+file:/' data: "Unavailable" (@1774942949631 ms)

I'll investigate with @rodinaarssen whether we missed something in #856 or how we can solve this otherwise.

@toinehartman toinehartman marked this pull request as draft April 2, 2026 08:58
@toinehartman
Copy link
Copy Markdown
Member Author

This was premature and not as unused as thought.

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.

2 participants