eirikpre / VSCode-SystemVerilog

SystemVerilog support in VS Code
MIT License
128 stars 50 forks source link

DefinitionProvider bugfixes #209

Closed LarsAur closed 11 months ago

LarsAur commented 11 months ago

Main Changes

These changes attempt to fix some bugs related to the DefinitionProvider not being able to find some parameters and ports:

See extended commit messages for more details.

Results after changes

Definition of port:

image

Definition of typed parameter:

image

Definition of parameter defined in package:

image

joecrop commented 11 months ago

This is brilliant, thanks @LarsAur. I will start reviewing this now.

LarsAur commented 11 months ago

I see that the tests failed while downloading vscode for windows. I also encountered this problem while testing the changes. Seems like the link used does not work any more (https://update.code.visualstudio.com/1.85.1/win32-archive/stable) I had success adding the following changes to runTest.ts.

In the imports

import { runTests, downloadAndUnzipVSCode } from '@vscode/test-electron';

In main() after setting workspacePath

const vscodeExecutablePath = await downloadAndUnzipVSCode('stable', 'win32-x64-archive');

// Download VS Code, unzip it and run the integration test
await runTests({
    extensionDevelopmentPath,
    extensionTestsPath,
    vscodeExecutablePath,
    launchArgs: [workspacePath, '--disable-workspace-trust', '--disable-extensions']
});

Edit: If you want, I can create a separate pull request for these changes.

joecrop commented 11 months ago

Yeah, I saw the problem and just fixed it. Can you please rebase/merge upstream/master?

joecrop commented 11 months ago

Tests are passing, Awesome!