From f8720a628c87b72bf6ece61d943067768c2d7f2f Mon Sep 17 00:00:00 2001 From: Jade Date: Thu, 19 Dec 2024 13:57:11 +0800 Subject: [PATCH] [commands] Fix proxy command deprecation docs (#7396) Signed-off-by: Jade Turner Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com> --- .../edu/wpi/first/wpilibj2/command/ProxyCommand.java | 3 +-- .../main/native/include/frc2/command/ProxyCommand.h | 10 ++++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProxyCommand.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProxyCommand.java index 7225dee1a9..d3235c9e19 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProxyCommand.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProxyCommand.java @@ -34,8 +34,7 @@ public class ProxyCommand extends Command { * @deprecated This constructor's similarity to {@link DeferredCommand} is confusing and opens * potential footguns for users who do not fully understand the semantics and implications of * proxying, but who simply want runtime construction. Users who do know what they are doing - * and need a supplier-constructed proxied command should instead proxy a DeferredCommand - * using the asProxy decorator. + * and need a supplier-constructed proxied command should instead defer a proxy command. * @see DeferredCommand */ @Deprecated(since = "2025", forRemoval = true) diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/ProxyCommand.h b/wpilibNewCommands/src/main/native/include/frc2/command/ProxyCommand.h index 714427d104..353effe9dc 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/ProxyCommand.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/ProxyCommand.h @@ -41,12 +41,11 @@ class ProxyCommand : public CommandHelper { * confusing and opens potential footguns for users who do not fully * understand the semantics and implications of proxying, but who simply want * runtime construction. Users who do know what they are doing and need a - * supplier-constructed proxied command should instead proxy a DeferredCommand - * using the AsProxy decorator. + * supplier-constructed proxied command should instead defer a proxy command. * @see DeferredCommand */ WPI_IGNORE_DEPRECATED - [[deprecated("Proxy a DeferredCommand instead")]] + [[deprecated("Defer a proxy command instead.")]] explicit ProxyCommand(wpi::unique_function supplier); /** @@ -62,11 +61,10 @@ class ProxyCommand : public CommandHelper { * confusing and opens potential footguns for users who do not fully * understand the semantics and implications of proxying, but who simply want * runtime construction. Users who do know what they are doing and need a - * supplier-constructed proxied command should instead proxy a DeferredCommand - * using the AsProxy decorator. + * supplier-constructed proxied command should instead defer a proxy command. * @see DeferredCommand */ - [[deprecated("Proxy a DeferredCommand instead")]] + [[deprecated("Defer a proxy command instead.")]] explicit ProxyCommand(wpi::unique_function supplier); WPI_UNIGNORE_DEPRECATED