It appears that CommandBase was deprecated 2 days ago in a commit to main on wpilib. However, I have version 2023.4.3 installed locally (latest stable release, from March this year).
For some reason, VSCode is now showing CommandBase as deprecated on my computer, even though I haven’t updated wpilib (no released were even made since this change, documentation hasn’t been updated) and it has broken the code.
Does the local installation of wpilib somehow fetch code from the GitHub repo? I don’t even know how this is even possible otherwise.
Is there a way to revert (locally) to use code from the latest release 2023.4.3?
By default, vendordeps use the latest development version of wpilib. This is configured with two options.
The version is configured in config.gradle with wpiVersion and wpimathVersion. In Pathplanner, these are set to 2023.+, which will allow gradle to use the absolute latest 2023 version it finds in the maven repo. You can pin this to a specific version if you so desire, although this can result in failed builds if it can’t find that version in the specified maven repository.
The maven repo it uses is configured in build.gradle. By default, the vendordep template will use the development maven repository (bleeding edge builds from the main branch) unless the releaseMode property is set. You can set this per build by running gradle with -PreleaseMode. You can also change this behavior by modifying the lines in build.gradle.
The reasoning for this behavior is to allow vendors to prepare for upcoming changes in WPILib, but also build their releases against a stable version.
Normal robot projects will not automatically update to development versions, they will continue to use whatever version they were configured for indefinitely.
With regards to the CommandBase/SubsystemBase deprecation, in almost every instance you should be able to directly replace CommandBase with Command, and the same with SubsystemBase.
Thanks for the info! I missed the release mode part in build.gradle.
With -Preleasemode it still doesn’t seem to fix the issue, however. Building it still throws errors related to the CommandBase deprecation.