Skip to content

Trigger a type check for an entire Rascal project from VS Code#1153

Open
rodinaarssen wants to merge 34 commits into
mainfrom
check-full-project
Open

Trigger a type check for an entire Rascal project from VS Code#1153
rodinaarssen wants to merge 34 commits into
mainfrom
check-full-project

Conversation

@rodinaarssen

Copy link
Copy Markdown
Member

This PR adds:

  • a Rascal function that, given the root directory of a project, instructs the type checker to type check all Rascal files in the project (based on the PathConfig)
  • context menu items to the Explorer view in VS Code to trigger said Rascal function
  • machinery to connect these together

This PR may depend on a release of Rascal that contains usethesource/rascal#2815

@rodinaarssen
rodinaarssen requested a review from DavyLandman July 9, 2026 18:48
Comment thread rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/IBaseTextDocumentService.java Outdated

@DavyLandman DavyLandman left a comment

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.

Very nice! I have some small remarks. But the most important one is that I'm missing a UI test for this feature.

<dependencyMsgs, checkedForImports, dependencies> = buildDependencyGraph(checkForImports, openFileHeader.src, workspaceFolders, getParseTree, getPathConfig);

if ([] != dependencyMsgs) {
// Since we only reported errors on `l`, there is not need to analyze to which files the errors belong here.

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.

how is this true? can't we have error from our dependencies?

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 the "check-on-save" path, where errors have never been reported on dependencies, but on the file itself

Comment thread rascal-vscode-extension/src/RascalExtension.ts Outdated

@toinehartman toinehartman left a comment

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.

Nice feature! Looks good. I don't love the additional document service endpoint, since it's only for Rascal (and does not mean anything for parametric or the to-be-added routing server).

Comment thread rascal-vscode-extension/package.json
Comment thread rascal-lsp/src/main/rascal/lsp/lang/rascal/lsp/IDECheckerWrapper.rsc Outdated
Comment thread rascal-vscode-extension/src/RascalExtension.ts
@sonarqubecloud

Copy link
Copy Markdown

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.

3 participants