prb28 / vscode-amiga-assembly

Amiga Assembly extension for Visual Studio Code
GNU General Public License v3.0
179 stars 12 forks source link

feat: variable substitution on additional props #217

Closed grahambates closed 2 years ago

grahambates commented 2 years ago

I've applied the new substituteVariables function to a few more properties.

It looks like we no longer need ConfigurationHelper.replaceBinDirVariable() as binDir will be replaced by substituteVariables along with other config keys. I went ahead and swapped it out but there does appear to be a special case that I'm not too clear on:

It looks like if there's an error setting the binDir config key the value is stored in the static ConfigurationHelper.BINARY_PATH, which is used instead:

            try {
                await ConfigurationHelper.updateProperty(ConfigurationHelper.BINARIES_PATH_KEY, binariesPath, vscode.ConfigurationTarget.Global);
            } catch (error) {
                ConfigurationHelper.BINARY_PATH = binariesPath;
            }

Can you remember why this would happen and if it's something that still needs to be handled?

prb28 commented 2 years ago

I'll look into this more deeply tomorrow. I had some hard time with this between the selection of the binaries url to load and the test... I don't remember well all the implications. Thanks.

prb28 commented 2 years ago

You are right I don't think ConfigurationHelper.BINARY_PATH is useful anymore. And I don't remember why it's there. I removed it.