AdvantageKit AutoLog annotation not generating InpustAutoLogged subsystems

I recently added a camera subsystem (part of the vision subsystem) to our codebase to implement april tag pose estimation. We use AdvantageKit for data logging and simulation, and we’ve never had this kind of an issue with it before, but all of a sudden, the ____IOInputsAutoLogged classes are all throwing errors in my subsystem classes:
image

The only two exceptions are the Camera, Drive, and Intake subsystems, which appear to be working fine:
image

The odd thing is, in the build folder, under annotationProcessor, I don’t even see the vision subsystem, but it still doesn’t throw any errors in the IDE.
image

I have the tried the usual solutions of connecting to the internet and building several times, along with closing the IDE altogether and reopening it, but none of those seem to have fixed this problem. Any tips or solutions would be much appreciated. Here is a link to the robot code: Vector8177/2024-Robot (github.com)

Can you try deleting the build folder and rebuilding?

I tried that, and it seems to have the same issue. These files were regenerated in the builds folder
image

However, there is no vision folder or CameraIOInputsAutoLogged file. After running the build, I also noticed that it failed with this stacktrace citing a compile error:

It looks like the issue is with the allTargetData field on CameraIOInputs, which has the type List<PhotonTrackedTarget>. AdvantageKit only supports primitive arrays and not List objects (as an aside for this case, PhotonTrackedTarget[] also won’t work correctly since protobufs must be single values). Since the type cannot be serialized, it shows the following exception in the console while building:

[AutoLog] Unkonwn type for "allTargetData" from "CameraIOInputs" ("java.util.List<org.photonvision.targeting.PhotonTrackedTarget>" is not supported)

This causes the annotation processor to exit early and not generate all of the auto logged classes (in order to ensure that the issue is fixed rather than silently refusing to log the field). Changing the type of the field or removing it from ClimberIOInputs should resolve the issue, though you may still need to run “Clean Java Language Server Workspace” in the command palette after the first successful build.

1 Like