Skip to content
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

FileRename record implementation is incorrect #1078

Open
hozuki opened this issue Oct 21, 2023 · 1 comment · May be fixed by #1079
Open

FileRename record implementation is incorrect #1078

hozuki opened this issue Oct 21, 2023 · 1 comment · May be fixed by #1079

Comments

@hozuki
Copy link

hozuki commented Oct 21, 2023

In specification:

export interface FileRename {
    oldUri: string;
    newUri: string;
}

In protocol implementation:

public abstract record FileOperationItem
{
    public Uri Uri { get; init; } = null!;
}

public partial record FileRename : FileOperationItem;

When using DidRenameFileParams/WillRenameFileParams (handling workspace/didRenameFiles/workspace/willRenameFiles), items in request.Files only include one URI. I haven't tested the requests but I suppose the param objects cannot be deserialized as expected.
(Packages like vscode-languagesclient implement this correctly.)


By the way, shouldn't these classes be named as DidRenameFilesParams/WillRenameFilesParams (plural form; the same also applies to corresponding handler classes and interfaces)?

@manandre manandre linked a pull request Oct 22, 2023 that will close this issue
@zreedy
Copy link

zreedy commented Dec 13, 2023

Hello, it appears that this fix is not in a release yet. Any idea when this will make it into a Release?
In the meantime, is there any possible work around? I'm not sure if I can override the default deserializer for this message.

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 a pull request may close this issue.

2 participants