VHDL-LS / rust_hdl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] File paths with $ are incorrectly being interpreted as environment variables

Matt-D-Smith opened this issue · comments

If a file path has a '$' character in it, the parser for vhdl_ls.toml interprets it as an environment variable when it should not. $ characters are valid in windows file path names, and used in network/shared file paths to indicate hidden folders.

Example entry in vhdl_ls.toml

unisim.files = [ 
   '\\networklocation\cad$\apps\xilinx_vitis\Vivado_2020.2\Vivado\2020.2\data\vhdl\src\unisims\unisim_VCOMP.vhd',
]

Resulting error in VHDL LS output:

Error loading vhdl_ls.toml: environment variable '' is not defined

This is fixed with the latest commit by disabling the substitution feature for windows machines. However the current solution is unsatisfactory as windows users would likely also want to have this feature, probably using the %VAR_NAME% syntax instead of the $VAR_NAME syntax. I have opened an issue on the subst package addressing this.