Skip to content

Conversation

@TechStudent10
Copy link

Upon attempting to convert our Phoenix Tuner generated Swerve codebase to WPILib 2026 during Kickoff, I encountered this error that threw me for a loop, only figuring out the root cause by diving into the source code and finding what was causing the error in the first place.

This PR should make it easier for any other teams, who have misconfigured WPILib projects, to properly diagnose the error quickly.

@sciencewhiz
Copy link
Contributor

I think I'd prefer to keep the first part of the message, since that's the action that the user was supposed to take. But then add on to ensure .wpilib...

I'm also interested in getting to the root cause of how you had a broken project. My assumption is that if the Phoenix Tuner swerve generator did that, we'd have a lot more complaints.

@rzblue
Copy link
Member

rzblue commented Jan 27, 2026

I think I'd prefer to keep the first part of the message, since that's the action that the user was supposed to take.

This message occurs if the preferences file exists, but the language string is invalid. If the file doesn't exist, the original message is still shown (line 215).

@TechStudent10
Copy link
Author

I'm also interested in getting to the root cause of how you had a broken project. My assumption is that if the Phoenix Tuner swerve generator did that, we'd have a lot more complaints.

No clue. I wasn't the one that set it up, but I can only assume it was a bug. The extension doesn't completely implode when an invalid language string is in the config file (i.e. when building code, the extension asks for either java or cpp) so it really only doesn't work when trying to import a project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve error message when importing a project with missing or broken wpilib_preferences.json

4 participants