Skip to content

Keep tutorial code in sync with rust-payjoin #140

Description

@vadim-anfv

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:

  • Update "Receive Payjoin V2" tutorial to current API #139
  • Add examples/receive-payjoin-v2/ to rust-payjoin workspace
  • Update tutorial's source-code link from payjoin/receive-payjoin-v2 to the new rust-payjoin/tree/v0.X.Y/... location (after next release tag)
  • Archive payjoin/receive-payjoin-v2

Needs a cACK from rust-payjoin maintainers before any of the above moves.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions