Skip to content

Commit

Permalink
[cmd] Fix proxy command deprecation docs
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Turner <[email protected]>
  • Loading branch information
spacey-sooty committed Nov 21, 2024
1 parent 6adad7b commit 1ef60e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>asProxy</code> decorator.
* and need a supplier-constructed proxied command should instead defer a proxy command.
* @see DeferredCommand
*/
@Deprecated(since = "2025", forRemoval = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ class ProxyCommand : public CommandHelper<Command, ProxyCommand> {
* 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 <code>AsProxy</code> decorator.
* supplier-constructed proxied command should instead use defer command
* on a proxied command.
* @see DeferredCommand
*/
WPI_IGNORE_DEPRECATED
[[deprecated("Proxy a DeferredCommand instead")]]
[[deprecated("Defer a proxy command instead.")]]
explicit ProxyCommand(wpi::unique_function<Command*()> supplier);

/**
Expand All @@ -62,11 +62,11 @@ class ProxyCommand : public CommandHelper<Command, ProxyCommand> {
* 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 <code>AsProxy</code> decorator.
* supplier-constructed proxied command should instead use defer command
* on a proxied command.
* @see DeferredCommand
*/
[[deprecated("Proxy a DeferredCommand instead")]]
[[deprecated("Defer a proxy command instead.")]]
explicit ProxyCommand(wpi::unique_function<CommandPtr()> supplier);
WPI_UNIGNORE_DEPRECATED

Expand Down

0 comments on commit 1ef60e4

Please sign in to comment.