AndrewNolte / vscode-system-verilog

HDL support for VS Code
MIT License
1 stars 1 forks source link

[BUG] Include Globs are restricted to paths inside workspace #6

Closed rahultadak closed 2 days ago

rahultadak commented 2 weeks ago

It seems that the extension parses the include globs and expects the paths provided in the include globs to be inside the workspace always. This is not necessarily the case in projects where we refer to external IPs.

Environment

Steps to reproduce:

Logs: (Get logs from Output > verilog)

2024-06-12 09:51:40.162 [info] [ctags] indexing 0 .svh files
2024-06-12 09:51:40.162 [info] [ctags] indexed 0 .svh files
2024-06-12 09:51:40.162 [info] ctags index includes finished
2024-06-12 09:51:40.190 [info] [index] indexing 18 files
2024-06-12 09:51:40.190 [info] index files finished
AndrewNolte commented 4 days ago

Thanks for the report! This should be fixed in the most recent update, please let me know if it works for you! One note: because the filesystem glob is used instead of vscode's, the .{svh,sv} syntax doesn't work, or at least for the OS I tested on.

rahultadak commented 3 days ago

Thanks for the fix. I was looking at the VSCode API and found the asRelativePath call in the workspace namespace. Would that be a better fix here instead of the if-else fix you made?

AndrewNolte commented 2 days ago

No that won't really help, it just returns the same path, I believe either because it's a glob or because it's outside of the workspace. The documentation on that function isn't too clear, it seems to contradict itself