-
Notifications
You must be signed in to change notification settings - Fork 14
Unify VFS interfaces #967
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
Draft
rodinaarssen
wants to merge
146
commits into
main
Choose a base branch
from
unify-vfs-interfaces
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.
Draft
Unify VFS interfaces #967
Changes from all commits
Commits
Show all changes
146 commits
Select commit
Hold shift + click to select a range
8f3f516
Eliminated URIParameter
rodinaarssen 9c50d7c
Unified delete/remove
rodinaarssen 698fd93
Unified rename
rodinaarssen 7099894
Unified writeFile
rodinaarssen 9f959eb
Towards unification of watch
rodinaarssen 1049763
Unified return type of stat
rodinaarssen 51eaec6
Eliminated ReadFileResult in favor of a plain string
rodinaarssen e1d701c
Eliminated BooleanResult in favor of a plain boolean
rodinaarssen 7094063
Eliminated NumberResult and TimestampResult in favor of a plain long
rodinaarssen a502208
Eliminated DirectoryListingResult
rodinaarssen 37cfa60
Removed now unreferenced interface
rodinaarssen e19e95b
Nullness fix
rodinaarssen b06a5df
Ported FileAttributesResult to rascal
rodinaarssen fa7c652
Removed VsCodeUriResolverServer
rodinaarssen f30d477
Changed references to VSCodeUriResolverServer to the new IRemoteResol…
rodinaarssen 635179e
Updated references in imports to relocated classes
rodinaarssen 88f6886
Fixed indentation
rodinaarssen 5d58432
Updated method names after interface change
rodinaarssen 6c6b13c
Removed interface that is no longer in use
rodinaarssen 2a107bb
Renamed all source location parameters from uri to loc
rodinaarssen e4c37d6
Removed wrapping of locations in ISourceLocationRequest as it no long…
rodinaarssen ff2db44
Fixed layout
rodinaarssen 6ec530f
Updated IRascalFileSystemServices to align with the IRemoteResolverRe…
rodinaarssen ed28b45
Eliminated SourceLocation class
rodinaarssen e59cc0d
Eliminated LocationContent class
rodinaarssen 506c839
Removed FileChangeEvent and FileChangeType as these have moved to Rascal
rodinaarssen ae7f9f3
Using new GsonUtil config methods
rodinaarssen 2c6c7af
Eliminating FallbackResolver
rodinaarssen d1c77cf
Moved schemes endpoint
rodinaarssen 04cce02
Removed qualifiers and annotations from IRascalFileSystemServices
rodinaarssen 5734024
Removed LSPTerminalREPL entirely
rodinaarssen 77a9934
Updated setup of language servers in RascalExtension.ts
rodinaarssen 8edee2c
Changed jsonrpc method names on the TS side
rodinaarssen c816297
Fixed several typo's
rodinaarssen 7c345ff
Removed ISourceLocationRequest and updated all references
rodinaarssen f8d4322
VS Code now implements logical resolution
rodinaarssen 0782638
Temporarily using a snapshot dependency for Rascal
rodinaarssen 0bb3a5f
Merge branch 'main' into unify-vfs-interfaces
rodinaarssen 2c80a46
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen 311c1c8
Merge branch 'main' into unify-vfs-interfaces
rodinaarssen bd6f415
Merge branch 'main' into unify-vfs-interfaces
rodinaarssen 6c2a2b5
Removed NamedThreadPool after porting it to Rascal
rodinaarssen 42f9f5e
Updated references to NamedThreadPool
rodinaarssen 12d2841
Removed defunct VFS classes and their uses
rodinaarssen 9e425f2
Removed WatchParameters interface and updated watch rpc calls
rodinaarssen 4e398d2
Renamed uri to loc
rodinaarssen cf1208e
Removed vfs registration call from the extension
rodinaarssen 3193c40
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen 578335f
Merge branch 'main' into unify-vfs-interfaces
rodinaarssen c64c667
Ported Lazy to rascal
rodinaarssen 7b144ad
Removed defunct directory listing cache from FallbackResolver
rodinaarssen b11ffbf
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen 15cbed3
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen 6690cdc
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen ba7f7fa
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen ec054e6
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen f19df9f
Layout
rodinaarssen 780e930
Improved logging message
rodinaarssen f18a935
Fixed constructor logic for FallbackResolver
rodinaarssen 7960949
Updated json-rpc method names
rodinaarssen 9ae44e2
JsonRpcServer now has a debug mode for second level purposes
rodinaarssen 579bb69
Layout
rodinaarssen 853d09f
Added FileAttributes interface that models Rascal's stat result and u…
rodinaarssen 381347d
Added a translation function that makes sure VS Code uris are mapped …
rodinaarssen 9fbcd2c
Using URI translation function
rodinaarssen d5590cc
Handling VS Code's create and overwrite flags for writeFile on the TS…
rodinaarssen 4b0e506
Changed FileAttributesResult to FileAttributes to match the Rascal ab…
rodinaarssen 61d86fe
Removed WriteFileRequest and RenameRequest
rodinaarssen fa8ddb4
Rewrite writeFile and rename after removal of the wrapper interfaces
rodinaarssen cc813db
Added mapping functions from and to the source location abstraction i…
rodinaarssen 02fc92a
Removed FileWithType after the move to Rascal
rodinaarssen dd74c0d
Removed IRascalFileSystemServices from rascal-lsp. Its functionality …
rodinaarssen 070a36d
Added RascalFileSystemInVsCode class which implements Rascal's IRasca…
rodinaarssen bd35010
Added a function to Locations.java to check whether a source location…
rodinaarssen 03bb5fb
Changed how the remote resolver registry port is propagated from TS t…
rodinaarssen cda289b
Added second-level debug port for remote resolver registry to launch.…
rodinaarssen d286efe
Removed fallback resolver as an environment variable setting, as this…
rodinaarssen 6c47856
BaseLanguageServer now implements IRascalFileSystemServices
rodinaarssen 66ed527
Added trace logging messages
rodinaarssen dac6221
Renamed VSCodeURIResolverServer to VSCodeFileSystemInRascal
rodinaarssen f9307c7
Renamed RascalFileSystemProvider to RascalFileSystemInVSCode
rodinaarssen 5c5f560
Implemented VS Code-specific exception handling and logic in RascalFi…
rodinaarssen a296c72
Deduplication of two FileAttributes interfaces
rodinaarssen b5c2cea
BaseLanguageServer reuses mapping from Throwable to ResponseError
rodinaarssen 2c91210
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen e81bc25
No longer accessing formerly public field
rodinaarssen 5d86fc0
Aligned signature of list with the Rascal side
rodinaarssen 1278c1c
Removed call to nonexistent extension command from UI test
rodinaarssen 3335a8c
Using RascalFileSystemServices and IRemoteResolverRegistryClient
rodinaarssen da199de
Fixed potential NPE
rodinaarssen d993d6d
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen bcb70eb
Removed VSCodeUriResolverClient and VSCodeVFS classes. They are no lo…
rodinaarssen e17b92a
LanguageServer now initializes a subclass of remote external resolver…
rodinaarssen 242845e
Changed interface order and names to conform to the Rascal side
rodinaarssen 8aed2d5
Fixed jsonrpc method name
rodinaarssen 7ae9a72
Reinstated lsp+ during logical resolution
rodinaarssen c2e5224
Removed comments
rodinaarssen b6201f6
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen 3c201ff
Added jsonrpc request and notification classes for modularity and cha…
rodinaarssen c9af911
Removed superfluous arguments
rodinaarssen 18e3b31
Incorporated upstream package after a Rascal update
rodinaarssen d0cb51a
Fixed potential NPE
rodinaarssen ed90ae3
Added jsonrpc response classes for modularity and changed the signatu…
rodinaarssen 63ee563
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen 2ff7a46
Using request/response classes in RascalFileSystemInVSCode.ts as well
rodinaarssen b204fac
Unified trace logging
rodinaarssen 7bee331
Added UI test
rodinaarssen 43a9dde
Apply suggestions from code review
rodinaarssen 23587dd
Update rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/uri/jsonrpc/…
rodinaarssen c20043e
Using @JsonSegment for cleaner jsonrpc interface defintions
rodinaarssen 110e568
Added comment
rodinaarssen 0760b06
Avoiding intermediate streams by merging sets using Sets.union
rodinaarssen 49796a0
Removed unused import
rodinaarssen 5584a2d
Finished implementation of remote stat from the TS side
rodinaarssen 4d7e3c9
Changed case of file for uniformity
rodinaarssen 06db259
Updated code references to changed case
rodinaarssen 8253b0f
Removed unused imports
rodinaarssen e1c558a
Javadoc
rodinaarssen 25fd1a6
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen a842898
Layout
rodinaarssen 6843e3c
BaseLanguageServer no longer registers external resolver registry
rodinaarssen 10343bb
Implemented remote copy in both directions
rodinaarssen 751d413
Spelling
rodinaarssen 3f78daf
Added copy to RascalFileSystemInVSCode wrapper
rodinaarssen 07ee071
Moved isWritable to ISourceLocationOutput
rodinaarssen bd90c66
Added explicit type
rodinaarssen 789e88a
Renamed watcher to watchId
rodinaarssen 692a57d
Unused import
rodinaarssen 2260e25
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen a0ea410
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen 9776c7b
Removed exception handling/mapping in favor of Rascal's RemoteIOErrors
rodinaarssen 7a0cb5e
Fixed typo
rodinaarssen 0b881de
Updated signature of remote list after changes in Rascal
rodinaarssen 8c66018
Added RemoteIOError.ts modeled after the Rascal counterpart
rodinaarssen a7ae259
Moved asyncCatcher methods inside ResolverClient to have a logger ava…
rodinaarssen 713d902
Mapping ResponsErrors to FileSystemErrors in both directions through …
rodinaarssen c402906
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen d5e7c9c
ActualLanguageServer now correctly extends the wrapper class
rodinaarssen 2ce6b9c
Configuring the language servers to use the specialized remote resolv…
rodinaarssen 9218967
Merge remote-tracking branch 'origin/main' into unify-vfs-interfaces
rodinaarssen 587a624
Deduplicated code
rodinaarssen f0ec4eb
Renamed FallbackResolver to LSPOpenFileRedirector
rodinaarssen ef6724b
Removed artificial calls to URIResolverRegistry.getInstance() that fi…
rodinaarssen 665da33
Correctly calculating overwrite using nullish coalescing operator
rodinaarssen 859453f
Layout unification around colons and curly braces
rodinaarssen fd86fae
Replaced null literal
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,35 +32,36 @@ | |
| import org.eclipse.lsp4j.jsonrpc.messages.Tuple.Two; | ||
| import org.eclipse.lsp4j.jsonrpc.services.JsonNotification; | ||
| import org.eclipse.lsp4j.jsonrpc.services.JsonRequest; | ||
| import org.eclipse.lsp4j.jsonrpc.services.JsonSegment; | ||
| import org.eclipse.lsp4j.services.LanguageServer; | ||
| import org.rascalmpl.vscode.lsp.parametric.LanguageRegistry.LanguageParameter; | ||
| import org.rascalmpl.vscode.lsp.uri.jsonrpc.messages.PathConfigParameter; | ||
| import org.rascalmpl.vscode.lsp.uri.jsonrpc.messages.VFSRegister; | ||
|
|
||
| public interface IBaseLanguageServerExtensions extends LanguageServer, IRascalFileSystemServices { | ||
| @JsonNotification("rascal/supplyRemoteIDEServicesConfiguration") | ||
| @JsonSegment("rascal") | ||
| public interface IBaseLanguageServerExtensions extends LanguageServer { | ||
| @JsonNotification | ||
| default CompletableFuture<IDEServicesConfiguration> supplyRemoteIDEServicesConfiguration() { | ||
| throw new UnsupportedOperationException(); | ||
| } | ||
|
|
||
| @JsonRequest("rascal/sendRegisterLanguage") | ||
| @JsonRequest | ||
| default CompletableFuture<Void> sendRegisterLanguage(LanguageParameter lang) { | ||
| throw new UnsupportedOperationException(); | ||
| } | ||
|
|
||
| @JsonRequest("rascal/sendUnregisterLanguage") | ||
| @JsonRequest | ||
| default CompletableFuture<Void> sendUnregisterLanguage(LanguageParameter lang) { | ||
| throw new UnsupportedOperationException(); | ||
| } | ||
|
|
||
| @JsonRequest("rascal/supplyPathConfig") | ||
| @JsonRequest | ||
| default CompletableFuture<Two<String, URI[]>[]> supplyPathConfig(PathConfigParameter projectFolder) { | ||
| throw new UnsupportedOperationException(); | ||
| } | ||
|
|
||
| @JsonNotification("rascal/vfs/register") | ||
| void registerVFS(VFSRegister registration); | ||
|
|
||
| @JsonNotification("rascal/logLevel") | ||
| @JsonNotification("logLevel") | ||
| void setMinimumLogLevel(String level); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not part of your work but perhaps this should just become |
||
|
|
||
| @JsonRequest("vfs/schemes") | ||
| CompletableFuture<String[]> fileSystemSchemes(); | ||
| } | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is called
connectin some other places (IBaseTextDocumentServiceandBaseWorkspaceServicefor example.)