Skip to content
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

feat(cmds): document deprecated RPC API commands #8802

Merged
merged 3 commits into from
Mar 22, 2022

Conversation

lidel
Copy link
Member

@lidel lidel commented Mar 18, 2022

go-ipfs part of ipfs/go-ipfs-cmds#93

This PR adds the programmatic Status annotation introduced in ipfs/go-ipfs-cmds#225
and applies it to for already deprecated / experimental commands.

The main purpose of these annotations is to separate "stable|deprecated|experimental" commands when generating https://docs.ipfs.io/reference/http/api/ (implemented in ipfs/ipfs-docs#1086), but we also show them in --help text in CLI:

Demo

Deprecated object commands

$ ipfs object patch --help
WARNING:   DEPRECATED, command will be removed in the future

USAGE
  ipfs object patch - Deprecated way to create a new merkledag object based on an existing one. Use MFS with 'files cp|rm' instead.
...

Experimental name pubsub commands

$ ipfs name pubsub state --help
WARNING:   EXPERIMENTAL, command may change in future releases

USAGE
  ipfs name pubsub state - Query the state of IPNS pubsub.
....

Added programmatic state annotation introduced in
ipfs/go-ipfs-cmds#225
for already deprecated / experimental commands.
@lidel lidel self-assigned this Mar 18, 2022
lidel added a commit to ipfs/ipfs-docs that referenced this pull request Mar 18, 2022
Leverages Status field from
ipfs/go-ipfs-cmds#225
ipfs/kubo#8802
and uses that information while generating HTTP RPC API reference docs.
@lidel lidel marked this pull request as ready for review March 18, 2022 22:53
@lidel lidel added this to the go-ipfs 0.13 milestone Mar 18, 2022
@lidel lidel changed the title feat(cmds): deprecated and experimental hints for generated docs feat(cmds): document deprecated RPC API commands Mar 18, 2022
core/commands/dag/dag.go Outdated Show resolved Hide resolved
core/commands/dag/dag.go Outdated Show resolved Hide resolved
Helptext: cmds.HelpText{
Tagline: "List directory contents for Unix filesystem objects. Deprecated: Use 'ipfs ls' instead.",
Tagline: "List directory contents for Unix filesystem objects. Deprecated: Use 'ipfs ls' and 'ipfs files ls' instead.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized we have both an ipfs files and an ipfs file (single) command. the horror

go.mod Outdated Show resolved Hide resolved
Copy link
Contributor

@schomatis schomatis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving the use of the new Status field itself, not the statuses themselves being applied to the commands, which I have not enough context for.

@lidel lidel merged commit a61c53f into master Mar 22, 2022
@lidel lidel deleted the docs/add-command-maturity-status branch March 22, 2022 19:46
lidel added a commit to ipfs/ipfs-docs that referenced this pull request Apr 21, 2022
Leverages Status field from
ipfs/go-ipfs-cmds#225
ipfs/kubo#8802
and uses that information while generating HTTP RPC API reference docs.
lidel added a commit to ipfs/ipfs-docs that referenced this pull request Apr 21, 2022
Leverages Status field from
ipfs/go-ipfs-cmds#225
ipfs/kubo#8802
and uses that information while generating HTTP RPC API reference docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants