Skip to content

Commit

Permalink
fix(move-analyzer): several fixes for SVCode extension after update
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriyr committed Dec 23, 2024
1 parent 0d9b20e commit b5165fc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
},
"extensionDependencies": [
"damirka.move-syntax",
"iota.move-trace-debug"
"mysten.move-trace-debug"
],
"dependencies": {
"semver": "^7.6.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Mocha.suite('LSP', () => {
assert.ok(hoverResult);
assert.deepStrictEqual((hoverResult.contents as MarkupContent).value,
// eslint-disable-next-line max-len
'```rust\nfun Symbols::M2::other_doc_struct(): Symbols::M3::OtherDocStruct\n```\n\nThis is a multiline docstring\n\nThis docstring has empty lines.\n\nIt uses the ** format instead of ///\n\n');
'```rust\nfun Symbols::M2::other_doc_struct(): Symbols::M3::OtherDocStruct\n```\n\n This is a multiline docstring\n\n This docstring has empty lines.\n\n It uses the ** format instead of ///\n ');

});

Expand Down Expand Up @@ -143,7 +143,7 @@ Mocha.suite('LSP', () => {
assert.ok(hoverResult);
assert.deepStrictEqual((hoverResult.contents as MarkupContent).value,
// eslint-disable-next-line max-len
'```rust\nstruct Symbols::M3::OtherDocStruct has drop {\n\tsome_field: u64\n}\n```\nDocumented struct in another module\n');
'```rust\nstruct Symbols::M3::OtherDocStruct has drop {\n\tsome_field: u64\n}\n```\n Documented struct in another module');
});

Mocha.test('textDocument/completion', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,21 @@ async function runVSCodeTest(vscodeVersion: string): Promise<void> {
const vscodeExecutablePath = await downloadAndUnzipVSCode(vscodeVersion);
const [cli, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);
const newCli = cli ?? 'code';
cp.spawnSync(newCli, [...args, '--install-extension', 'damirka.move-syntax', '--force'], {
encoding: 'utf-8',
stdio: 'inherit',
});
cp.spawnSync(
newCli,
[
...args,
'--install-extension',
'damirka.move-syntax',
'--install-extension',
'mysten.move-trace-debug',
'--force',
],
{
encoding: 'utf-8',
stdio: 'inherit',
},
);

// Because the default vscode userDataDir is too long,
// v1.69.2 will report an error when running test.
Expand All @@ -78,7 +89,7 @@ async function runVSCodeTest(vscodeVersion: string): Promise<void> {
}

async function main(): Promise<void> {
await runVSCodeTest('1.82.0'); // Test with vscode v1.82.0, the minimal supported version
await runVSCodeTest('1.92.0'); // Test with vscode v1.92.0, the minimal supported version
}

void main();

0 comments on commit b5165fc

Please sign in to comment.