rokucommunity/vscode-brightscript-language

Why does raleTrackerTaskFileLocation has to be an absolute path?

iBicha opened this issue · 6 comments

Very curious, can we allow relative paths?
I want to keep my project working cross systems without modifications, so I do not wish to hardcode this path that includes my username, as it won't work for other computers.

It's just how we coded it. It could definitely be improved to support other paths. I think the issue right now is that it's actually a user setting. If we modified it so that it could also be a launch setting, then you could use things like ${workspaceFolder}.

I'd be happy to accept a PR for this if you're interested in contributing?

Actually Im a bit confused, I see it as a launch config, but

injectRaleTrackerTask was set to true but could not find TrackerTask.xml at:
${workspaceFolder}/tools/RALE/TrackerTask.xml

Hmm. Sorry for the confusion. I was answering from my phone last night, so I was just going off of what I remembered, which is obviously incorrect. :)

So here's the code that handles the raleTrackerTaskFileLocation. Looks like we never handle the ${workspaceFolder} replacements. I think it could pretty easily be updated to support the same replacements as rootDir, outDir, etc...

Thanks! I always assumed these vars get auto-replaced with a single mechanism. I was wrong!
https://github.com/rokucommunity/vscode-brightscript-language/pull/462/files

vscode has a "pre vars replaced" and "post vars replaced" extension hook. We're using the "pre" because of some timing-related reasons. As a result, much of our replacements need to be done manually. We tried switching to "post" a few times, but it kept causing issues.

Ideally, we should update our logic to blanket-replace all values across the entire config. It just hasn't been a high enough priority because our current logic "works".

Resolved by #462