Importing a project from 2017 to 2022 in WPILib

I was wondering if anyone has experience importing a project from 2017 into 2022 in WPILib, I do not intend on using this for competition, more as sort of a marketing stunt.

1 Like

What type of controllers are you using, The libraries have changed and a lot of the code structure has also changed.
You might be better off starting from scratch

You could always just make a new 2022 project and manually copy the code over into it. I’d expect that you’d need to make at least some changes due to things getting deprecated and new vendor libraries coming out.

4 Likes

2017 used eclipse as the IDE, and ant for build scripts. 2022 uses VS Code as the IDE, and gradle for build scripts.

2022 VS Code no longer has an importer to import eclipse projects. You could use the 2020 VS Code to import from eclipse to VS code, and then use 2022 VS Code to import from the 2020 project. However, at that point you’d still have to make updates for the last 5 years of updates in WPILib, as the importer pretty much only handles the build scripts. I concur with other users that it’s probably easier to create a new 2022 project and copy/reimplement the relevant code.

2 Likes

kinda similar situation here. our team wants to showcase our 2016 robot (I believe?) at community events this summer, meaning us programmers are gonna have to rewrite the project using current libraries (and also some of the 2016 code is a bit sketch, which ig is kinda normal for any build season last-minute code).

Sounds like good off-season practice for your programming team!

4 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.