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

Meta: SEP Versioning #1046

Closed
leighmcculloch opened this issue Aug 23, 2021 · 11 comments
Closed

Meta: SEP Versioning #1046

leighmcculloch opened this issue Aug 23, 2021 · 11 comments
Labels

Comments

@leighmcculloch
Copy link
Member

leighmcculloch commented Aug 23, 2021

Over the last couple years a few folks have pointed out that SEP versioning needs some work.

Unlike CAPs, SEPs are not a point-in-time proposal. SEPs are protocols and specifications that are improved over time. This means that changes are made to them over long periods of time, sometimes bug fixes, sometimes improvements or new features, and sometimes breaking changes where necessary.

All SEPs have a Version meta field in their preamble. The SEP README provides instructions on how versions should be assigned during the draft stage (i.e. v0.X.Y) and in the Active and other stages (i.e. vMAJOR.MINOR.PATCH).

That is the extent of the support structures for versioning SEPs. SEPs do not typically provide a way for implementers to support multiple incompatible versions at the same time if a breaking change has occurred, or to communicate with another party about what version they support.

This issue is a place where we can discuss these and other problems relating to SEP versionins, and discuss ways we could improve.

cc @rice2000 @JakeUrban @tomerweller @accordeiro @marcelosalloum @yuriescl

@yuriescl
Copy link
Contributor

Thanks for creating this discussion. Indeed it's difficult to manage so many changes in SEPs while keeping Anchor and Wallet software compatible across time.
We need some kind of version and dependency system to allow SDKs, Anchors and Wallets to smoothly adapt to SEP changes.
About the versioning, I got some ideas:

  • Turn each SEP into a directory to allow version subdirectories:
    stellar-protocol/ecosystem/sep-0024/1.4.0/sep-0024.md (this structure is just an example)
  • Mention the compatible SEPs in each SEP .md file. For example, in sep-0024.md, add a section SEP Compatibility and detail the compatibility between this and the other SEPs.
  • Add very detailed changelogs and instructions between SEP versions. This makes it easy for Anchors, Wallets, and SDK developers to understand and follow the changes. At the moment we have diffs but maybe we can have something more elaborate.

@leighmcculloch
Copy link
Member Author

  • Turn each SEP into a directory to allow version subdirectories:
    stellar-protocol/ecosystem/sep-0024/1.4.0/sep-0024.md

I suggested a similar idea a little while ago and one of the pieces of feedback I received was that by moving each new version into a new file we lose the simple ability to view diffs between versions on GitHub. We have the files in Git and I think we should try and leverage them best we can. If we do the changelog idea maybe there's someway we can link in the changelog to each version of the SEP.

  • Mention the compatible SEPs in each SEP .md file. For example, in sep-0024.md, add a section SEP Compatibility and detail the compatibility between this and the other SEPs.

We've just started doing this, although we are only referencing SEPs and not their versions. Most SEPs have not been updated yet, but you can see in some like SEP-30 there is a Dependencies section that lists the other SEPs it is dependent on. We could extend this to include versions. It would become clear that a specific version of SEP-6 was compatible with a specific version of SEP-10. We could use notation similar to that used in software dependency definitions like ~> to say a SEP-10 v3.6 up and and not including v4 is compatible.

Thoughts? Would this deliver value? Would this be onerous to keep updated? I expect there is a maintenance cost to making sure all SEPs stay updated.

  • Add very detailed changelogs and instructions between SEP versions.

💯 I think this would deliver significant value. If we added a changelog, I think we could include that into the SEP itself as one of the first sections, just under the dependencies.

@yuriescl
Copy link
Contributor

Thoughts? Would this deliver value? Would this be onerous to keep updated? I expect there is a maintenance cost to making sure all SEPs stay updated.

I think it's better to have it than not have it (dependencies section). The maintenance would be required, but it's only updated once (ideally) on every version change. It would save time from Anchors and Wallets trying to figure out the incompatibilities themselves.

Another idea is for Anchors to list which SEP versions they support, maybe in the stellar.toml, or in a special endpoint, or in /info. For me it would make more sense to list the versions in the stellar.toml since it's the starting point for Wallets.

@marcelosalloum
Copy link
Contributor

  • Turn each SEP into a directory to allow version subdirectories:
    stellar-protocol/ecosystem/sep-0024/1.4.0/sep-0024.md (this structure is just an example)

I really like having a changelog and a link to previous versions! A non-breaking approach to preserve the file structure is linking to the commit where the previous version was updated, something like:

Versions

  • v2.0.0 (a link to the commit introducing version 2.0.0) –
  • v1.6.2 (a link to the commit introducing version 1.6.2) –

  • Add very detailed changelogs and instructions between SEP versions. This makes it easy for Anchors, Wallets, and SDK developers to understand and follow the changes. At the moment we have diffs but maybe we can have something more elaborate.

Having a detailed changelog specifying the breaking changes will raise awareness for both SEP editors and industry implementers, there's a lot of upside here!


Another idea is for Anchors to list which SEP versions they support, maybe in the stellar.toml, or in a special endpoint, or in /info. For me it would make more sense to list the versions in the stellar.toml since it's the starting point for Wallets.

I like this idea a lot! Most SEPs have a /info endpoint where we could also fit their latest version or list of supported versions. Maybe stellar.toml makes more sense though.

@github-actions github-actions bot added the stale label Oct 1, 2021
@stellar stellar deleted a comment from github-actions bot Oct 1, 2021
@github-actions
Copy link

github-actions bot commented Nov 1, 2021

This issue is stale because it has been open for 30 days with no activity. It will be closed in 30 days unless the stale label is removed.

@github-actions github-actions bot added the stale label Nov 1, 2021
@JakeUrban JakeUrban removed the stale label Nov 3, 2021
@github-actions
Copy link

github-actions bot commented Dec 4, 2021

This issue is stale because it has been open for 30 days with no activity. It will be closed in 30 days unless the stale label is removed.

@github-actions github-actions bot added the stale label Dec 4, 2021
@marcelosalloum
Copy link
Contributor

Another way to solve the SEP document versioning and changelogs is to use the Add/Update/Fix/BreakingChanges sections. For SEP-30, the versions section could look like this:

Versions

v0.8.1 (#913) – 2021-05-04:

Add

  • Add a Dependencies section

v0.8.0 (#800) – 2021-01-11:

Breaking changes

  • Remove urlencoded form data as a accepted content-type in requests

For the SEP document compatibility, we could just add the versioning definition that @leighmcculloch suggested to the document preamble:

SEP: 0030
...
Version: 0.8.1
Compatibility: ~>0.8.0

About how to make the compatibility discoverable by Wallets, I don't think the stellar toml is the best method because not all SEPs need a stellar.toml (SEP-30 for instance doesn't need it), so adding the compatibility info to /info or to a new endpoint may work better.

@github-actions github-actions bot removed the stale label Dec 16, 2021
@JakeUrban
Copy link
Contributor

+1 for a detailed changelog for each SEP. We could use a directory structure like:

ecosystem/
    sep24/
        sep-0024.md
        CHANGELOG.md

However, SEPs are linked everywhere in our documentation and other documents. Changing the file structure will break those links, which I think should be considered before making this change.

Another non-breaking change would be

ecosystem/
    changelogs/
        sep-0024.md
    sep-0001.md
    ...

This is definitely not as elegant but we could link the changelog in each SEP.


I think the Compatibility specification in the meta info is redundant. Wouldn't it always match the ruleset for semantic versioning?


Regarding the question of how anchors publish version info about their services, I agree with @marcelosalloum that using /info endpoints is the better route. One thing I realized is that since patch version changes to SEPs are nonfunctional (typo corrections, adding text to expand on an existing piece of the protocol, etc.), services should only need to declare major and minor version numbers in their /info endpoints.

@leighmcculloch
Copy link
Member Author

@marcelosalloum I like the changelog idea. I think we can include the changelog in the SEP itself, probably at the bottom in descending order. The expectation being that any change to the SEP includes a new line item in the changelog describing for that version what is being added, removed, deprecated, etc. Having it inside the document helps contain the SEP and everything about it in a single place that increases the chance it gets discovered by readers or updated by authors.

I think the Compatibility field for a SEP is somewhat confusing. I'm not really sure what it should mean. However, SEPs already have a dependencies section where they list what other SEPs they depend on. If a SEP is dependent on some newer version of another SEP it might be pertinent to mention that there, such as SEP-31 is dependent on SEP-10v1.3.0+.

@leighmcculloch
Copy link
Member Author

I've opened a PR with a proposal for how this could look: #1110

leighmcculloch added a commit that referenced this issue Jan 19, 2022
Add a very lightweight changelog section to the SEP template.

This idea was suggested by @marcelosalloum in #1046 (comment).

SEP documents evolve over time but there is no location where a reader can quickly read in prose a description of what has changed from one version to the next. While the Git history and PR descriptions for changes made to the SEP provide insights it requires a lot of effort for a reader to sift through all that information to find what the final incremental changes are that have been made.

Requiring a changelog entry will also help us evaluate the necessity and clarity of a change since the changelog is persisted forever we must choose wisely the changes we make.

The changelog @marcelosalloum had proposed was a larger document with sections under each version. After some experimentation I am proposing a more lightweight changelog. The reason being is that version changes in SEPs are often quite different to software releases in that we don't usually queue up changes then issue a release. Instead we issue a release and update a version with every small change we make to a SEP. For this reason I think we need only a single line to briefly state what each versions change is. Since the changelog will grow over time this will also keep it succinct and easy to parse and read.

The changelog @marcelosalloum had proposed was a separate markdown document but I've included the changelog in the SEP itself. I think it is very helpful today that most things for a SEP live inside the one SEP document. If the changelog is at the end it is unlikely to get in the way of the document content. It is easier to discover as well if it is embedded.
@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity. It will be closed in 30 days unless the stale label is removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants