Really this thing should have a run check in github CI. I I haven't thought of how to do that exactly, but anything code post on the website really should stay tagged to a specific commit and be reliable basically indefinitely. even better if it's somehow updates in lockstep with the underlying library because it compiles as part of rust-payjoin.
I am sure we are not the first to run into this problem and there are probably 10 solutions available
Originally posted by @DanGould in #139
Code on the site has no mechanism keeping it in sync with rust-payjoin, so tutorials silently stop compiling whenever the library makes a breaking change. Scope is site-wide ("anything code post on the website"), not just receive-payjoin-v2 (which is being fixed in #139).
Proposed solution. Move tutorial code into rust-payjoin/examples/receive-payjoin-v2/ as a workspace member with a path dep on payjoin. Workspace CI then compiles the example on every change, so any breaking API change fails CI in the same PR. The tutorial pins to a rust-payjoin release tag and tells readers cargo add payjoin@X.Y matching that tag. Markdown is updated manually at bump time (one tutorial today, automation not worth it yet).
Plan:
Needs a cACK from rust-payjoin maintainers before any of the above moves.
Originally posted by @DanGould in #139
Code on the site has no mechanism keeping it in sync with
rust-payjoin, so tutorials silently stop compiling whenever the library makes a breaking change. Scope is site-wide ("anything code post on the website"), not justreceive-payjoin-v2(which is being fixed in #139).Proposed solution. Move tutorial code into
rust-payjoin/examples/receive-payjoin-v2/as a workspace member with a path dep onpayjoin. Workspace CI then compiles the example on every change, so any breaking API change fails CI in the same PR. The tutorial pins to arust-payjoinrelease tag and tells readerscargo add payjoin@X.Ymatching that tag. Markdown is updated manually at bump time (one tutorial today, automation not worth it yet).Plan:
examples/receive-payjoin-v2/torust-payjoinworkspacepayjoin/receive-payjoin-v2to the newrust-payjoin/tree/v0.X.Y/...location (after next release tag)payjoin/receive-payjoin-v2Needs a cACK from
rust-payjoinmaintainers before any of the above moves.