-
Notifications
You must be signed in to change notification settings - Fork 5
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
Importing 2024 project with beta-2 produces incorrect import
lines for some units-related modules
#51
Comments
Can you post a link to the 2024 code, for testing purposes? I'm not sure changing edu.wpi.first.units.measure.Measure to edu.wpi.first.units.Measure should be necessary, vs deleting it. The importer didn't do this one because it was capturing words, so the * didn't trigger it.: import static edu.wpi.first.units.measure.Units.; -- should be edu.wpi.first.units.Units. |
Here's a link to the repo -- I made it public. The main branch exhibits the problem when imported. https://bitbucket.org/sciborgs4061/robot-2024/ |
The The conversion also didn't properly convert mutable measurement types. Although I agree the classes should be called |
Fixes Mutable imports and units Fixes wildcard import for Units Converts MutableMeasure.zero Fixes wpilibsuite/2025Beta#51
Fixes Mutable imports and units Fixes wildcard import for Units Converts MutableMeasure.zero Fixes wpilibsuite/2025Beta#51
Fixes Mutable imports and units Fixes wildcard import for Units Converts MutableMeasure.zero Fixes wpilibsuite/2025Beta#51
Describe the bug
After importing our 2024 robot code project with beta 2 there are incorrect imports:
import static edu.wpi.first.units.measure.Units.*;
-- should be edu.wpi.first.units.Units.* -- andimport edu.wpi.first.units.measure.Measure;
-- should be edu.wpi.first.units.MeasureIt appears this is a matter of overzealous conversion rather than missed conversion as the correct imports are what was in the original code.
To Reproduce
Steps to reproduce the behavior:
Import a Java project with files containing
import static edu.wpi.first.units.Units.*;
and/orimport edu.wpi.first.units.Measure;
Expected behavior
Those lines are unchanged.
Desktop (please complete the following information if applicable):
Project Version: 2025.1.1-beta-2
VS Code Version: 1.94.2
WPILib Extension Version: 2025.1.1-beta-2
C++ Extension Version: 1.22.9
Java Extension Version: 1.36.2024092708
Java Debug Extension Version: 0.58.2024090204
Java Dependencies Extension Version 0.24.0
Java Version: 17
Java Location: /home/hauser/wpilib/2025/jdk
Vendor Libraries:
PathplannerLib (2025.0.0-beta-4)
CTRE-Phoenix (v5) (5.34.0-beta-2)
CTRE-Phoenix (v6) (25.0.0-beta-3)
REVLib (2025.0.0-beta-2)
Studica (2025.1.1-beta-3)
WPILib-New-Commands (1.0.0)
photonlib (v2025.0.0-beta-5)
roboRIO (please complete the following information if applicable):
Additional context
I don't know for certain that what I think are the correct imports really are correct -- there are still errors in the code but I think, based on the javadocs, that what I've said above is right. Certainly, the generated import lines do not work.
The text was updated successfully, but these errors were encountered: