-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
A draft for a stability guide #171
Conversation
…which lacks a lot of explanation. It uses monodrap to for nice structural diagrams, see https://monodraw.helftone.com for more.
Do you also have a MSRV policy? |
…and add notes to some support `cargo smart-release` will have to provide. Also don't let it kill build-metadata for no reason, for now.
…but allow such access behind a feature gate. That way gitoxide-core can be the canary for such a feature and also help measure when git-repository is probably ready for a stable release as there is no more unstable crates required, everything can go through the Easy API.
Great catch! My intuition is to require the latest stable release by default until ST1 is reached by at least one application crate. From there the MSRV can be updated to whatever is current during the next release IF there are any benefits to do so. What do you think about that? I think it should also be mentioned that the stability guide isn't stable in itself and it can be adjusted if better ways are discovered. Edit: Also: Is changing the MSRV a breaking change in itself? |
SGTM. I think it's more of a "good to know" at this stage :)
|
Let's keep it very simple for now and allow ourselves to keep up to date with stable. That way we get to use the latest clippy which is really the selling point right now.
Great, while writing it down I changed the MSRV back to: Let's use the latest stable to keep it simple, but be open to requirements to keep the Rustc version stable for a while or reduce it to a given version. What I wrote down makes sense to me and seems good enough for a first iteration. It's definitely good to have an outlook and a vision. One thing is for sure: for ST2 and ST1 having some additional tooling support would be great to be sure embargos are considered during these mostly automatic releases 😅. |
…now it's a thing!
@avoidscorn @edward-shen @joshtriplett It would be great if you could take a look and see if something important was missed in this first draft of the stability guide. Thanks a lot. |
STABILITY.md
Outdated
### Tier 3: pre-release crates | ||
|
||
Pre-release crates is marked with major version number zero, for example `0.1.4` and lives in stability tier 3 _(->ST3)_. | ||
|
||
It's acceptable to let each breaking change be followed by a minor version release. | ||
Dependent crates are advised to use `=<version>` version requirements to avoid automatic updates of patch levels which | ||
may be breaking if they also depend on other `plumbing crates`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary? This is implied by semver, and fwiw is the convention in Rust's ecosystem for pre 1.0 crates anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's beneficial to spell out how this is handled even if it represents the status quo.
Also I find helpful to explicitly state that dependents should pin their dependencies for stability. For the latter to truly work gitoxide
crates should also pin their dependencies, so that A-0.4 -> B 0.3 won't have a chance to break downstream if A-0.4.1 -> B -> 0.4 is released with dependent D using A (which auto-updates) and B 0.3, which won't auto-update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I find helpful to explicitly state that dependents should pin their dependencies for stability. For the latter to truly work gitoxide crates should also pin their dependencies, so that A-0.4 -> B 0.3 won't have a chance to break downstream if A-0.4.1 -> B -> 0.4 is released with dependent D using A (which auto-updates) and B 0.3, which won't auto-update.
Please ignore the latter as I think it's not necessary to protect downstream from that possibility with pre-release crates. This should only be done with 'alpha' releases of released software to not create issues like the ones encountered recently with clap
.
STABILITY.md
Outdated
│ │ │ git-odb │ │ git-ref │ │ │ | ||
│ │ └───────────┘ └───────────┘ │ │ | ||
│ │ ┌───────────┐ ┌───────────┐ │ │ | ||
│ │ │git-config │ │ git-pack │ │ │ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git-config
is still pre-1.0, which would be a tier 3 stability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can it be made clearer that this is an example for the structure of crates and their maximum stability tier?
Looking at it again I do realize that git-repository
plans to provide direct struct field access to something from git-config
, so that would make it ST1.
It's probably better to hide these types or to commit to more stability once it goes 1.0.
|
||
It is as low as it can be for the crate in questions. While there is no non-pre-release of a tier 1 crate, the MSRV is automatically assumed to be the latest stable version. | ||
|
||
Increasing the MSRV is not considered a breaking change and doesn't warrant a major version bump itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this convention? My intuition of semver would be that bumping MSRV would be considered backwards incompatible, but I suppose this isn't part of the API, so semver doesn't strictly apply here.
Should we make it at least a minor version bump? And/or suggest that we will attempt (but not guarantee) to only change msvp at minor or major versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this convention? My intuition of semver would be that bumping MSRV would be considered backwards incompatible, but I suppose this isn't part of the API, so semver doesn't strictly apply here.
That was also my first intuition, strictly speaking the MSRV (as well as the edition) affect stability and can break existing users. However, from what I reckon in the MSRV implementation for cargo nightly, cargo will be able to select only crates that have a matching msrv. So it won't select a patch level that would potentially break you.
Should we make it at least a minor version bump?
Whether minor or patch, it's the same effect on downstream crates as without cargo support, they will automatically update.
And/or suggest that we will attempt (but not guarantee) to only change msvp at minor or major versions?
Something like this I had written there before but removed it for the sake of simplicity and the preference for "let's wait for actual demand before complicating our life".
After re-reading this paragraph I realised it was a little 'split' with portions of the old text and the new one. It has now made clear that the MSRV is the latest stable unless there is demand for setting it. Hence this is likely to be revisited at some point.
…sitory` This would also mean that we have to re-create the entire API surface, which seems fair since the high-level API should be fully sufficient to handle all the tasks.
…but suggest pinning of alpha crates instead to avoid accidental breakage. Pre-release crates shouldn't break you unless you end up with multiple incompatible version of the same plumbing crate, which is impossible to prevent just on our side.
…even though it's not quite possible just yet due to leaking abstracitons, whose fix challenges the current sets of crates and their tiers. Some lower level types can greatly benefit from higher tiers.
…which are a subset of primitives that are so basic that it's easy to keep them in ST1, and let `git-repository` use them in its API.
@edward-shen Something new just emerged: Foundation Crates. The motivation of this tiered system is to have the least amount of crates commit to a long time between potentially breaking major releases. However it's unnecessarily hard to seal off all the details of the underlying crates which are usually exposed with types. For example, to keep a list of object ids most efficiently, you want to use However, it might well be possible that this isn't ever required as the API would be more like What do you think? |
…to avoid unnecessary crate splits which, in the case of `git-ref` don't really help that much given there are sub-objects like reflogs which would need complete wrapping. This might one day happen, but until then we can just plan for these to become ST1. Maybe that changes.
@edward-shen I probably should hold back in writing comments for a few minutes so that I can avoid back-paddling like now. When trying rip out Of course, as more and more of the |
This means it can use its types freely.
…as just now happened with git-lock and git-tempfile.
Thanks for everyones involvement. I am merging this branch because I plan some more breaking changes in ST3 crates to scratch them off the list of things that always bothered me, but am afraid of merge conflicts. I invite additional discussions and changes in a discussion or PR. Thanks for your understanding. |
For what it's worth Honestly, looking at On getting stuff implemented, I've been in the process of moving across the US (NY to CA) these few months. I'll try to get something done with the prefix issue resolved on the plane. Is there a specific timeframe you're aiming for for a 1.0.0 release of |
With this stability initiative I by no means want to push for 1.0 releases, but meant to write down how I can imagine a path towards stabilization. To my mind, with actual usage can come stability, and I think I wish you the best of times in California :)! |
It's goal is to explain what crate and application users can expect in terms of stability.
Having it should help building trust and encourage more people to rely on the crates provided
here.
pin all intra-workspace dependencies to their specific version while in pre-release modemakecargo smart-release
handle changing pinned versions when bumping versionsintroducemakegit-ref-base
as foundation crategit-ref
available.cargo smart-release
shouldn't have to useunstable
git-repositorygit-lock
andgit-tempflie
- to practice ST2 at least.git-hash::ObjectId
bstr
crate? Do we ultimately have to remove it from the API?Rendered