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

Add deprecation / addition information to schemas #5867

Merged

Conversation

rustyrussell
Copy link
Contributor

This opens the door to far better documentation (we used to just not mention now-deprecated fields, and never noted what version a field was added!), but also lets the SQL plugin (#5679) handle deprecations more gracefully (it can ignore anything deprecated before it was released, for example).

Note that #5825 should be rebased onto this (as it currently removes deprecated fields from schema).

@rustyrussell rustyrussell added this to the v23.02 milestone Jan 3, 2023
Copy link
Member

@cdecker cdecker left a comment

Choose a reason for hiding this comment

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

Interesting idea for the enforcement, I wonder if there is a JSON-specific diff that'd be a bit clearer.

doc/schemas/WRITING_SCHEMAS.md Outdated Show resolved Hide resolved
- **local\_msat** (msat, optional): Amount of channel we funded (deprecated)
- **remote\_msat** (msat, optional): Amount of channel they funded (deprecated)
- **local\_msat** (msat, optional): Amount of channel we funded **deprecated, removal in v23.5**
- **remote\_msat** (msat, optional): Amount of channel they funded **deprecated, removal in v23.5**
Copy link
Member

Choose a reason for hiding this comment

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

Needs 0-padding on the month, otherwise lexicographic sorting of versions is broken.

@rustyrussell
Copy link
Contributor Author

Interesting idea for the enforcement, I wonder if there is a JSON-specific diff that'd be a bit clearer.

Yeah, this is better than nothing, but far from ideal. In practice I wanted to make sure we didn't merge anything which changed the API by accident, and this should suffice for that in practice.

Copy link
Collaborator

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

ACK dffe061

No longer just delete them!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…mas.

This means we will document deprecations and additions, rather than just
pretending they've always been that way!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…precate.

TODO: It would be great to similarly annotate new/deprecated commands and
their parameters.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: doc: we now annotate what versions JSON field additions and deprecations happenened.
…te non-deprcated.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell
Copy link
Contributor Author

Trivial rebase.

Ack 9cc372d

@rustyrussell rustyrussell merged commit 3a39c63 into ElementsProject:master Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants