Skip to content

Unify VFS interfaces#967

Draft
rodinaarssen wants to merge 146 commits intomainfrom
unify-vfs-interfaces
Draft

Unify VFS interfaces#967
rodinaarssen wants to merge 146 commits intomainfrom
unify-vfs-interfaces

Conversation

@rodinaarssen
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member

@toinehartman toinehartman left a comment

Choose a reason for hiding this comment

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

Impressive amount of work again! Although I trust your local testing, I think it would be nice to see an all-green CI by using a test-only snapshot release of Rascal if possible.

var actualClient = (IBaseLanguageClient) client;
lspDocumentService.connect(actualClient);
lspWorkspaceService.connect(actualClient);
provideClient(actualClient);
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.

This is called connect in some other places (IBaseTextDocumentService and BaseWorkspaceService for example.)


@JsonNotification("rascal/logLevel")
@JsonNotification("logLevel")
void setMinimumLogLevel(String level);
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.

Not part of your work but perhaps this should just become logLevel?

}

/**
* Attemptes to register all schemes.
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.

Suggested change
* Attemptes to register all schemes.
* Attempts to register all schemes.

.filter(s => !this.protectedSchemes.includes(s))
// we add support for schemes that look inside a jar
.concat(schemes
.filter(s => s !== "jar" && s !== "zip" && s !== "compressed")
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.

compressed:? Never seen that before. How can that be used?

readDirectory(uri: vscode.Uri): [string, vscode.FileType][] | Thenable<[string, vscode.FileType][]> {
this.logger.trace("[RascalFileSystemInVSCode] readDirectory: ", uri);
return this.sendRequest<DirectoryListingResponse>(uri, "rascal/vfs/input/list")
.then(c => c.entries.map(ft => [ft.name, ft.types.reduce((a, i) => a | i)]));
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.

Why the reduce?

private readonly watchListener: WatchEventReceiver;
private readonly fs: vscode.FileSystem;
private readonly rascalNativeSchemes: Set<string>;
private toClear: Disposable[] = [];
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.

nit: This is typically called disposables.

this.logger.trace("[VSCodeFileSystemInRascal] remove: ", req.loc);
return this.asyncVoidCatcher(this.fs.delete(this.toUri(req.loc), { recursive: req.recursive }));
}
async rename(req: RenameRequest): Promise<void> {
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.

nit: Can we a white line in between the couple of functions above this one?

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.

2 participants