[epilogue] Fix v3 scheduler incompatibility with epilogue (#8458)

Was caused by checking assignability like`Protobuf<Scheduler,
ProtoMessage>` instead of `Protobuf<Scheduler, ? extends
ProtoMessage<?>>`

This epilogue bug would have also applied to other protobuf-serializable
types
This commit is contained in:
Sam Carlberg
2025-12-07 01:38:10 -05:00
committed by GitHub
parent 59edbdd3cc
commit 44cf645632
4 changed files with 33 additions and 7 deletions

View File

@@ -0,0 +1,16 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
package org.wpilib.command3.epilogue;
import org.wpilib.command3.Scheduler;
import org.wpilib.epilogue.Logged;
// This class will fail to compile if m_scheduler is not considered loggable
// Note that this assumes epilogue is set up correctly.
@Logged
public class SchedulerIsLoggableWithEpilogue {
@Logged(name = "Scheduler (logged via protobuf)")
private final Scheduler m_scheduler = Scheduler.createIndependentScheduler();
}