REVLib 2022 jar doesn't match documentation

Edit: It turned out the build.gradle had implementation 'com.revrobotics.frc:SparkMax-java:1.5.4' in it and so was downloading the older jar.

I’m working on updating our code for 2022, and since WPI’s SpeedController interface is deprecated, we’re replacing that with the MotorController. The problem is that a CANSparkMax can’t be passed in as a MotorController because even though the docs say it extends MotorController in addition to SpeedController, the jars I have on my computer don’t extend from MotorController, resulting in a compilation error.

I’ve installed the new REVLib dependency online and then offline (through WPILib’s VS Code extension) with no luck. I’ve also run .\gradlew clean several times just in case.

Any idea why the downloaded jars might be out of date? Is there an even newer link to install from?

Edit: I also deleted the .gradle and gradle folders after Fletch1373’s comment and generated the wrapper and built everything again, but the error persists.

The CANSparxMax class (in the new 2022 library at least) definitely implements MotorController. I suspect either your intellisense cache is just being weird, or your gradle cache is being dumb. I’d try to rule those out first.

Other than that, I’m not sure offhand, so I’ll let others chime in.

Thanks for the reply. It’s unfortunately not just IntelliJ and VS Code, the error pops up even after running .\gradlew build. I’ll try deleting all the Gradle stuff, though. Edit: Unfortunately, that doesn’t work either.

Run the Clean Java Language Server Workspace command inside of vscode. That will reset the Intellisense engine.

It’s not just Intellisense, since the Gradle build itself doesn’t work. I’ll add my build.gradle to the post, maybe that might be the issue.

I just realized the build.gradle contained implementation 'com.revrobotics.frc:SparkMax-java:1.5.4', which must’ve been downloading the old library. Everything’s compiling now, sorry for the needless question.