Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run the Java Simulate Robot Code command using gradle instead of the debugger extension #716

Closed
SamCarlberg opened this issue Nov 1, 2024 · 1 comment · Fixed by wpilibsuite/GradleRIO#759

Comments

@SamCarlberg
Copy link
Member

SamCarlberg commented Nov 1, 2024

Currently, we use the Java debugger extension and the Red Hat Java extension to launch the simulate command. This has many problems when the robot program uses Epilogue (or probably any other annotation processor where generated class files depend on multiple inputs), due to the eclipse compiler used by the Java extension running incremental compilation; it excludes unchanged files from a compilation unit, which breaks the Epilogue generator that needs full project context. These corrupt files are used for intellisense (which is annoying, but not breaking) and by the debugger extension when it launches the simulator (which is breaking, and badly)

Gradle and the jdk compiler will cause Epilogue to generate correct classes (which also means actual deployed robot programs are correct). Changing the command to run the gradle task and attaching to it as a remote process would avoid the problems created by the incremental compiler.

Related: wpilibsuite/allwpilib#7103, wpilibsuite/2025Beta#20

@SamCarlberg
Copy link
Member Author

Changing build.gradle to include eclipse-specific configurations may also be a fix, without needing to change our extension

redhat-developer/vscode-java#1660 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant