-
Notifications
You must be signed in to change notification settings - Fork 97
Conversation
@weinand Is there any chance this could be approved? If I did something wrong, please let me know. |
Thanks for the PR. I'm not sure how important "nvs" is in comparison with "nvm", but since the size of this PR is small, I'm happy to merge this. One question: |
If GitHub stars is a good metric "nvs" is a few orders of magnitude less important than "nvm", but I prefer it because it's more portable (nvm doesn't work on Windows) and it does support getting node from various repositories (you can use it to install nightly builds or chakracore). I don't know if people uses both "nvs" and "nvm"... probably not, I guess. |
The problem with the "runtimeVersionManager" is that it requires that all people working on a project have to use the same version manager. Because if you check in a launch configuration with a "runtimeVersionManager" attribute "nvs" and I'm using "nvm", then the version in the checked-in launch config will be ignored because I do not have "nvs" installed (since I use "nvm"). We could make the code smarter to "translate" your "nvs" settings to my "nvm" setup but I'm not sure that this is worth the effort. On the other hand if we would not use a "runtimeVersionManager" attribute and we could agree on a version scheme that works across different version managers, then a checked-in attribute That is basically the approach I'm using for "nvm" and "nvm-windows": I assume that what is specified on macOS and linux works on Windows too because the version number format is the same. Yes, for "nvs" you support more formats but there is still a subset that works for "nvm" too. So if those using "nvs" limit themselves to only use the simple syntax, then this will work with "nvm" too. |
Agreed, I'm going to change the code 😄 |
Done. I'm not 100% happy with the extra code to provide the various error messages, but I'm not sure a generic "Attribute 'runtimeVersion' requires Node.js version manager 'nvm[-windows]' or 'nvs'" is better because it doesn't mention the environment variable. What do you think? |
The refactoring looks mostly ok. Thanks again for the PR. |
Oops, I'm so sorry about that. Thank you for fixing it and merging the PR |
np. The feature should be available in the next Insiders. |
Add support for 'nvs' to manage node versions, other than 'nvm' ('nvm-windows').
The version manager to use can be selected by
runtimeVersionManager
.