planetarium / NineChronicles.Headless

A headless node of NineChronicles game network, powered by Libplanet.
https://planetarium.github.io/NineChronicles.Headless/
GNU Affero General Public License v3.0
34 stars 37 forks source link

Strategy to deprecate API #1447

Open moreal opened 1 year ago

moreal commented 1 year ago

In my thought, there are some command line args or GraphQL fields, else something to deprecate. But we remain it for backward compatibility. If we remove it, it will be broken. But I think it limits the code to be better. So we MUST have a strategy to deprecate API.

You can reference the below items:

moreal commented 1 year ago

Just my thought notes:

Q. Who are users?

Q. How to notify the deprecation plan?

To deprecate some CLI commands or some GraphQL APIs, it should have a plan for when the API will be removed.

In the GitHub GraphQL API Breaking Changes case, it shows when to remove the APIs with descriptions. Users should keep an eye out for the breaking changes page. I wonder how it is possible to make users keep eye on the page 🤔

image

In Kubernetes CLI, it shows the warning message when the API will be deprecated. Though it seems like the message came from its server, I like this way because the user will see the message while using the app (CLI).

image

So I think:

moreal commented 1 year ago

In this comment, I want to start discussion about break changes from dependencies. At the Libplanet.Explorer case (i.e. query.chainQuery), it breaks its backward compatibility because it doesn't have a duty to guarantee backward compatibility (0.. release). But if we should guarantee backward compatibility, we should have a rule about backward incompatibiilty from submodules' changes.