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

Need to support relative imports #44

Open
Johnlon opened this issue Aug 27, 2023 · 4 comments
Open

Need to support relative imports #44

Johnlon opened this issue Aug 27, 2023 · 4 comments

Comments

@Johnlon
Copy link

Johnlon commented Aug 27, 2023

I have a lib of models in a separate tree of code; for example.

c:\mylib\therom\rom.v
c:\mylib\74574\hct74574.v

In icarus I include "-I c:\mylib" and this allows an import syntax like ...

 `include "therom/rom.v"

Whilst this works fine in icarus, this does not scan in the VSCode plugin.

"systemverilog.includeIndexing": [        
        "**/*.v",
        "C:\\mylib"
    ],

Also this does not work...

"systemverilog.includeIndexing": [        
        "**/*.v",
        "C:\\mylib\\**\*.v"  
    ],

The problem is the scan results don't remember their relative path. So for the second example above this DOES work ...

 `include "rom.v"

... but that's no use to me as it doesn't work readily in icarus.


Also ... when using the second approach then I can't navigate to symbol in the import but that's academic as the scanner doesn't work the way icarus does.

@kkanhere
Copy link
Collaborator

kkanhere commented Sep 5, 2023

The language server only works in a workspace context. It is unable to manage files outside of a workspace.

@Johnlon
Copy link
Author

Johnlon commented Sep 5, 2023

I don't believe file relative works at all regardless of location

@kkanhere
Copy link
Collaborator

kkanhere commented Sep 6, 2023

Can you clarify because I am confused what is not working here. Are you saying file relative includes don't work? Or the scanning doesn't work. Because the latter works only in workspace context so I believe absolute paths won't work. And If scanning failed, then includes will fail no matter what as the language server won't know about the file.

@Johnlon
Copy link
Author

Johnlon commented Sep 6, 2023 via email

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

No branches or pull requests

2 participants