redub can't build some projects with envvars
Issue: redub doesn't seem to support envvar in recipes.
To repro: checkout this example https://github.com/AuburnSounds/Dplug/tree/master/tools/latency-check
How to repro:
$ git clone [email protected]:AuburnSounds/Dplug.git
cd Dplug
cd tools
cd latency-check
redub
Probable issue within Dplug's dub.json
"stringImportPaths": [ "$VST2_SDK/pluginterfaces/vst2.x" ],
VST2_SDK being the envvar.
(Works with dub.)
Is the env var set? Maybe I should issue an error when it is not
Yes it is set.
Ah this example isn't the best since you will need a hard-to-find SDK.
I think I found it: Basically redub is only parsing env for root projects (not dependencies)
Oh right I found it: C:\Users\Marcelo\Documents\D\redub\tests\repro\C:\Users\Marcelo\Documents\D\redub\tests\repro\simport
The env is indeed being parsed. The problem, however, is that the env variable is expanding to an absolute path after stirngImportPaths were expanded to absolutes, thus, making that strange looking path
Fixed: Env pass for path absolutization only happens a single time and it only happens once, thus also making it a little bit faster and more correct
THANKS!!!