vscode-wpilib
vscode-wpilib copied to clipboard
Disallow setting java home to project level
This horribly breaks git workflow, we should not have it as a supported configuration, and should warn about it. It needs to be a user level setting only.
What do you mean by project level? Do you mean in .vscode/settings.json?
I know Java is different, but in python a setting that I absolutely do have in settings.json is the current virtualenv (which is similar to JAVA_HOME) -- and every project would potentially have a different one. This would clearly be a user-specific path. As a result, I never commit settings.json to git.
I suspect a similar thing should be true for these projects?
Our projects we do commit settings.json to git. In vscode, there is about a 50/50 split on those that say do, and those that say don't. The current templates do push that file to git, and we allow setting java.home in that file, which is bad.
Seems like a Better ™️ fix is that projects shouldn't commit the settings to git then? I could definitely see someone using their work computer for robotics stuff, and wanting to use a different Java home than the robotics java home for a work vscode project. For example, some projects at my workplace are stuck on JDK8 for compat reasons.
Vaguely related: https://github.com/Microsoft/vscode/issues/38902