abs-tudelft / vhdeps

VHDL dependency analyzer
Apache License 2.0
22 stars 2 forks source link

Windows absolute path #36

Open kimstik opened 4 years ago

kimstik commented 4 years ago

Using ":" as separator create some issue for windows absolute path utilization .

test case: --include unisim:%XILINX_VIVADO%/data/vhdl/src/unisims expands into: C:\Xilinx\Vivado\2019.1\data\vhdl\src\unisims where C wrongly threated as unisim library version.

So version should be specified explicitly in this case as workaround.

jvanstraten commented 4 years ago

I've never tried vhdeps on Windows, so honestly I'm surprised it works at all. I can see why the colons would break on Windows, but if I understand correctly you can already solve it by doing something of the form --include 93:unisim:%XILINX_VIVADO%/data/vhdl/src/unisims? Or am I missing something?

To be more Windows-compatible a different separator than : should be used, I guess, but it's quite difficult to find one that isn't already in use for other things.

kimstik commented 4 years ago

You got it exactly. Colons may be ignored inside "" : --include unisim:"%XILINX_VIVADO%/data/vhdl/src/unisims"

Other way is to fallback on "ValueError: invalid literal for int() with base 10: 'unisim'" to "windows" mode in case of path matched to \D:/.*