Skip to content

Conversation

@SamCarlberg
Copy link
Member

@SamCarlberg SamCarlberg commented Dec 17, 2025

Useful for eg OpModes, where names have a maximum length

Also includes validations for values in opmode annotations like @Autonomous(name = "..."); name, group, and description all have maximum allowable lengths

Useful for eg OpModes, where names have a maximum length
@SamCarlberg SamCarlberg requested a review from a team as a code owner December 17, 2025 02:01
@SamCarlberg SamCarlberg added 2027 2027 target component: javac plugin Java compiler plugin labels Dec 17, 2025
Name, description, and group name lengths are all validated

Current limits are 32 chars for the name, 12 for the group name, and 64 for the description
@PeterJohnson
Copy link
Member

Seeing as these don't result in runtime errors (we'll just truncate), should these be warnings instead of errors?

@SamCarlberg
Copy link
Member Author

Warnings would clutter the IDE logs and be ignored. My goal with the compiler plugins is to catch code that's obviously incorrect and code that won't function as the user expects; opmode string length checks fall into the second category, since the code that you write won't match what you see in practice

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

Labels

2027 2027 target component: javac plugin Java compiler plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants