-
Notifications
You must be signed in to change notification settings - Fork 14
Trigger a type check for an entire Rascal project from VS Code #1153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rodinaarssen
wants to merge
34
commits into
main
Choose a base branch
from
check-full-project
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
ede3d33
Added a type checker wrapper function to check complete Rascal projects
rodinaarssen 7b5f9ff
Merge remote-tracking branch 'origin/main' into check-full-project
rodinaarssen baad8ee
Added rascal-lsp wiring for full project type checking
rodinaarssen 781c5f3
Added commands to the Explorer view context menu to trigger a full pr…
rodinaarssen a29e4c2
Not using a function a file that no longer exists
rodinaarssen 52fac1a
Fixed small regression issues
rodinaarssen 744673d
Removed commented code
rodinaarssen f72c449
Fixed total amount of work
rodinaarssen f20fd4b
Added nullable annotation
rodinaarssen 31759a8
Aligned compile/check function names
rodinaarssen 5dce8bc
Removed unnecessary function argument
rodinaarssen fcf47b3
Removed default implementation for checkProject
rodinaarssen f779afe
ParametricTextDocumentService now throws an error on checkProject
rodinaarssen 61d2333
Fixed type errors
rodinaarssen 6b796e0
Removed information dialog
rodinaarssen 4ecab5f
Unused imports
rodinaarssen bca5a88
Fixed more type errors
rodinaarssen c21b66e
Added UI test for project checking
rodinaarssen ecd3282
Merge remote-tracking branch 'origin/main' into check-full-project
rodinaarssen 5392ce9
Fixed another type error
rodinaarssen 42176ba
Fixed line number in UI test
rodinaarssen ed1acaf
Fixed test configuration to run all tests instead of only a single one
rodinaarssen 2464118
Fixed expression
rodinaarssen 1131a73
Trying to fix UI test
rodinaarssen 6d70c23
Skip test on macOS
rodinaarssen 10b54f1
Propagating InterruptibleFuture
rodinaarssen 4d3477d
Changed lists into sets of messages
rodinaarssen 536f6ad
Changed sets into lists of messages
rodinaarssen 0ec8a33
Fixed type error
rodinaarssen fb5e1d0
Fixed type error
rodinaarssen d93c20b
Perform more filtering on type checker messages in the IDE
rodinaarssen 975ca16
Changed set to list
rodinaarssen d0061ba
Changed final check in test
rodinaarssen ae01e70
Only run a single test in CI, temporarily
rodinaarssen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/rascal/jsonrpc/CheckProjectRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| /* | ||
| * Copyright (c) 2018-2025, 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.vscode.lsp.rascal.jsonrpc; | ||
|
|
||
| import java.util.Objects; | ||
|
|
||
| import org.checkerframework.checker.nullness.qual.Nullable; | ||
| import org.rascalmpl.values.ValueFactoryFactory; | ||
|
|
||
| import io.usethesource.vallang.IBool; | ||
| import io.usethesource.vallang.ISourceLocation; | ||
|
|
||
| public class CheckProjectRequest { | ||
| private final ISourceLocation loc; | ||
| private final boolean clean; | ||
|
|
||
| public CheckProjectRequest(ISourceLocation loc, boolean clean) { | ||
| this.loc = loc; | ||
| this.clean = clean; | ||
| } | ||
|
|
||
| public ISourceLocation getLocation() { | ||
| return loc; | ||
| } | ||
|
|
||
| public IBool getClean() { | ||
| return ValueFactoryFactory.getValueFactory().bool(clean); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean equals(@Nullable Object obj) { | ||
| if (obj instanceof CheckProjectRequest) { | ||
| var other = (CheckProjectRequest) obj; | ||
| return Objects.equals(loc, other.loc) | ||
| && clean == other.clean; | ||
| } | ||
| return false; | ||
| } | ||
|
|
||
| @Override | ||
| public int hashCode() { | ||
| return Objects.hash(loc, clean); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.