eirikpre / VSCode-SystemVerilog

SystemVerilog support in VS Code
MIT License
124 stars 46 forks source link

Does the 'systemverilog.excludeIndexing' work well? #204

Closed diverger closed 5 months ago

diverger commented 10 months ago

Hi, I try to add a foler to the excluding list as "folder_name/**', but it seems don't work. The output window of the vscode still shows the indexing informations. My platform is Windows.

And it seems the indexing will 'lock' the folder and forbid Vivado Synthesis to manipulate it.

Thanks.

joecrop commented 10 months ago

Hi @diverger,

This extension does not manipulate the file system of your project when indexing. It only stores meta-data in your vscode cache (somewhere deep in your home directory). So it seems suspicious that this would impact an external program's ability to manipulate the filesystem. Have you tried disabling the plugin altogether to confirm your suspicion? Perhaps you have a file open in your editor and the editor is the one holding the lock?

Nonetheless, here are a couple of things to try:

  1. Have you tried closing and re-opening VSCode after changing the excludeIndexing setting?
  2. Maybe try adding a double-asterix in front, like this: **/folder_name/** in case the folder is not at the root of your workspace.
  3. Note that files will still be indexed on open, regardless of the excludeIndexing setting, unless you set the enableIncrementalIndexing to false.
diverger commented 10 months ago

@joecrop Hi,

  1. Yes I closed and reopened the vscode after changing the settings.
  2. The folder indeed in the root of the workspace.
  3. The Vivado compiling well if I close the vscode. But I don't tried to disable this single plugin. I will try it latter.

The reason I think it's caused by this plugin, is when do Vivado sythesis, the systemverilog plug window still refresh indexing informations continuously, such as:

Auto Indexing: file:///...... SystemVerilog: Indexing: Unable to process file: file:///.... TypeError: Cannot read properties of undefined (reading 'body')

And the files under the "folder_name" which I disabled the indexing are shown there however. Though the status bar showed the plugin only indexed 12 objects.

And I'm a bit confused now. As the status bar showed there are only '12' objects indexed (12 is reasonable, because these are the sources I need the plugin to parser). But why the window still show indexing informations about other files? It seems, every time Vivado touch a file, the vscode or the plugin take a look at it, and then it may index it or abandon it latter. So, it may not be the actual 'index' action, but such 'scan' action prevent Vivado do file removing. Just a guess.

Thanks.

joecrop commented 10 months ago

OK, In that case, I think adding a **/ in front of the path will help. Looking at the code for this, I think the paths it is comparing with are actually the full paths on the disk, not the path relative to your workspace root.

diverger commented 10 months ago

I tried it. It didn't work. When Vivado doing Synthesis, the SytemVerilog output windows showing the indexing infos continuously as before. And finally show:

_[Designutils 20-411] The directory 'concernedfolderpath/blablabla/realtime' could not be deleted and may be locked. This directory may need to be manually deleted to continue.

The same result with my previous settings.

joecrop commented 10 months ago

OK, new Idea!

I wonder if it is a Windows path issue. Can you try a couple permutations?

  1. **\folder_name\**
  2. **\\folder_name\\**

If either of those don't work, I think the code will have to be modified to handle the paths in an OS-specific way.

diverger commented 10 months ago

Hi, It seems both 1 and 2 work partially. Though it still shows the message below:

Auto Indexing: file:///...... SystemVerilog: Indexing: Unable to process file: file:///.... TypeError: Cannot read properties of undefined (reading 'body')

It won't prevent Vivado to remove some files however.

Thanks.

joecrop commented 9 months ago

I just played around with this in Windows (finally had time). I was able to get the extension to stop indexing when I set: Exclude Indexing = **/folder_name/**