From a7353cd1d9999be4744a1c70a37f3c0ffaad706a Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 24 Aug 2021 12:08:32 +0800 Subject: [PATCH 01/23] =?UTF-8?q?[stability=20#164]=20First=20sketch=20of?= =?UTF-8?q?=20stability=20MD=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …which lacks a lot of explanation. It uses monodrap to for nice structural diagrams, see https://monodraw.helftone.com for more. --- DEVELOPMENT.md | 19 ++++--------- STABILITY.md | 53 ++++++++++++++++++++++++++++++++++++ etc/crate-structure.monopic | Bin 0 -> 2281 bytes 3 files changed, 59 insertions(+), 13 deletions(-) create mode 100644 STABILITY.md create mode 100644 etc/crate-structure.monopic diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 0bd1ed58659..9abdd166392 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -4,24 +4,17 @@ * **test-first development** * protect against regression and make implementing features easy. - * user docker to test more elaborate user interactions + * user containers to test more elaborate user interactions * keep it practical, knowing the Rust compiler already has your back for the mundane things, like unhappy code paths. * *use git itself* as reference implementation, and use their test-cases and fixtures where - appropriate. - * *use libgit2* test fixtures and cases where appropriate. + appropriate. At the very least, try to learn from them. + * *use libgit2* test fixtures and cases where appropriate, or learn from them. * **safety first** * handle all errors, never `unwrap()`. If needed, `expect("why")`. - * provide an error chain and make it easy to understand what went wrong. - * **strive for an MVP and version 1.0 fast...** - * ...even if that includes only the most common usecases. - * **Prefer to increment major version rapidly...** - * ...instead of keeping major version zero for longer than needed. - * **stability** - * we adhere to semantic versioning - * while below 1.0, expect a greater amount of breaking changes, which are announced with minor versions - * From 1.0, we will try hardest to keep the API and user interface non-breaking the closer to the user a library is. Thus the CLI should remain at version - 1 for a long time. However, crates that make it up can change more rapidly and may see more major version changes over time. + * provide an error chain and make it easy to understand what went wrong. We use `quick-error` for non-generic errors and `thiserror` when generalization is + needed. + * Adhere to the [stability guide](https://github.com/Byron/gitoxide/blob/main/STABILITY.md) ## General diff --git a/STABILITY.md b/STABILITY.md new file mode 100644 index 00000000000..fa3dac760a8 --- /dev/null +++ b/STABILITY.md @@ -0,0 +1,53 @@ +# Stability + +Even though this project adheres to [semver], this guide aims to explain how semantic versioning is used exactly and how we aim to provide stability within an +ever-changing codebase. + +## Project Structure + +The project consists of _many_ _plumbing_ crates, a single _application-level crate_ as well as _plumbing_ and _porcelain apps. The released application crate +as well as both apps get the tier 1 stability (->S1) and plumbing crates are assigned to the tier 2 stability (->S2) when released. + +``` + S1════════════════════════════════════════════╗ + ║ ║ + ║ gixp─────────────┐ gix──────────────┐ ║ + ║ │ plumbing app │ │ porcelain app │ ║ + ║ └────────────────┘ └────────────────┘ ║ + ║ │ │ ║ + ║ ▼ ▼ ║ + ║ git-repository──────────────────────┐ ║ + ║ │ application crate │ ║ + ║ └───────────────────────────────────┘ ║ + ║ │ ║ + ╚═════════════════════════════════════════════╝ + │ + S2────────────────────────────────────────────┐ + │ │ │ + │ ▼ │ + │ plumbing crates─────────────────────┐ │ + │ │ ┌───────────┐ ┌───────────┐ │ │ + │ │ │ git-odb │ │ git-ref │ │ │ + │ │ └───────────┘ └───────────┘ │ │ + │ │ ┌───────────┐ ┌───────────┐ │ │ + │ │ │git-config │ │…many more…│ │ │ + │ │ └───────────┘ └───────────┘ │ │ + │ └───────────────────────────────────┘ │ + │ │ + └─────────────────────────────────────────────┘``` +``` + +Pre-release crates and applications fall under tier 3 stability (S3). + +## How to proceed +* **strive for an MVP and version 1.0 fast...** + * ...even if that includes only the most common usecases. +* **Prefer to increment major version rapidly...** + * ...instead of keeping major version zero for longer than needed. +* **stability** + * we adhere to semantic versioning + * while below 1.0, expect a greater amount of breaking changes, which are announced with minor versions + * From 1.0, we will try hardest to keep the API and user interface non-breaking the closer to the user a library is. Thus the CLI should remain at version + 1 for a long time. However, crates that make it up can change more rapidly and may see more major version changes over time. + +[semver]: https://semver.org diff --git a/etc/crate-structure.monopic b/etc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1?l!`0oD|}u5GRE?Dbz`!P6{bVW4 z6Sye;!I(=aznIH+3|#*D-~U%h{&Ke}%2e;49lXdRTBn#p6hdjYWW;?ovH}|*=Yea5(0=N0T~q` zKUviT8k#og;}?jy3Y8^JQ(5X(sVs6GDhr?O69{WlS?CH(7GMto*n{o$;<*x=9s)gs6|jP7#s6oCM7i7+YDqNPFma^g8c>i zh}}ZBHbA=u0HbXHCR>QB<2i_bYlN`A!yS<8@f~5*0X_mcw>BN*nmE)^bI4S4TSwgk zEcuo;=@Q^d+olcV^eR5GhjzZaFxX>lq)!4_#vhH;Mqk9zI}=M<)>Ae=JC7{+5w~;= zJ{vN~5@xl8SuJ5!OZK@^$x;k`BA55^4T8Q_sZS}tv~S?z7JUPaNAfDZ;V@fvHu;R( z1uvs}etG}EAz{KHb;F?oh64*F(B~@I7i6e^kilSy#Nh}i7A$n3WN-q(Bn-C3k($0~ zBo5}6O&;tY$d7Nba=QjO&~JQrYQ%6XZxW*CgnuT1%5WJ?JZNm*)#J~7I>z3Q9|Axh zBt*q+k1USLAPz#*f7v(9T_r{Z3=0s}$EC1j!OLa<;sPz;E3f;;uWt`hP04nU#EoF@ z@lFsDY(WuyP%=j+Q8J-eB6(?)%;=4x=)k2gXdb+Y^l;xKstALI Date: Tue, 24 Aug 2021 14:50:20 +0800 Subject: [PATCH 02/23] [stability #171] Rough descriptions of ST 3 and 2 --- STABILITY.md | 64 +++++++++++++++++++++++++++++------- etc/crate-structure.monopic | Bin 2281 -> 2773 bytes 2 files changed, 52 insertions(+), 12 deletions(-) diff --git a/STABILITY.md b/STABILITY.md index fa3dac760a8..7b4fef4dbf6 100644 --- a/STABILITY.md +++ b/STABILITY.md @@ -3,43 +3,82 @@ Even though this project adheres to [semver], this guide aims to explain how semantic versioning is used exactly and how we aim to provide stability within an ever-changing codebase. +## Terminology + +* `dependent crate` + - A crate which depends on a crate in this workspace directly. +* `downstream crate` + - A crate which directly or indirectly depends on a crate in this workspace. +* `breaking change` + - A change in code that requires a `dependent crate` to adjust their code to fix compile errors. +* `release` + - A new version of a crate is published to crates.io + +## Tiers + +The project uses three stability tiers for all of its crates, and all crates use [semver] for their version numbers. +Tiers differ primarily in the time between breaking changes, which always have to be announced with `PRs` as per +our [collaboration guide] + +### 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 requirements to avoid automatic updates of patch levels which +may be breaking if they also depend on other `plumbing crates`. + +### Tier 2: released plumbing crates + +Released plumbing crates are marked with major version number 1 or above, for example `1.2.4` and live in stability tier 2 (->ST2). + +Breaking changes are collected and may be released no more often than every 6 weeks by incrementing the major version number. + +For example, `git-odb` and `git-ref` both have breaking changes, where `git-odb`'s change is on August 1st and `git-ref`'s dependent change +is on September 10th. `git-odb`'s breaking change can be released earliest on September 15th, whereas `git-ref` can be released earliest at October 22nd. + ## Project Structure -The project consists of _many_ _plumbing_ crates, a single _application-level crate_ as well as _plumbing_ and _porcelain apps. The released application crate -as well as both apps get the tier 1 stability (->S1) and plumbing crates are assigned to the tier 2 stability (->S2) when released. +The project consists of _many_ _plumbing_ crates, a single _application-level crate_ called `git-repository` as well as a _plumbing_ and a _porcelain apps. +### Released crates and apps ``` - S1════════════════════════════════════════════╗ + Release Software v1.X + ST1═══════════════════════════════════════════╗ ║ ║ ║ gixp─────────────┐ gix──────────────┐ ║ ║ │ plumbing app │ │ porcelain app │ ║ ║ └────────────────┘ └────────────────┘ ║ ║ │ │ ║ ║ ▼ ▼ ║ + ║ gitoxide-core───────────────────────┐ ║ + ║ │ application functionality │ ║ + ║ └───────────────────────────────────┘ ║ + ║ │ ║ + ║ ▼ ║ ║ git-repository──────────────────────┐ ║ ║ │ application crate │ ║ ║ └───────────────────────────────────┘ ║ ║ │ ║ ╚═════════════════════════════════════════════╝ │ - S2────────────────────────────────────────────┐ - │ │ │ + ST2───────────────────────────────────────────┐ │ ▼ │ │ plumbing crates─────────────────────┐ │ │ │ ┌───────────┐ ┌───────────┐ │ │ │ │ │ git-odb │ │ git-ref │ │ │ │ │ └───────────┘ └───────────┘ │ │ │ │ ┌───────────┐ ┌───────────┐ │ │ - │ │ │git-config │ │…many more…│ │ │ + │ │ │git-config │ │ git-pack │ │ │ │ │ └───────────┘ └───────────┘ │ │ + │ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ │ │ + │ │ …many more… │ │ + │ │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ │ │ └───────────────────────────────────┘ │ - │ │ - └─────────────────────────────────────────────┘``` -``` - -Pre-release crates and applications fall under tier 3 stability (S3). + └─────────────────────────────────────────────┘ + ``` -## How to proceed +## TODO * **strive for an MVP and version 1.0 fast...** * ...even if that includes only the most common usecases. * **Prefer to increment major version rapidly...** @@ -51,3 +90,4 @@ Pre-release crates and applications fall under tier 3 stability (S3). 1 for a long time. However, crates that make it up can change more rapidly and may see more major version changes over time. [semver]: https://semver.org +[collaboration guide]: https://github.com/Byron/gitoxide/blob/main/COLLABORATING.md diff --git a/etc/crate-structure.monopic b/etc/crate-structure.monopic index 7915c22f735c822f09a7ae6b7b6c335df63680d3..b9e1ee5b7a64ebb33d2c95c9d2b650a08d87398f 100644 GIT binary patch literal 2773 zcmV;`3M%#gO;1iwP)S1pABzY8000000u${W%W|v8^;cZ1rKx_>-QH%KRc02cN^Yr; zgk&-jXb`^F&MjBvYw}_FlJtXaKoT|xwb0037$F3Q)7|HNP9OgaviZN_MX?Vaf2z|d z6Y6Y{rA3?;v-u`Ym+>-qEb`}g5^S?&yqOj8OA$QkyCEWhyu91b=2^as^VuTXWO?vN z5Dytg1hYx7e~Ombk6Dqt#2fjTygw?6Xz>(D;0~~Yu=sslJCJ_%NNw2fy`x_HX+Sst$}Mv%)ll-THZ&gQv!ZR6r*Z!T`K#qVl>t7x;Ah%B>3 z9hkh~DOoP#)ZMTs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 Content-Transfer-Encoding: 8bit …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. --- STABILITY.md | 82 ++++++++++-------- cargo-smart-release/README.md | 2 + .../src/command/release/mod.rs | 3 - etc/crate-structure.monopic | Bin 2773 -> 2775 bytes 4 files changed, 47 insertions(+), 40 deletions(-) diff --git a/STABILITY.md b/STABILITY.md index 7b4fef4dbf6..4fa85fbeb41 100644 --- a/STABILITY.md +++ b/STABILITY.md @@ -5,13 +5,13 @@ ever-changing codebase. ## Terminology -* `dependent crate` +* _dependent crate_ - A crate which depends on a crate in this workspace directly. -* `downstream crate` +* _downstream crate_ - A crate which directly or indirectly depends on a crate in this workspace. -* `breaking change` +* _breaking change_ - A change in code that requires a `dependent crate` to adjust their code to fix compile errors. -* `release` +* _release_ - A new version of a crate is published to crates.io ## Tiers @@ -20,31 +20,11 @@ The project uses three stability tiers for all of its crates, and all crates use Tiers differ primarily in the time between breaking changes, which always have to be announced with `PRs` as per our [collaboration guide] -### 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 requirements to avoid automatic updates of patch levels which -may be breaking if they also depend on other `plumbing crates`. - -### Tier 2: released plumbing crates - -Released plumbing crates are marked with major version number 1 or above, for example `1.2.4` and live in stability tier 2 (->ST2). +The following schematic helps to visualize what follows. -Breaking changes are collected and may be released no more often than every 6 weeks by incrementing the major version number. - -For example, `git-odb` and `git-ref` both have breaking changes, where `git-odb`'s change is on August 1st and `git-ref`'s dependent change -is on September 10th. `git-odb`'s breaking change can be released earliest on September 15th, whereas `git-ref` can be released earliest at October 22nd. - -## Project Structure - -The project consists of _many_ _plumbing_ crates, a single _application-level crate_ called `git-repository` as well as a _plumbing_ and a _porcelain apps. - -### Released crates and apps ``` Release Software v1.X - ST1═══════════════════════════════════════════╗ + ST1 ══════════════════════════════════════════╗ ║ ║ ║ gixp─────────────┐ gix──────────────┐ ║ ║ │ plumbing app │ │ porcelain app │ ║ @@ -62,7 +42,7 @@ The project consists of _many_ _plumbing_ crates, a single _application-level cr ║ │ ║ ╚═════════════════════════════════════════════╝ │ - ST2───────────────────────────────────────────┐ + ST2 ──────────────────────────────────────────┐ │ ▼ │ │ plumbing crates─────────────────────┐ │ │ │ ┌───────────┐ ┌───────────┐ │ │ @@ -78,16 +58,44 @@ The project consists of _many_ _plumbing_ crates, a single _application-level cr └─────────────────────────────────────────────┘ ``` -## TODO -* **strive for an MVP and version 1.0 fast...** - * ...even if that includes only the most common usecases. -* **Prefer to increment major version rapidly...** - * ...instead of keeping major version zero for longer than needed. -* **stability** - * we adhere to semantic versioning - * while below 1.0, expect a greater amount of breaking changes, which are announced with minor versions - * From 1.0, we will try hardest to keep the API and user interface non-breaking the closer to the user a library is. Thus the CLI should remain at version - 1 for a long time. However, crates that make it up can change more rapidly and may see more major version changes over time. +### 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 requirements to avoid automatic updates of patch levels which +may be breaking if they also depend on other `plumbing crates`. + +### Tier 2: released plumbing crates + +Released plumbing crates are marked with major version number 1 or above, for example `1.2.4` and live in stability tier 2 _(->ST2)_. + +Breaking changes are collected and may be released no more often than every 4 weeks by incrementing the major version number. + +For example, `git-odb` and `git-ref` both have breaking changes, where `git-odb`'s change is on August 1st and `git-ref`'s dependent change +is on September 10th. `git-odb`'s breaking change can be released earliest on September 1st, whereas `git-ref` can be released earliest at October 10th. + +If there are additional breaking changes without a release, these push back the earliest release date accordingly. + +### Tier 1: released apps and application crates + +Released apps and application crates are marked with major version number 1 or above, like `2.3.0+21.06` and live in tier 1 _(->ST1)_, +with the build identifiers for year (`21`) and and month `06` appended, based on the actual release year and month. + +Breaking changes are collected and may be released no more often than every 6 months by incrementing the major version number. If there are additional breaking changes, +these push bac the release date so that they can be tested at least for 3 months. For example, a breaking change happens in January 01, and another breaking change in February 15. +The earliest release date is July 1st. Had the second breaking change happened in April 01, the release date would have to be pushed to August 1st. + +Intermediate pre-releases may be created at most every 4 weeks by appending `-alpha.X` where `X` is the sequential release number. These should help testing +breaking changes or new features without forcing the use of `git` sources for dependencies in cargo manifests. Pre-release releases must pin all the pre-release +crates they depend on to prevent automatic upgrades. + +Minor version updates for new features can be released when needed assuming there are no other breaking changes, updating the build identifiers for year and month accordingly. + + +## Transitioning from pre-release to release crates + +How do we avoid staying in pre-release mode forever? [semver]: https://semver.org [collaboration guide]: https://github.com/Byron/gitoxide/blob/main/COLLABORATING.md diff --git a/cargo-smart-release/README.md b/cargo-smart-release/README.md index 3f4e29b0528..1418a559225 100644 --- a/cargo-smart-release/README.md +++ b/cargo-smart-release/README.md @@ -32,6 +32,7 @@ instructions, one should end up with a fully automatic release of multiple crate * [x] automatically release dependent workspace pre-release crates along with the desired one if they changed since their last release * [x] automatically adjust manifest versions and update manifests of crates which use those whose versions were incremented * [x] use git tags to know if a crate changed at all, skipping publishes if there is no code change at all +* [ ] Handle pre-release versions and meta-data as per the [stability guide]. * [ ] Support other remote names than 'origin' - currently the latter name is assumed. Fix by getting the remote of the currently checked out branch. * [ ] handle version specifications correctly [(tables vs values)](https://github.com/Byron/cargo-release/blob/master/src/cargo.rs#L179:L207) * [ ] handle all version comparators correctly (see [here](https://github.com/Byron/cargo-release/blob/master/src/version.rs#L192:L226) for how it's done) @@ -64,3 +65,4 @@ Thanks to [cargo-release] for showing the way and for incredible fast response t [cargo-release]: https://github.com/sunng87/cargo-release/issues/224 [rustup]: https://rustup.rs/ +[stability guide]: https://github.com/Byron/gitoxide/blob/stability/STABILITY.md diff --git a/cargo-smart-release/src/command/release/mod.rs b/cargo-smart-release/src/command/release/mod.rs index 10fada4a69f..bdef943be07 100644 --- a/cargo-smart-release/src/command/release/mod.rs +++ b/cargo-smart-release/src/command/release/mod.rs @@ -534,18 +534,15 @@ fn bump_to_valid_version( v.major += 1; v.minor = 0; v.patch = 0; - v.build = BuildMetadata::EMPTY; v.pre = Prerelease::EMPTY; } "minor" => { v.minor += 1; v.patch = 0; - v.build = BuildMetadata::EMPTY; v.pre = Prerelease::EMPTY; } "patch" => { v.patch += 1; - v.build = BuildMetadata::EMPTY; v.pre = Prerelease::EMPTY; } "keep" => {} diff --git a/etc/crate-structure.monopic b/etc/crate-structure.monopic index b9e1ee5b7a64ebb33d2c95c9d2b650a08d87398f..cec5b9042ee5325a78c0eef72dd052239de0231e 100644 GIT binary patch delta 2753 zcmV;y3O@DK71tGz9e?Gie$w6EW}8)J7O6^Zsj!4(G7@M2-)rZVtMWDZuzX4SK{p@? z8-!YDWG{>mg2U}m9oR;&)O`I;{W$;ku&+#nS zX3KapFXNXoc+hu4L;`tvSIi%?d>QBSMYhTE;DI0>GL8slvwxs?ik8`rd6~S#8~K>L zKPt;;@f1nm4zPl-_E^e~L?`nXnXj4c;mf4~SOy2O6ESGWWZdjC0dG@@1au*&W ziMPCzF6ZUzPJfOFwXVgf8mF7VGFk@@a!~5lc_J?(;ASXWt%_L9ESQ174zNi6EnxqBa}T@sSUjs0+ymO0gS*Qtk&(xu_$nsPz z0Ic7jA1fR|AbD?=C+j3tXwU8;aS!j|VgVdk^Y;2x7=KkGP1I9GQod?3*k$rG$x=Hb z4I(gS!k!`E&Y(R5B>3juwv39WdLDlUJH1lR`k2Y%+x|>#TGOWz1#g zMLd_-?o&j2s1{^{sA|4ZOEQm_N!eKEYEnL!!+Lq}!FpHRamZ$EOyA6uajd3hlce$9 zd{y}D@qd%Mv13B_xT}MhhYh?#csZ7%?d3rgmPPrh1QKqLFPLG#9!sjcZ$l7 zlAgd7Z3$vesG_l_I9krrtc=tX`lW}W<{c_|hgXVty;VQS!FFJx5jY|`8XUZhb`4|% z3%aDzQ6|*$XJ!*06ZjUz7J8w=>Oh?C>xPQ#aDS)>$St81hezhmlDfQ6s;GH2JTq2( zWtU03_2AzsxCE%%4?!)HT#vfaKXb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A4z$eQWLkI`kt^5LxF(P-l zm07hnvC{Mco8QlzX)-}B!-c$msSC_6VK!r58%&YEBnTJYCRMcUTo!!j?qUkOVNJqI zkOJ}-CxjTa%qtf|=T$II6s+!!Halr8#YN4F+Q)y)(&z0w&NV!)&5lst0JTO$y1rQo zSoBuIR|!h(STz(Ske21d?xMJa7wmBfi7PwbsRClD6TvT-B0(Tzp|m-FDd#BsU@`6E z$?_$5oYr^vBjR4;TtSPO2lyO=_p|_H)$}5_+Hh_0`j9ChHuGCFr1a#|UkW3{6;@v)Tn- zc|}#Hp3fDGC1-WeZEWsCUoCXs+lno!VoyhA0FKl|S2Qu`wGkVC;45sz2B^~Y(2DfhkejSXbIEZADGJ7J<%gZH-}M`_Nkn~ zEN|`7gi%oS3$K!l<8*0iAk)`5z~L2~15Eok2ddi2TU&hLY1^5{_;1*&(WbbuoKtw8 zop{H}IUR09=;}3v>~K2}y1vg8T1gdJsTtZb`OwwLhnH@Dx9POXO?KNH+K1QF_;(c# znB7`R8hoXsFPxHA4UD>q1x$~2367DHwgFab6VT44arPDdWdFSY5B~23(3evOajT;| zxFk}6@a5hxf4SGtQza)N9{csQ{bMWBdUjB}gHd0#+5XBz5%n%-gzQ^my z{hvj)8?C`EE3*-QW|MW?sx@xa8n Date: Tue, 24 Aug 2021 15:47:42 +0800 Subject: [PATCH 04/23] [stability #171] about transitioning from pre-release to release --- STABILITY.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/STABILITY.md b/STABILITY.md index 4fa85fbeb41..67d67779bda 100644 --- a/STABILITY.md +++ b/STABILITY.md @@ -97,5 +97,16 @@ Minor version updates for new features can be released when needed assuming ther How do we avoid staying in pre-release mode forever? +There is only two questions to ask and answer positively: + +- _Does the crate fulfill its intended purpose well enough?_ +- _Do the dependent workspace crates fulfill their intended purposes well enough?_ + +For plumbing crates, the intended purpose is narrow which would allow them to transition earlier. For plumbing crates, if in doubt or fear of future requirements +especially if dependent crates are still early in development, prefer to release them anyway and live with requirements of _ST2_. + +Apps and application crates may take longer as they are larger in scope. A good indicator for them to get to a release may be maturing plumbing crates they +use. Their scope shoud also be narrowed to a minimal viable product. + [semver]: https://semver.org [collaboration guide]: https://github.com/Byron/gitoxide/blob/main/COLLABORATING.md From 71eb30f1caa41c1f9fe5d2785b71c9d77922c2af Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 24 Aug 2021 16:07:35 +0800 Subject: [PATCH 05/23] =?UTF-8?q?[stability=20#171]=20Don't=20leak=20unsta?= =?UTF-8?q?ble=20plumbing=20crates=20in=20git-repository=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …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. --- Makefile | 2 ++ STABILITY.md | 4 ++-- .../src/command/release/mod.rs | 2 +- etc/crate-structure.monopic | Bin 2775 -> 2786 bytes git-repository/Cargo.toml | 1 + ...errupt-handler-allows-graceful-shutdown.rs | 5 ++-- git-repository/src/easy/ext/object.rs | 2 +- git-repository/src/easy/ext/reference.rs | 17 +++++++------- git-repository/src/easy/mod.rs | 6 ++++- git-repository/src/easy/object/mod.rs | 12 ++++++---- git-repository/src/easy/object/tree.rs | 4 ++-- git-repository/src/easy/oid.rs | 2 +- git-repository/src/easy/reference.rs | 20 +++++++++------- git-repository/src/easy/state.rs | 2 +- git-repository/src/lib.rs | 22 +++++++++++++----- git-repository/src/path/is_git.rs | 2 +- git-repository/tests/reference/mod.rs | 3 ++- gitoxide-core/Cargo.toml | 2 +- 18 files changed, 65 insertions(+), 43 deletions(-) diff --git a/Makefile b/Makefile index 07b30dd2522..c37761a1b0d 100644 --- a/Makefile +++ b/Makefile @@ -129,6 +129,8 @@ check: ## Build all code in suitable configurations && cargo check --features async-client cd git-protocol && if cargo check --all-features 2>/dev/null; then false; else true; fi cd git-repository && cargo check --all-features \ + && cargo check --no-default-features --features local \ + && cargo check --no-default-features --features network \ && cargo check --no-default-features unit-tests: ## run all unit tests diff --git a/STABILITY.md b/STABILITY.md index 67d67779bda..a0123e0ae44 100644 --- a/STABILITY.md +++ b/STABILITY.md @@ -24,7 +24,7 @@ The following schematic helps to visualize what follows. ``` Release Software v1.X - ST1 ══════════════════════════════════════════╗ + Stability Tier 1 ═════════════════════════════╗ ║ ║ ║ gixp─────────────┐ gix──────────────┐ ║ ║ │ plumbing app │ │ porcelain app │ ║ @@ -42,7 +42,7 @@ The following schematic helps to visualize what follows. ║ │ ║ ╚═════════════════════════════════════════════╝ │ - ST2 ──────────────────────────────────────────┐ + Stability Tier 2 ─────────────────────────────┐ │ ▼ │ │ plumbing crates─────────────────────┐ │ │ │ ┌───────────┐ ┌───────────┐ │ │ diff --git a/cargo-smart-release/src/command/release/mod.rs b/cargo-smart-release/src/command/release/mod.rs index bdef943be07..bc2f902feb1 100644 --- a/cargo-smart-release/src/command/release/mod.rs +++ b/cargo-smart-release/src/command/release/mod.rs @@ -526,7 +526,7 @@ fn bump_to_valid_version( }; Ok(new_version) } - use semver::{BuildMetadata, Prerelease}; + use semver::Prerelease; let mut v = publishee.version.clone(); match bump_spec { diff --git a/etc/crate-structure.monopic b/etc/crate-structure.monopic index cec5b9042ee5325a78c0eef72dd052239de0231e..7e111357f1e4224d695f45cc4516ad440bba246f 100644 GIT binary patch literal 2786 zcmV<83LW+TO;1iwP)S1pABzY8000000u${W+j6VO@mEwl%Ug40X8fAhJZ1MGRmmw8 zl8{VR0xiPl*g55@d`&(qUy`{n14zOKp%Gfy50(*zrs?T>_q2Zo+5BJeqSyzIKh@y_ z6Y6M@rA3?;v-u`Ym+>-qEb`}g8f>#=yqOj8OA$Qkt05wRJiXh`=2^as^VuTXWO?vN z5Dytg1hZ+de~Ombk6Dqt#2a~=ygn+5Xz>(D;0~~Yu=ssl-Oo4_0B|r3a*1A)uAeti zUOq+seHyItXdBO>bn%qsvpil|j3Ad!D6!GcoXvCd*v84t-kjWIi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v>H6PRrupos zcn71tinIOIi6ZWcUpx^9_SapSTz!|`i8D>^S!q4ElobtD~{{vBG-SUxn002&uTZjMv diff --git a/git-repository/Cargo.toml b/git-repository/Cargo.toml index 43c8af586d6..32946a5c8c7 100644 --- a/git-repository/Cargo.toml +++ b/git-repository/Cargo.toml @@ -14,6 +14,7 @@ test = true [features] default = ["max-performance", "one-stop-shop"] +unstable = [] serde1 = ["git-pack/serde1", "git-object/serde1"] max-performance = ["git-features/zlib-ng-compat", "git-features/fast-sha1"] local = [ diff --git a/git-repository/examples/interrupt-handler-allows-graceful-shutdown.rs b/git-repository/examples/interrupt-handler-allows-graceful-shutdown.rs index 03b019bfe87..b2d89087e08 100644 --- a/git-repository/examples/interrupt-handler-allows-graceful-shutdown.rs +++ b/git-repository/examples/interrupt-handler-allows-graceful-shutdown.rs @@ -1,13 +1,12 @@ use std::path::Path; -use git_repository::tempfile::{AutoRemove, ContainingDirectory}; +use git_tempfile::{AutoRemove, ContainingDirectory}; fn main() -> anyhow::Result<()> { git_repository::interrupt::init_handler(|| {})?; eprintln!("About to emit the first term signal"); let tempfile_path = Path::new("example-file.tmp"); - let _keep_tempfile = - git_repository::tempfile::mark_at(tempfile_path, ContainingDirectory::Exists, AutoRemove::Tempfile)?; + let _keep_tempfile = git_tempfile::mark_at(tempfile_path, ContainingDirectory::Exists, AutoRemove::Tempfile)?; signal_hook::low_level::raise(signal_hook::consts::SIGTERM)?; eprintln!( diff --git a/git-repository/src/easy/ext/object.rs b/git-repository/src/easy/ext/object.rs index b5a434f8736..8fe7804d26a 100644 --- a/git-repository/src/easy/ext/object.rs +++ b/git-repository/src/easy/ext/object.rs @@ -5,8 +5,8 @@ use git_hash::ObjectId; use crate::{ easy, easy::{object, ObjectRef}, - odb::{Find, FindExt}, }; +use git_odb::{Find, FindExt}; pub fn find_object( access: &A, diff --git a/git-repository/src/easy/ext/reference.rs b/git-repository/src/easy/ext/reference.rs index 8a09e278776..ed3277cdc2f 100644 --- a/git-repository/src/easy/ext/reference.rs +++ b/git-repository/src/easy/ext/reference.rs @@ -3,15 +3,16 @@ use std::convert::TryInto; use git_hash::ObjectId; use crate::{ - actor, easy, + easy, easy::{reference, Reference}, - lock, - refs::{ - file::find::Error, - mutable::Target, - transaction::{Change, Create, RefEdit}, - PartialName, - }, +}; +use git_actor as actor; +use git_lock as lock; +use git_ref::{ + file::find::Error, + mutable::Target, + transaction::{Change, Create, RefEdit}, + PartialName, }; /// Obtain and alter references comfortably diff --git a/git-repository/src/easy/mod.rs b/git-repository/src/easy/mod.rs index 2964803dfb5..78ccbfbd7aa 100644 --- a/git-repository/src/easy/mod.rs +++ b/git-repository/src/easy/mod.rs @@ -16,7 +16,11 @@ use std::{ ops::{Deref, DerefMut}, }; -use crate::{hash::ObjectId, objs, odb, refs, Repository}; +use crate::Repository; +use git_hash::ObjectId; +use git_object as objs; +use git_odb as odb; +use git_ref as refs; use std::sync::Arc; use std::time::SystemTime; diff --git a/git-repository/src/easy/object/mod.rs b/git-repository/src/easy/object/mod.rs index 916e7982ea2..6dd04a646a2 100644 --- a/git-repository/src/easy/object/mod.rs +++ b/git-repository/src/easy/object/mod.rs @@ -6,10 +6,10 @@ pub use git_object::Kind; use crate::{ easy, easy::{Object, ObjectRef, TreeRef}, - hash::ObjectId, - objs::immutable, - odb, }; +use git_hash::ObjectId; +use git_object::immutable; +use git_odb as odb; mod impls; mod tree; @@ -61,7 +61,8 @@ where pub mod find { use quick_error::quick_error; - use crate::{easy, odb}; + use crate::easy; + use git_odb as odb; quick_error! { #[derive(Debug)] @@ -87,7 +88,8 @@ pub mod find { pub mod existing { use quick_error::quick_error; - use crate::{easy, odb}; + use crate::easy; + use git_odb as odb; quick_error! { #[derive(Debug)] diff --git a/git-repository/src/easy/object/tree.rs b/git-repository/src/easy/object/tree.rs index 3ba4581ce5c..84ddbb3aef0 100644 --- a/git-repository/src/easy/object/tree.rs +++ b/git-repository/src/easy/object/tree.rs @@ -1,9 +1,9 @@ use crate::{ easy, easy::{object::find, TreeRef}, - objs, - objs::{bstr::BStr, immutable}, }; +use git_object as objs; +use git_object::{bstr::BStr, immutable}; impl<'repo, A> TreeRef<'repo, A> where diff --git a/git-repository/src/easy/oid.rs b/git-repository/src/easy/oid.rs index 4d0ed18bf32..76b985639ea 100644 --- a/git-repository/src/easy/oid.rs +++ b/git-repository/src/easy/oid.rs @@ -1,8 +1,8 @@ use crate::{ easy, easy::{object::find, Object, ObjectRef, Oid}, - hash::{oid, ObjectId}, }; +use git_hash::{oid, ObjectId}; impl<'repo, A, B> PartialEq> for Oid<'repo, B> { fn eq(&self, other: &Oid<'repo, A>) -> bool { diff --git a/git-repository/src/easy/reference.rs b/git-repository/src/easy/reference.rs index 0144c8a6142..1a00324e9a7 100644 --- a/git-repository/src/easy/reference.rs +++ b/git-repository/src/easy/reference.rs @@ -4,16 +4,15 @@ use std::ops::DerefMut; use crate::{ easy, easy::{Oid, Reference}, - hash::ObjectId, - odb::Find, - refs, - refs::mutable, }; +use git_hash::ObjectId; +use git_odb::Find; +use git_ref as refs; pub(crate) enum Backing { OwnedPacked { /// The validated full name of the reference. - name: mutable::FullName, + name: refs::mutable::FullName, /// The target object id of the reference, hex encoded. target: ObjectId, /// The fully peeled object id, hex encoded, that the ref is ultimately pointing to @@ -26,7 +25,8 @@ pub(crate) enum Backing { pub mod edit { use quick_error::quick_error; - use crate::{easy, refs}; + use crate::easy; + use git_ref as refs; quick_error! { #[derive(Debug)] @@ -57,7 +57,8 @@ pub mod edit { pub mod peel_to_id_in_place { use quick_error::quick_error; - use crate::{easy, refs}; + use crate::easy; + use git_ref as refs; quick_error! { #[derive(Debug)] @@ -108,7 +109,7 @@ where } pub fn target(&self) -> refs::mutable::Target { match self.backing.as_ref().expect("always set") { - Backing::OwnedPacked { target, .. } => mutable::Target::Peeled(target.to_owned()), + Backing::OwnedPacked { target, .. } => refs::mutable::Target::Peeled(target.to_owned()), Backing::LooseFile(r) => r.target.clone(), } } @@ -164,7 +165,8 @@ where pub mod find { use quick_error::quick_error; - use crate::{easy, refs}; + use crate::easy; + use git_ref as refs; pub mod existing { use quick_error::quick_error; diff --git a/git-repository/src/easy/state.rs b/git-repository/src/easy/state.rs index 28dc5be6f76..11418385c7e 100644 --- a/git-repository/src/easy/state.rs +++ b/git-repository/src/easy/state.rs @@ -4,8 +4,8 @@ use std::cell::{Ref, RefMut}; use crate::{ easy, easy::{borrow, PackCache}, - refs::{file, packed}, }; +use git_ref::{file, packed}; impl Clone for easy::State { fn clone(&self) -> Self { diff --git a/git-repository/src/lib.rs b/git-repository/src/lib.rs index 181ec190e8e..37fba4b3915 100644 --- a/git-repository/src/lib.rs +++ b/git-repository/src/lib.rs @@ -48,9 +48,10 @@ //! //! # Cargo-features //! -//! ## One-stop-shop +//! ## With the optional "unstable" cargo feature //! -//! To make using _sub-crates_ easier these are re-exported into the root of this crate. +//! To make using _sub-crates_ easier these are re-exported into the root of this crate. Note that these may change their major version +//! even if this crate doesn't, hence breaking downstream. //! //! `git_repository::` //! * [`hash`] @@ -66,6 +67,7 @@ //! * [`lock`] //! * [`traverse`] //! * [`diff`] +//! * [`parallel`] //! * [`Progress`] //! * [`progress`] //! * [`interrupt`] @@ -79,21 +81,29 @@ use std::{path::PathBuf, rc::Rc, sync::Arc}; // Re-exports to make this a potential one-stop shop crate avoiding people from having to reference various crates themselves. // This also means that their major version changes affect our major version, but that's alright as we directly expose their // APIs/instances anyway. +#[cfg(feature = "unstable")] pub use git_actor as actor; -#[cfg(feature = "git-diff")] +#[cfg(all(feature = "unstable", feature = "git-diff"))] pub use git_diff as diff; +#[cfg(feature = "unstable")] pub use git_features::{parallel, progress, progress::Progress}; +#[cfg(feature = "unstable")] pub use git_hash as hash; +#[cfg(feature = "unstable")] pub use git_lock as lock; +#[cfg(feature = "unstable")] pub use git_object as objs; +#[cfg(feature = "unstable")] pub use git_odb as odb; -#[cfg(feature = "git-protocol")] +#[cfg(all(feature = "unstable", feature = "git-protocol"))] pub use git_protocol as protocol; +#[cfg(feature = "unstable")] pub use git_ref as refs; +#[cfg(feature = "unstable")] pub use git_tempfile as tempfile; -#[cfg(feature = "git-traverse")] +#[cfg(all(feature = "unstable", feature = "git-traverse"))] pub use git_traverse as traverse; -#[cfg(feature = "git-url")] +#[cfg(all(feature = "unstable", feature = "git-url"))] pub use git_url as url; pub use path::Path; diff --git a/git-repository/src/path/is_git.rs b/git-repository/src/path/is_git.rs index 63a695a952e..0e98ce7d16c 100644 --- a/git-repository/src/path/is_git.rs +++ b/git-repository/src/path/is_git.rs @@ -10,7 +10,7 @@ quick_error! { from() source(err) } - MisplacedHead(name: crate::objs::bstr::BString) { + MisplacedHead(name: git_object::bstr::BString) { display("Expected HEAD at '.git/HEAD', got '.git/{}'", name) } MissingObjectsDirectory(missing: PathBuf) { diff --git a/git-repository/tests/reference/mod.rs b/git-repository/tests/reference/mod.rs index 439ebbf4072..0508f3c7519 100644 --- a/git-repository/tests/reference/mod.rs +++ b/git-repository/tests/reference/mod.rs @@ -5,7 +5,8 @@ fn repo() -> crate::Result { mod find { use std::convert::TryInto; - use git_repository::{prelude::*, refs}; + use git_ref as refs; + use git_repository::prelude::*; use git_testtools::hex_to_id; use crate::reference::repo; diff --git a/gitoxide-core/Cargo.toml b/gitoxide-core/Cargo.toml index a68dec8b398..24334beece0 100644 --- a/gitoxide-core/Cargo.toml +++ b/gitoxide-core/Cargo.toml @@ -27,7 +27,7 @@ all-features = true [dependencies] # deselect everything else (like "performance") as this should be controllable by the parent application. -git-repository = { version = "^0.7.0", path = "../git-repository", default-features = false, features = ["local"]} +git-repository = { version = "^0.7.0", path = "../git-repository", default-features = false, features = ["local", "unstable"]} git-protocol-for-configuration-only = { package = "git-protocol", version ="^0.9.0", path = "../git-protocol", optional = true } git-commitgraph = { version = "^0.4.0", path = "../git-commitgraph" } git-config = { version = "^0.1.0", path = "../git-config" } From 9be1fcedf94e65b84f9769f74410a7c4f374f6ba Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 24 Aug 2021 21:15:43 +0800 Subject: [PATCH 06/23] [stability #171] How to handle the MSRV 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. --- STABILITY.md | 13 ++++++++++++- rust-toolchain.tml | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 rust-toolchain.tml diff --git a/STABILITY.md b/STABILITY.md index a0123e0ae44..d4ff631f263 100644 --- a/STABILITY.md +++ b/STABILITY.md @@ -3,12 +3,16 @@ Even though this project adheres to [semver], this guide aims to explain how semantic versioning is used exactly and how we aim to provide stability within an ever-changing codebase. +Please note that this guide isn't stable itself and may be adjusted to fit changes in requirements or new ways are discovered. + ## Terminology * _dependent crate_ - A crate which depends on a crate in this workspace directly. * _downstream crate_ - A crate which directly or indirectly depends on a crate in this workspace. +* _workspace crate_ + - A crate which is a member of this workspace and hence is stored in this repository * _breaking change_ - A change in code that requires a `dependent crate` to adjust their code to fix compile errors. * _release_ @@ -18,7 +22,7 @@ ever-changing codebase. The project uses three stability tiers for all of its crates, and all crates use [semver] for their version numbers. Tiers differ primarily in the time between breaking changes, which always have to be announced with `PRs` as per -our [collaboration guide] +our [collaboration guide]. The following schematic helps to visualize what follows. @@ -92,6 +96,13 @@ crates they depend on to prevent automatic upgrades. Minor version updates for new features can be released when needed assuming there are no other breaking changes, updating the build identifiers for year and month accordingly. +## The _Minimal Stable Rust Version_ (->MSRV) + +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. + +Please let us know if you have other requirement and we see if we can provide stability guarantees for it or reduce the MSRV to a given version. ## Transitioning from pre-release to release crates diff --git a/rust-toolchain.tml b/rust-toolchain.tml new file mode 100644 index 00000000000..292fe499e3b --- /dev/null +++ b/rust-toolchain.tml @@ -0,0 +1,2 @@ +[toolchain] +channel = "stable" From f330daa06577eabbd61c66526710371a14228274 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 24 Aug 2021 21:37:39 +0800 Subject: [PATCH 07/23] =?UTF-8?q?[stability=20#171]=20update=20README=20wi?= =?UTF-8?q?th=20stability=20information=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …now it's a thing! --- README.md | 70 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 9d67d343aaf..e264b8138ca 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Please see _'Development Status'_ for a listing of all crates and their capabili ### Crates -Follow linked crate name for detailed status. +Follow linked crate name for detailed status. Please note that all crates follow [semver] as well as the [stability guide]. * **usable** * [git-actor](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-actor) @@ -69,6 +69,7 @@ Follow linked crate name for detailed status. * [git-tempfile](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-tempfile) * [git-lock](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-lock) * [git-ref](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-ref) + * `gitoxide-core` * **very early** * [git-repository](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-repository) * **idea** @@ -83,39 +84,18 @@ Follow linked crate name for detailed status. * [x] Generate and verify large commit graphs * [ ] Generate huge pack from a lot of loose objects -### Ideas for Examples - - * [ ] `gix tool open-remote` open the URL of the remote, possibly after applying known transformations to go from `ssh` to `https`. - * [ ] Open up SQL for git using [sqlite virtual tables](https://github.com/rusqlite/rusqlite/blob/master/tests/vtab.rs). Check out gitqlite - as well. What would an MVP look like? Maybe even something that could ship with gitoxide. - * [ ] A truly awesome history rewriter which makes it easy to understand what happened while avoiding all pitfalls. Think BFG, but more awesome, if that's possible. - * [ ] `git-tui` should learn a lot from [fossil-scm] regarding the presentation of data. Maybe [this](https://github.com/Lutetium-Vanadium/requestty/) can be used for prompts. - * [ ] Can markdown be used as database so issue-trackers along with meta-data could just be markdown files which are mostly human-editable? Could user interfaces - be meta-data aware and just hide the meta-data chunks which are now editable in the GUI itself? Doing this would make conflicts easier to resolve than an `sqlite` - database. - * ~~A git-backend for `sqlite` which should allow embedding sqlite databases into git repositories, which in turn can be used for bug-trackers, wikis or other - features, making for a fully distributed github like experience, maybe.~~ - -### Ideas for Spin-Offs - -* [ ] A system to integrate tightly with `git-lfs` to allow a multi-tier architecture so that assets can be stored in git and are accessible quickly from an intranet location - (for example by accessing the storage read-only over the network) while changes are pushed immediately by the server to other edge locations, like _the cloud_ or backups. Sparse checkouts along with explorer/finder integrations - make it convenient to only work on a small subset of files locally. Clones can contain all configuration somebody would need to work efficiently from their location, - and authentication for the git history as well as LFS resources make the system secure. One could imagine encryption support for untrusted locations in _the cloud_ - even though more research would have to be done to make it truly secure. -* [ ] A [syncthing] like client/server application. This is to demonstrate how lower-level crates can be combined into custom applications that use - only part of git's technology to achieve their very own thing. Watch out for big file support, multi-device cross-syncing, the possibility for - untrusted destinations using full-encryption, case-insensitive and sensitive filesystems, and extended file attributes as well as ignore files. - -[syncthing]: https://github.com/syncthing/syncthing -[fossil-scm]: https://www.fossil-scm.org - ### Cargo features Many crates use feature flags to allow tuning the compiled result based on your needs. Have a [look at the guide][cargo-features] for more information. [cargo-features]: https://github.com/Byron/gitoxide/blob/main/cargo-features.md#git-config +### Stability + +Our [stability guide] helps to judge how much churn can be expected when depending on crates in this workspace. + +[stability guide]: https://github.com/Byron/gitoxide/blob/main/STABILITY.md + ## Installation ### Download a Binary Release @@ -208,7 +188,7 @@ Project non-goals can change over time as we learn more, and they can be challen long running operations. * When connecting or streaming over TCP connections, especially when receiving on the server, async seems like a must though, but behind a feature flag. - + ## Contributions If what you have seen so far sparked your interest to contribute, then let us say: We are happy to have you and help you to get started. @@ -218,6 +198,9 @@ We recommend running `make tests check-size` during the development process to a A backlog for work ready to be picked up is [available in the Project's Kanban board][project-board], which contains instructions on how to pick a task. If it's empty or you have other questions, feel free to [start a discussion][discussions] or reach out to @Byron [privately][keybase]. +For additional details, also take a look at the [collaboration guide]. + +[collaboration guide]: https://github.com/Byron/gitoxide/blob/main/COLLABORATING.md [project-board]: https://github.com/Byron/gitoxide/projects [discussions]: https://github.com/Byron/gitoxide/discussions [keybase]: https://keybase.io/byronbates @@ -234,7 +217,34 @@ Provide a CLI to for the most basic user journey: * [ ] add a remote * [ ] push * [ ] create (thin) pack - + +### Ideas for Examples + +* [ ] `gix tool open-remote` open the URL of the remote, possibly after applying known transformations to go from `ssh` to `https`. +* [ ] Open up SQL for git using [sqlite virtual tables](https://github.com/rusqlite/rusqlite/blob/master/tests/vtab.rs). Check out gitqlite + as well. What would an MVP look like? Maybe even something that could ship with gitoxide. +* [ ] A truly awesome history rewriter which makes it easy to understand what happened while avoiding all pitfalls. Think BFG, but more awesome, if that's possible. +* [ ] `git-tui` should learn a lot from [fossil-scm] regarding the presentation of data. Maybe [this](https://github.com/Lutetium-Vanadium/requestty/) can be used for prompts. +* [ ] Can markdown be used as database so issue-trackers along with meta-data could just be markdown files which are mostly human-editable? Could user interfaces + be meta-data aware and just hide the meta-data chunks which are now editable in the GUI itself? Doing this would make conflicts easier to resolve than an `sqlite` + database. + * ~~A git-backend for `sqlite` which should allow embedding sqlite databases into git repositories, which in turn can be used for bug-trackers, wikis or other + features, making for a fully distributed github like experience, maybe.~~ + +### Ideas for Spin-Offs + +* [ ] A system to integrate tightly with `git-lfs` to allow a multi-tier architecture so that assets can be stored in git and are accessible quickly from an intranet location + (for example by accessing the storage read-only over the network) while changes are pushed immediately by the server to other edge locations, like _the cloud_ or backups. Sparse checkouts along with explorer/finder integrations + make it convenient to only work on a small subset of files locally. Clones can contain all configuration somebody would need to work efficiently from their location, + and authentication for the git history as well as LFS resources make the system secure. One could imagine encryption support for untrusted locations in _the cloud_ + even though more research would have to be done to make it truly secure. +* [ ] A [syncthing] like client/server application. This is to demonstrate how lower-level crates can be combined into custom applications that use + only part of git's technology to achieve their very own thing. Watch out for big file support, multi-device cross-syncing, the possibility for + untrusted destinations using full-encryption, case-insensitive and sensitive filesystems, and extended file attributes as well as ignore files. + +[syncthing]: https://github.com/syncthing/syncthing +[fossil-scm]: https://www.fossil-scm.org + ## Shortcomings From e4c5b58ad935c907dfbd0d61049453dcb64a7e19 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 08:34:30 +0800 Subject: [PATCH 08/23] [stability #171] Don't provide access to less stable crates in `Respository` 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. --- Makefile | 5 +++++ cargo-smart-release/Cargo.toml | 2 +- experiments/diffing/Cargo.toml | 2 +- experiments/object-access/Cargo.toml | 2 +- experiments/traversal/Cargo.toml | 2 +- git-repository/src/lib.rs | 6 ++++++ 6 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c37761a1b0d..f1148bb024d 100644 --- a/Makefile +++ b/Makefile @@ -132,6 +132,11 @@ check: ## Build all code in suitable configurations && cargo check --no-default-features --features local \ && cargo check --no-default-features --features network \ && cargo check --no-default-features + cd cargo-smart-release && cargo check + cd experiments/object-access && cargo check + cd experiments/diffing && cargo check + cd experiments/traversal && cargo check + cd experiments/hash-owned-borrowed && cargo check unit-tests: ## run all unit tests cargo test --all diff --git a/cargo-smart-release/Cargo.toml b/cargo-smart-release/Cargo.toml index 7725ffc434b..a5e73dfba33 100644 --- a/cargo-smart-release/Cargo.toml +++ b/cargo-smart-release/Cargo.toml @@ -12,7 +12,7 @@ keywords = ["cargo"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -git-repository = { version = "^0.7", path = "../git-repository" } +git-repository = { version = "^0.7", path = "../git-repository", features = ["unstable"] } # TODO: don't use unstable features here anyhow = "1.0.42" argh = { version = "0.1.5", default-features = false } env_logger = { version = "0.9.0", default-features = false, features = ["humantime", "termcolor", "atty"] } diff --git a/experiments/diffing/Cargo.toml b/experiments/diffing/Cargo.toml index 19d307bcb98..d30614936d4 100644 --- a/experiments/diffing/Cargo.toml +++ b/experiments/diffing/Cargo.toml @@ -9,7 +9,7 @@ publish = false [dependencies] anyhow = "1" -git-repository = { version = "^0.7", path = "../../git-repository" } +git-repository = { version = "^0.7", path = "../../git-repository", features = ["unstable"] } git2 = "0.13" rayon = "1.5.0" memory-lru = "0.1.0" diff --git a/experiments/object-access/Cargo.toml b/experiments/object-access/Cargo.toml index 8d946ec526c..24ba3eb6e0c 100644 --- a/experiments/object-access/Cargo.toml +++ b/experiments/object-access/Cargo.toml @@ -9,6 +9,6 @@ publish = false [dependencies] anyhow = "1" -git-repository = { version = "^0.7", path = "../../git-repository" } +git-repository = { version = "^0.7", path = "../../git-repository", features = ["unstable"] } git2 = "0.13" rayon = "1.5.0" diff --git a/experiments/traversal/Cargo.toml b/experiments/traversal/Cargo.toml index f9e79cecab9..0310860afaa 100644 --- a/experiments/traversal/Cargo.toml +++ b/experiments/traversal/Cargo.toml @@ -9,7 +9,7 @@ publish = false [dependencies] anyhow = "1" -git-repository = { version = "^0.7", path = "../../git-repository" } +git-repository = { version = "^0.7", path = "../../git-repository", features = ["unstable"] } git2 = "0.13" rayon = "1.5.0" dashmap = "4.0.2" diff --git a/git-repository/src/lib.rs b/git-repository/src/lib.rs index 37fba4b3915..cfcd16b9694 100644 --- a/git-repository/src/lib.rs +++ b/git-repository/src/lib.rs @@ -136,9 +136,15 @@ pub mod repository; /// Namely, this is an object database, a reference database to point to objects. pub struct Repository { /// A store for references to point at objects + #[cfg(feature = "unstable")] pub refs: git_ref::file::Store, + #[cfg(not(feature = "unstable"))] + pub(crate) refs: git_ref::file::Store, /// A store for objects that contain data + #[cfg(feature = "unstable")] pub odb: git_odb::linked::Store, + #[cfg(not(feature = "unstable"))] + pub(crate) odb: git_odb::linked::Store, /// TODO: git-config should be here - it's read a lot but not written much in must applications, so shouldn't be in `State`. /// Probably it's best reload it on signal (in servers) or refresh it when it's known to have been changed similar to how /// packs are refreshed. This would be `git_config::fs::Config` when ready. From 6b1095a0dd7af0ed9e1bf528203529ba7a6f0d64 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 08:45:04 +0800 Subject: [PATCH 09/23] [stability #171] Further loosen MSRV constraints --- STABILITY.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/STABILITY.md b/STABILITY.md index d4ff631f263..f798c22e6b7 100644 --- a/STABILITY.md +++ b/STABILITY.md @@ -16,7 +16,11 @@ Please note that this guide isn't stable itself and may be adjusted to fit chang * _breaking change_ - A change in code that requires a `dependent crate` to adjust their code to fix compile errors. * _release_ - - A new version of a crate is published to crates.io + - A new version of a crate is published to crates.io +* _development version_ + - A crate version whose _major_ version is 0. +* _release version_ + - A crate version whose _major_ version is 1 or higher. ## Tiers @@ -98,7 +102,7 @@ Minor version updates for new features can be released when needed assuming ther ## The _Minimal Stable Rust Version_ (->MSRV) -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. +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. From 8f21e3d14658a6e73407b9cf8d9e6898c6a4c683 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 08:52:32 +0800 Subject: [PATCH 10/23] [stability #171] document git-repository cargo features --- cargo-features.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cargo-features.md b/cargo-features.md index 4b3b2879108..cc4adb2ebf7 100644 --- a/cargo-features.md +++ b/cargo-features.md @@ -177,6 +177,20 @@ be selected. details information about the error location will be collected. - Use it in applications which expect broken or invalid objects or for debugging purposes. Incorrectly formatted objects aren't at all common otherwise. + +### git-repository + +* **unstable** + - Re-export stability tier 2 crates for convenience and make `Repository` struct fields with types from these crates publicly accessible. + - Doing so is less stable than the stability tier 1 that `git-repository` is a member of. + +The following toggles can be used to reduce dependencies. + +* **local** + - Provide additional non-networked functionality +* **network** + - Provide networked functionality +* **one-stop-shop** = _local_ + _network_ ### Serialization Support From 9301bbf0b227448b983847a0c2689bd76f8154ae Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 10:18:39 +0800 Subject: [PATCH 11/23] =?UTF-8?q?[stability=20#171]=20Don't=20suggest=20pi?= =?UTF-8?q?nning=20of=20pre-release=20crates=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …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. --- STABILITY.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/STABILITY.md b/STABILITY.md index f798c22e6b7..ceba09ce773 100644 --- a/STABILITY.md +++ b/STABILITY.md @@ -70,9 +70,7 @@ The following schematic helps to visualize what follows. 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 requirements to avoid automatic updates of patch levels which -may be breaking if they also depend on other `plumbing crates`. +It's acceptable to let each breaking change be immediately followed by a minor version release. ### Tier 2: released plumbing crates @@ -96,7 +94,8 @@ The earliest release date is July 1st. Had the second breaking change happened i Intermediate pre-releases may be created at most every 4 weeks by appending `-alpha.X` where `X` is the sequential release number. These should help testing breaking changes or new features without forcing the use of `git` sources for dependencies in cargo manifests. Pre-release releases must pin all the pre-release -crates they depend on to prevent automatic upgrades. +crates they depend on to prevent automatic upgrades. Dependent external crates are advised to pin their `alpha` dependencies with `=` version requirements to avoid +automatic updates which may be breaking. Minor version updates for new features can be released when needed assuming there are no other breaking changes, updating the build identifiers for year and month accordingly. From c8f325bed5d644eded035109702098f9fed3fba3 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 10:53:37 +0800 Subject: [PATCH 12/23] =?UTF-8?q?[smart-release=20#171]=20Try=20to=20avoid?= =?UTF-8?q?=20unstable=20git-repository=20features=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …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. --- Cargo.lock | 1 + cargo-smart-release/Cargo.toml | 3 +- .../src/command/release/git.rs | 42 ++++++++----------- .../src/command/release/manifest.rs | 20 +++++---- .../src/command/release/mod.rs | 27 ++++++------ git-repository/src/easy/mod.rs | 1 + git-repository/src/easy/reference.rs | 4 +- git-repository/tests/reference/mod.rs | 12 ++---- 8 files changed, 50 insertions(+), 60 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1827dde7d99..bd2ee562b03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -357,6 +357,7 @@ dependencies = [ "cargo_toml", "crates-index", "env_logger", + "git-lock", "git-repository", "log", "semver 1.0.4", diff --git a/cargo-smart-release/Cargo.toml b/cargo-smart-release/Cargo.toml index a5e73dfba33..96b9d7fdda8 100644 --- a/cargo-smart-release/Cargo.toml +++ b/cargo-smart-release/Cargo.toml @@ -12,7 +12,8 @@ keywords = ["cargo"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -git-repository = { version = "^0.7", path = "../git-repository", features = ["unstable"] } # TODO: don't use unstable features here +git-repository = { version = "^0.7", path = "../git-repository", features = ["unstable"] } # TODO: don't use unstable, but reference transactions leak +git-lock = { version = "^0.3.2", path = "../git-lock" } anyhow = "1.0.42" argh = { version = "0.1.5", default-features = false } env_logger = { version = "0.9.0", default-features = false, features = ["humantime", "termcolor", "atty"] } diff --git a/cargo-smart-release/src/command/release/git.rs b/cargo-smart-release/src/command/release/git.rs index 1de1427c44b..0e8407a3625 100644 --- a/cargo-smart-release/src/command/release/git.rs +++ b/cargo-smart-release/src/command/release/git.rs @@ -6,16 +6,10 @@ use cargo_metadata::{ camino::{Utf8Component, Utf8Path}, Package, }; -use git_repository::{ - easy::object, - hash::ObjectId, - lock, - prelude::ReferenceAccessExt, - refs::{self, file::loose::reference::peel}, -}; +use git_repository::easy::object; -use super::{Context, Options}; -use crate::command::release_impl::{tag_name_for, utils::will}; +use super::{tag_name_for, utils::will, Context, Oid, Options}; +use git_repository::{prelude::ReferenceAccessExt, refs}; fn is_top_level_package(manifest_path: &Utf8Path, shared: &git_repository::Easy) -> bool { manifest_path @@ -53,8 +47,8 @@ pub(in crate::command::release_impl) fn has_changed_since_last_release( .strip_prefix(&ctx.root) .expect("workspace members are releative to the root directory"); - let current_commit = ctx.git_easy.find_reference("HEAD")?.peel_to_object_in_place()?; - let released_target = tag_ref.peel_to_object_in_place()?; + let current_commit = ctx.git_easy.find_reference("HEAD")?.peel_to_oid_in_place()?; + let released_target = tag_ref.peel_to_oid_in_place()?; if repo_relative_crate_dir.as_os_str().is_empty() { Ok(current_commit != released_target) @@ -116,7 +110,7 @@ pub(in crate::command::release_impl) fn commit_changes( dry_run: bool, empty_commit_possible: bool, ctx: &Context, -) -> anyhow::Result { +) -> anyhow::Result>> { // TODO: replace with gitoxide one day let mut cmd = Command::new("git"); cmd.arg("commit").arg("-am").arg(message.as_ref()); @@ -127,25 +121,20 @@ pub(in crate::command::release_impl) fn commit_changes( log::info!("{} run {:?}", will(dry_run), cmd); } if dry_run { - return Ok(ObjectId::null_sha1()); + return Ok(None); } if !cmd.status()?.success() { bail!("Failed to commit changed manifests"); } - let repo = &ctx.git_easy.repo; - Ok(repo - .refs - .loose_find_existing("HEAD")? - .peel_to_id_in_place(&repo.refs, ctx.packed_refs.as_ref(), peel::none)? - .to_owned()) + Ok(Some(ctx.git_easy.find_reference("HEAD")?.peel_to_oid_in_place()?)) } -pub(in crate::command::release_impl) fn create_version_tag( +pub(in crate::command::release_impl) fn create_version_tag<'repo>( publishee: &Package, new_version: &str, - commit_id: ObjectId, - ctx: &Context, + commit_id: Option>, + ctx: &'repo Context, Options { verbose, dry_run, @@ -167,9 +156,12 @@ pub(in crate::command::release_impl) fn create_version_tag( } Ok(Some(format!("refs/tags/{}", tag_name).try_into()?)) } else { - let edits = ctx - .git_easy - .tag(tag_name, commit_id, lock::acquire::Fail::Immediately, false)?; + let edits = ctx.git_easy.tag( + tag_name, + commit_id.expect("set in --execute mode"), + git_lock::acquire::Fail::Immediately, + false, + )?; assert_eq!(edits.len(), 1, "We create only one tag and there is no expansion"); let tag = edits.into_iter().next().expect("the promised tag"); log::info!("Created tag {}", tag.name.as_bstr()); diff --git a/cargo-smart-release/src/command/release/manifest.rs b/cargo-smart-release/src/command/release/manifest.rs index 6ce03d7886b..b6e9755f626 100644 --- a/cargo-smart-release/src/command/release/manifest.rs +++ b/cargo-smart-release/src/command/release/manifest.rs @@ -2,25 +2,27 @@ use std::{collections::BTreeMap, str::FromStr}; use anyhow::bail; use cargo_metadata::{Metadata, Package}; -use git_repository::{hash::ObjectId, lock}; use semver::{Op, Version, VersionReq}; use super::{ cargo, git, utils::{names_and_versions, package_by_id, package_eq_dependency, will}, - Context, Options, + Context, Oid, Options, }; -pub(in crate::command::release_impl) fn edit_version_and_fixup_dependent_crates( +pub(in crate::command::release_impl) fn edit_version_and_fixup_dependent_crates<'repo>( meta: &Metadata, publishees: &[(&Package, String)], Options { verbose, dry_run, .. }: Options, - ctx: &Context, -) -> anyhow::Result { + ctx: &'repo Context, +) -> anyhow::Result>> { let mut locks_by_manifest_path = BTreeMap::new(); for (publishee, _) in publishees { - let lock = - lock::File::acquire_to_update_resource(&publishee.manifest_path, lock::acquire::Fail::Immediately, None)?; + let lock = git_lock::File::acquire_to_update_resource( + &publishee.manifest_path, + git_lock::acquire::Fail::Immediately, + None, + )?; locks_by_manifest_path.insert(&publishee.manifest_path, lock); } let mut packages_to_fix = Vec::new(); @@ -39,9 +41,9 @@ pub(in crate::command::release_impl) fn edit_version_and_fixup_dependent_crates( if locks_by_manifest_path.contains_key(&package_to_fix.manifest_path) { continue; } - let lock = lock::File::acquire_to_update_resource( + let lock = git_lock::File::acquire_to_update_resource( &package_to_fix.manifest_path, - lock::acquire::Fail::Immediately, + git_lock::acquire::Fail::Immediately, None, )?; locks_by_manifest_path.insert(&package_to_fix.manifest_path, lock); diff --git a/cargo-smart-release/src/command/release/mod.rs b/cargo-smart-release/src/command/release/mod.rs index bc2f902feb1..19253ebb2da 100644 --- a/cargo-smart-release/src/command/release/mod.rs +++ b/cargo-smart-release/src/command/release/mod.rs @@ -2,13 +2,11 @@ use std::collections::BTreeSet; use anyhow::bail; use cargo_metadata::{camino::Utf8PathBuf, Dependency, DependencyKind, Metadata, Package, Version}; -use git_repository::refs::packed; use crate::command::release::Options; mod utils; use crates_index::Index; -use git_repository::hash::ObjectId; use utils::{ is_dependency_with_version_requirement, is_workspace_member, names_and_versions, package_by_id, package_by_name, package_eq_dependency, package_for_dependency, tag_name_for, will, workspace_package_by_id, @@ -18,12 +16,13 @@ mod cargo; mod git; mod manifest; +type Oid<'repo> = git_repository::easy::Oid<'repo, git_repository::Easy>; + pub(in crate::command::release_impl) struct Context { root: Utf8PathBuf, meta: Metadata, git_easy: git_repository::Easy, - packed_refs: Option, - index: Index, + crates_index: Index, crate_names: Vec, bump: String, bump_dependencies: String, @@ -34,14 +33,12 @@ impl Context { let meta = cargo_metadata::MetadataCommand::new().exec()?; let root = meta.workspace_root.clone(); let repo = git_repository::discover(&root)?; - let packed_refs = repo.refs.packed_buffer()?; let index = Index::new_cargo_default(); Ok(Context { root, git_easy: repo.into(), meta, - packed_refs, - index, + crates_index: index, crate_names, bump, bump_dependencies, @@ -57,14 +54,14 @@ pub fn release(options: Options, crates: Vec, bump: String, bump_depende } let mut ctx = Context::new(crates, bump, bump_dependencies)?; if options.update_crates_index { - log::info!("Updating crates-io index at '{}'", ctx.index.path().display()); - ctx.index.update()?; + log::info!("Updating crates-io index at '{}'", ctx.crates_index.path().display()); + ctx.crates_index.update()?; } else if !options.no_bump_on_demand { log::warn!( "Consider running with --update-crates-index to assure bumping on demand uses the latest information" ); } - if !ctx.index.exists() { + if !ctx.crates_index.exists() { log::warn!("Crates.io index doesn't exist. Consider using --update-crates-index to help determining if release versions are published already"); } @@ -172,7 +169,7 @@ fn perforrm_multi_version_release( .collect(); cargo::publish_crate(publishee, &unpublished_crates, options)?; - if let Some(tag_name) = git::create_version_tag(publishee, &new_version, commit_id, ctx, options)? { + if let Some(tag_name) = git::create_version_tag(publishee, &new_version, commit_id.clone(), ctx, options)? { tag_names.push(tag_name); }; } @@ -447,12 +444,12 @@ fn select_publishee_bump_spec<'a>(name: &String, ctx: &'a Context) -> &'a str { } } -fn perform_single_release( +fn perform_single_release<'repo>( meta: &Metadata, publishee: &Package, options: Options, - ctx: &Context, -) -> anyhow::Result<(String, ObjectId)> { + ctx: &'repo Context, +) -> anyhow::Result<(String, Option>)> { let bump_spec = select_publishee_bump_spec(&publishee.name, ctx); let new_version = bump_to_valid_version(publishee, bump_spec, ctx, options.no_bump_on_demand)?; log::info!( @@ -481,7 +478,7 @@ fn bump_to_valid_version( no_bump_on_demand: bool, ) -> anyhow::Result { let bump_on_demand = !no_bump_on_demand; - match ctx.index.crate_(&publishee.name) { + match ctx.crates_index.crate_(&publishee.name) { Some(existing_release) => { let existing_version = semver::Version::parse(existing_release.latest_version().version())?; if existing_version >= new_version { diff --git a/git-repository/src/easy/mod.rs b/git-repository/src/easy/mod.rs index 4a5ca3c98c1..5253d3e0922 100644 --- a/git-repository/src/easy/mod.rs +++ b/git-repository/src/easy/mod.rs @@ -35,6 +35,7 @@ pub mod reference; pub mod state; /// An [ObjectId] with access to a repository. +#[derive(Eq, Hash, Ord, PartialOrd, Clone, Copy)] pub struct Oid<'r, A> { id: ObjectId, access: &'r A, diff --git a/git-repository/src/easy/reference.rs b/git-repository/src/easy/reference.rs index 1a00324e9a7..46a0e848907 100644 --- a/git-repository/src/easy/reference.rs +++ b/git-repository/src/easy/reference.rs @@ -54,7 +54,7 @@ pub mod edit { } } -pub mod peel_to_id_in_place { +pub mod peel_to_oid_in_place { use quick_error::quick_error; use crate::easy; @@ -122,7 +122,7 @@ where .borrow() } - pub fn peel_to_object_in_place(&mut self) -> Result, peel_to_id_in_place::Error> { + pub fn peel_to_oid_in_place(&mut self) -> Result, peel_to_oid_in_place::Error> { let repo = self.access.repo()?; match self.backing.take().expect("a ref must be set") { Backing::LooseFile(mut r) => { diff --git a/git-repository/tests/reference/mod.rs b/git-repository/tests/reference/mod.rs index 0508f3c7519..1917777b028 100644 --- a/git-repository/tests/reference/mod.rs +++ b/git-repository/tests/reference/mod.rs @@ -23,27 +23,23 @@ mod find { "it points to a tag object" ); - let object = packed_tag_ref.peel_to_object_in_place().unwrap(); + let object = packed_tag_ref.peel_to_oid_in_place().unwrap(); let the_commit = hex_to_id("134385f6d781b7e97062102c6a483440bfda2a03"); assert_eq!(object, the_commit, "it is assumed to be fully peeled"); assert_eq!( object, - packed_tag_ref.peel_to_object_in_place().unwrap(), + packed_tag_ref.peel_to_oid_in_place().unwrap(), "peeling again yields the same object" ); let mut symbolic_ref = repo.find_reference("multi-link-target1").unwrap(); assert_eq!(symbolic_ref.name(), "refs/heads/multi-link-target1".try_into().unwrap()); - assert_eq!(symbolic_ref.peel_to_object_in_place().unwrap(), the_commit); + assert_eq!(symbolic_ref.peel_to_oid_in_place().unwrap(), the_commit); assert_eq!( symbolic_ref.name(), "refs/remotes/origin/multi-link-target3".try_into().unwrap(), "it follows symbolic refs, too" ); - assert_eq!( - symbolic_ref.peel_to_object_in_place().unwrap(), - the_commit, - "idempotency" - ); + assert_eq!(symbolic_ref.peel_to_oid_in_place().unwrap(), the_commit, "idempotency"); } } From 8819bdeb96b5c23baf3b47df990aa33b04dcd174 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 11:21:30 +0800 Subject: [PATCH 13/23] =?UTF-8?q?[stability=20#171]=20Add=20the=20concept?= =?UTF-8?q?=20of=20Foundation=20Crates=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …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. --- STABILITY.md | 20 ++++++++++++++++---- etc/crate-structure.monopic | Bin 2786 -> 3344 bytes 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/STABILITY.md b/STABILITY.md index ceba09ce773..83bb4222f4d 100644 --- a/STABILITY.md +++ b/STABILITY.md @@ -47,12 +47,22 @@ The following schematic helps to visualize what follows. ║ git-repository──────────────────────┐ ║ ║ │ application crate │ ║ ║ └───────────────────────────────────┘ ║ - ║ │ ║ + ║ │ │ ║ + ║ ▼ ║ + ║ Foundation Crates─────────────┐ │ ║ + ║ │┌──────────┐ ┌──────────────┐│ ║ + ║ ││ git-hash │ │ git-ref-base ││ │ ║ + ║ │└──────────┘ └──────────────┘│ ║ + ║ │ ┌─────────────────┐ │ │ ║ + ║ │ │ git-config-base │ │ ║ + ║ │ └─────────────────┘ │ │ ║ + ║ └─────────────────────────────┘ ║ + ║ │ ║ ╚═════════════════════════════════════════════╝ - │ - Stability Tier 2 ─────────────────────────────┐ + ─ ─ ─ ─ ─ ─ ─ ┘ + Stability Tier 2 ──────┼──────────────────────┐ │ ▼ │ - │ plumbing crates─────────────────────┐ │ + │ Plumbing Crates─────────────────────┐ │ │ │ ┌───────────┐ ┌───────────┐ │ │ │ │ │ git-odb │ │ git-ref │ │ │ │ │ └───────────┘ └───────────┘ │ │ @@ -97,6 +107,8 @@ breaking changes or new features without forcing the use of `git` sources for de crates they depend on to prevent automatic upgrades. Dependent external crates are advised to pin their `alpha` dependencies with `=` version requirements to avoid automatic updates which may be breaking. +Once breaking changes are known to be planned, deprecation warnings should be provided in intermediate pre-releases. + Minor version updates for new features can be released when needed assuming there are no other breaking changes, updating the build identifiers for year and month accordingly. ## The _Minimal Stable Rust Version_ (->MSRV) diff --git a/etc/crate-structure.monopic b/etc/crate-structure.monopic index 7e111357f1e4224d695f45cc4516ad440bba246f..7b3cfb31a428c0169386c69f1d12476f1f2f4ee7 100644 GIT binary patch literal 3344 zcmV+r4e#>*O;1iwP)S1pABz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=20#171]=20Simply=20commit=20on?= =?UTF-8?q?=20git-ref/git-config=20stability=20tier=201=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …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. --- STABILITY.md | 87 ++++++++++++++++++------------------ etc/crate-structure.monopic | Bin 3344 -> 3413 bytes gitoxide-core/Cargo.toml | 2 +- 3 files changed, 45 insertions(+), 44 deletions(-) diff --git a/STABILITY.md b/STABILITY.md index 83bb4222f4d..3f659ab63c0 100644 --- a/STABILITY.md +++ b/STABILITY.md @@ -31,50 +31,51 @@ our [collaboration guide]. The following schematic helps to visualize what follows. ``` - Release Software v1.X - Stability Tier 1 ═════════════════════════════╗ - ║ ║ - ║ gixp─────────────┐ gix──────────────┐ ║ - ║ │ plumbing app │ │ porcelain app │ ║ - ║ └────────────────┘ └────────────────┘ ║ - ║ │ │ ║ - ║ ▼ ▼ ║ - ║ gitoxide-core───────────────────────┐ ║ - ║ │ application functionality │ ║ - ║ └───────────────────────────────────┘ ║ - ║ │ ║ - ║ ▼ ║ - ║ git-repository──────────────────────┐ ║ - ║ │ application crate │ ║ - ║ └───────────────────────────────────┘ ║ - ║ │ │ ║ - ║ ▼ ║ - ║ Foundation Crates─────────────┐ │ ║ - ║ │┌──────────┐ ┌──────────────┐│ ║ - ║ ││ git-hash │ │ git-ref-base ││ │ ║ - ║ │└──────────┘ └──────────────┘│ ║ - ║ │ ┌─────────────────┐ │ │ ║ - ║ │ │ git-config-base │ │ ║ - ║ │ └─────────────────┘ │ │ ║ - ║ └─────────────────────────────┘ ║ - ║ │ ║ - ╚═════════════════════════════════════════════╝ - ─ ─ ─ ─ ─ ─ ─ ┘ - Stability Tier 2 ──────┼──────────────────────┐ - │ ▼ │ - │ Plumbing Crates─────────────────────┐ │ - │ │ ┌───────────┐ ┌───────────┐ │ │ - │ │ │ git-odb │ │ git-ref │ │ │ - │ │ └───────────┘ └───────────┘ │ │ - │ │ ┌───────────┐ ┌───────────┐ │ │ - │ │ │git-config │ │ git-pack │ │ │ - │ │ └───────────┘ └───────────┘ │ │ - │ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ │ │ - │ │ …many more… │ │ - │ │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ │ - │ └───────────────────────────────────┘ │ + Release Software v1.X + Stability Tier 1 ═════════════════════════════╗ + ║ ║ + ║ gixp─────────────┐ gix──────────────┐ ║ + ║ │ plumbing app │ │ porcelain app │ ║ + ║ └────────────────┘ └────────────────┘ ║ + ║ │ │ ║ + ║ ▼ ▼ ║ + ║ gitoxide-core───────────────────────┐ ║ + ║ │ application functionality │ ║ + ║ └───────────────────────────────────┘ ║ + ║ │ ║ + ║ ▼ ║ + ║ git-repository──────────────────────┐ ║ + ║ │ application crate │─ ─ ╬ ─ + ║ └───────────────────────────────────┘ ║ │ + ║ │ ║ + ║ ▼ ║ │ + ║ Foundation Crates───────────────────┐ ║ + ║ │ ┌─────────────┐ ┌─────────────┐ │ ║ │ + ║ │ │ git-hash │ │ git-actor │ │ ║ + ║ │ └─────────────┘ └─────────────┘ │ ║ │ + ║ │ ┌─────────────┐ ┌─────────────┐ │ ║ + ║ │ │ git-ref │ │ git-config │ │ ║ │ + ║ │ └─────────────┘ └─────────────┘ │ ║ + ║ └───────────────────────────────────┘ ║ │ + ║ ║ + ╚═════════════════════════════════════════════╝ │ + + Stability Tier 2 ─────────────────────────────┐ │ + │ │ + │ Plumbing Crates─────────────────────┐ │ │ + │ │ ┌─────────────┐ │ │ + │ │ │ git-odb │ │ │ │ + │ │ └─────────────┘ │ │ + │ │ ┌─────────────┐ │ │ │ + │ │ │ git-diff │ │◀ ─ ┼ ─ + │ │ └─────────────┘ │ │ + │ │ ┌─────────────┬ ─ ─ ─ ─ ─ ─ ─ ─ ┐ │ │ + │ │ │git-traverse │y more… │ │ + │ │ └─────────────┴ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ │ + │ └───────────────────────────────────┘ │ + │ │ └─────────────────────────────────────────────┘ - ``` +``` ### Tier 3: pre-release crates diff --git a/etc/crate-structure.monopic b/etc/crate-structure.monopic index 7b3cfb31a428c0169386c69f1d12476f1f2f4ee7..5efda03f59350a1574aeaa1a0c154335748df991 100644 GIT binary patch literal 3413 zcmV-b4XX10O;1iwP)S1pABzY8000000u$|BOK;=475*!M*3JbFDZXZVfxGIW=yXw_ z9T(;wDfQa(gVa^#5~rsc7-h%GDDF&~GA-+A(nD8Kt>x+r$h zr$6-NEl8#>m-%A8P4A;m_GUDTmf3cf7SSg(i?-^4`BT2jiY(tmpFqx{;`>uN&z9-~ zo<;6o^ZRwOQk3C!X2{_Fq*+JO6oR!Hq|~%`-_rES5Xv@+xpvz8XvZx^|J zc9F01ZS*O|T!2JKs9VW8TWucGO<@Q;=3i6$!T-`WTRr&C*)pBq<=bVds1)1hbQYzX z}mYHf)q$ZrH$tjYRX|ryIy89>f?Hdx+ zctOpjVuiok*(5Y7S%NTs#iK8(vuU!NZ}K9sjDXu1VfVbfPZp_W!TH{txqh{Dd6%v< zJE$j?2ODFWuzS9Uo`P{bVU# zz29n?l57?a`L;d^dcBm5F+VxK+uC1k+|&cEZ|+IEwk9|)-A3% zJnP1o*`2Z4(fp4wTkHD7w3R9`e(slQY&YAs{*ZlQ-y{oRzGpUmGI zu^N$?{*BnYQuE5pD>tvgyh`&5$i9Jn!}iTS50(IE3SLsjG}I0d4!?6048H@Gy=l{~ zv}t^ZO#$^_Q`E+$y#H|H&h6&!(yj=BCX{LJh^S&X>7WK!U=@JV1P#}93y^|vF(JV? zjrD>^5*>g@BIZmIfldvP1i3_rq-Kvyf{?V5tp}tlOcJ6AllY9D9w!+dFc-1AaL7qG z`*m*upn#;TyK_4O{qzEdaz80b)x9TPoO6A(jfUREVWQ zNFDY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jCgd zp)s}zopNnV+)C(NW(+%J*Z>gDEd_8W9Rv0YD*@~b-WwdQR8ObGa&~Q-uhBpM-fO6W z$*v(t&p1L_15EI)=FJEp=YD5)zcIVtmz_H1N#(f_=5<@m*w7uQ%VehJlk44-4K4tC0og~;&Dm-^;BD2?y1S%(Z{`(=SbR3r(Qnkf41vwQX~ ae6z!^7t6Qki&8b;-u@41HVhmho&W%x|8O(_ diff --git a/gitoxide-core/Cargo.toml b/gitoxide-core/Cargo.toml index 24334beece0..0accbdc27e8 100644 --- a/gitoxide-core/Cargo.toml +++ b/gitoxide-core/Cargo.toml @@ -27,7 +27,7 @@ all-features = true [dependencies] # deselect everything else (like "performance") as this should be controllable by the parent application. -git-repository = { version = "^0.7.0", path = "../git-repository", default-features = false, features = ["local", "unstable"]} +git-repository = { version = "^0.7.0", path = "../git-repository", default-features = false, features = ["local", "unstable"]} # TODO: eventually 'unstable' shouldn't be needed anymore git-protocol-for-configuration-only = { package = "git-protocol", version ="^0.9.0", path = "../git-protocol", optional = true } git-commitgraph = { version = "^0.4.0", path = "../git-commitgraph" } git-config = { version = "^0.1.0", path = "../git-config" } From 999e81335034f3505552740befbced4680870297 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 12:10:14 +0800 Subject: [PATCH 15/23] [stability #171] fix schematic --- STABILITY.md | 25 ++++++++++++------------- etc/crate-structure.monopic | Bin 3413 -> 3372 bytes 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/STABILITY.md b/STABILITY.md index 3f659ab63c0..fd3e2b4b779 100644 --- a/STABILITY.md +++ b/STABILITY.md @@ -59,19 +59,18 @@ The following schematic helps to visualize what follows. ║ └───────────────────────────────────┘ ║ │ ║ ║ ╚═════════════════════════════════════════════╝ │ - - Stability Tier 2 ─────────────────────────────┐ │ - │ │ - │ Plumbing Crates─────────────────────┐ │ │ - │ │ ┌─────────────┐ │ │ - │ │ │ git-odb │ │ │ │ - │ │ └─────────────┘ │ │ - │ │ ┌─────────────┐ │ │ │ - │ │ │ git-diff │ │◀ ─ ┼ ─ - │ │ └─────────────┘ │ │ - │ │ ┌─────────────┬ ─ ─ ─ ─ ─ ─ ─ ─ ┐ │ │ - │ │ │git-traverse │y more… │ │ - │ │ └─────────────┴ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ │ + Stability Tier 2 ─────────────────────────────┐ + │ │ │ + │ Plumbing Crates─────────────────────┐ │ + │ │ ┌─────────────┐ ┌─────────────┐ │ │ │ + │ │ │ git-odb │ │ git-diff │ │ │ + │ │ └─────────────┘ └─────────────┘ │ │ │ + │ │ ┌─────────────┐ ┌─────────────┐ │ │ + │ │ │git-traverse │ │ git-pack │ │◀─ ─│─ ┘ + │ │ └─────────────┘ └─────────────┘ │ │ + │ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ │ │ + │ │ …many more… │ │ + │ │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ │ │ └───────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────┘ diff --git a/etc/crate-structure.monopic b/etc/crate-structure.monopic index 5efda03f59350a1574aeaa1a0c154335748df991..768eb25b20d0fd060bf8deb85e4b8f85fa369b76 100644 GIT binary patch literal 3372 zcmV+{4b$@fO;1iwP)S1pABzY8000000u$|BOK;=475*!M*Ukl>BAM+4?y8HTw~GSp zz))=2QOB`TTbVoQAV7aje^`G>Nl`qO6*-YCAIoEBVMkV^BZ`mn_|AhrM%n#8lWD#g z-TiQfx70-LaF$Ic>tsH<^Cw5+(JWnWl6-VW#-p{pVe*u1(mc&pqdRKGqx|J5nWQuO zgN;YwUz7PVURcWXbzG2P-AP9+NlS{>YHEz5z4;?ao(e+g%95Nclewo`AvtbnfxkM> z{Jqm`nXN~6f+vZt|ztdSVxzE*G9+rw^_h zfUcu3{koVmbhvwwc(r(5#%t(GJJ06p_%WHptLa0wuJnTD_5o#MibqcF*Z!$HCzl(4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oU5*3_A5RG%WhD-GbsNBMU;OOq$$qyd&J-!-Ms59GXKR?gm{Flj`!05vX zd|W56K9I39P-y1Az*KHvj}Ls_3;4trefsOn*CxC!$Ij>^m|#{6jt*ujlhMZ!1x!>C z$2sqJteJo`c}~1{+^<3vx5hLu!Fj*lz~Jo*-n`&dd#^z=x0IP%$=+-0ownX*>s_|i zW83F!VAs%Hx^|Yb=JX9ZHkgya9tq|Tunl;IFlWbrxxGpxngd1;hK3MAPYoF`xzHec zfJq?3eqL8s>|jr$t%Zb`1HexV9k7!r*vS;^WD0iD3iIni4OouOoR#7Hlc5gE43{X% z=@BZspnzxOqJTbM0s#|nFY{zxW2$}i@gl)2b!U%c$;_0p+=H@q&?ZB(wahE8R{A5< zy~=qWaFkr8Ju-h$v~Cr?NGtIeEW_peeqVs%m&~!;gn=V-|Z9$$}_@?{_-#oS} zvP=x?swYUcUo~t3JwZBQ@6S^6N2&Rf)Z~=~aLUmEoNQ?R1TE*=L^A|}JC_p3J rb|nKIM9%^xLt+$4sS9yR@~hqSw9NV=`l=A@>+Amk^jj>&%%lJS$ug+f From 50154cd02fdd90930a1d7c5a4406d53c8067cb4b Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 12:16:29 +0800 Subject: [PATCH 16/23] [stability #171] git-ref is now ST1 and available through git-repository This means it can use its types freely. --- cargo-smart-release/Cargo.toml | 2 +- git-repository/src/lib.rs | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/cargo-smart-release/Cargo.toml b/cargo-smart-release/Cargo.toml index 96b9d7fdda8..e7db3f9ed68 100644 --- a/cargo-smart-release/Cargo.toml +++ b/cargo-smart-release/Cargo.toml @@ -12,7 +12,7 @@ keywords = ["cargo"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -git-repository = { version = "^0.7", path = "../git-repository", features = ["unstable"] } # TODO: don't use unstable, but reference transactions leak +git-repository = { version = "^0.7", path = "../git-repository" } git-lock = { version = "^0.3.2", path = "../git-lock" } anyhow = "1.0.42" argh = { version = "0.1.5", default-features = false } diff --git a/git-repository/src/lib.rs b/git-repository/src/lib.rs index cfcd16b9694..60e4753a78d 100644 --- a/git-repository/src/lib.rs +++ b/git-repository/src/lib.rs @@ -97,7 +97,6 @@ pub use git_object as objs; pub use git_odb as odb; #[cfg(all(feature = "unstable", feature = "git-protocol"))] pub use git_protocol as protocol; -#[cfg(feature = "unstable")] pub use git_ref as refs; #[cfg(feature = "unstable")] pub use git_tempfile as tempfile; @@ -136,10 +135,7 @@ pub mod repository; /// Namely, this is an object database, a reference database to point to objects. pub struct Repository { /// A store for references to point at objects - #[cfg(feature = "unstable")] pub refs: git_ref::file::Store, - #[cfg(not(feature = "unstable"))] - pub(crate) refs: git_ref::file::Store, /// A store for objects that contain data #[cfg(feature = "unstable")] pub odb: git_odb::linked::Store, From 04755323abb52f6091790d7caf2f5c1d7c1a685b Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 14:13:23 +0800 Subject: [PATCH 17/23] [stability #171] does this fix the issue with cargo doc? --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bd2ee562b03..30b39a517c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1610,7 +1610,7 @@ dependencies = [ [[package]] name = "lock_api" version = "0.4.4" -source = "git+https://github.com/Amanieu/parking_lot?branch=master#6bbf522dfe8c458909f8683b3f4b558b03e58b65" +source = "git+https://github.com/Amanieu/parking_lot?branch=master#c866ba80e4c38b0119823ab93f822f8e9dae2ce7" dependencies = [ "scopeguard", ] @@ -1860,7 +1860,7 @@ dependencies = [ [[package]] name = "parking_lot" version = "0.11.1" -source = "git+https://github.com/Amanieu/parking_lot?branch=master#6bbf522dfe8c458909f8683b3f4b558b03e58b65" +source = "git+https://github.com/Amanieu/parking_lot?branch=master#c866ba80e4c38b0119823ab93f822f8e9dae2ce7" dependencies = [ "instant", "lock_api 0.4.4 (git+https://github.com/Amanieu/parking_lot?branch=master)", @@ -1884,7 +1884,7 @@ dependencies = [ [[package]] name = "parking_lot_core" version = "0.8.3" -source = "git+https://github.com/Amanieu/parking_lot?branch=master#6bbf522dfe8c458909f8683b3f4b558b03e58b65" +source = "git+https://github.com/Amanieu/parking_lot?branch=master#c866ba80e4c38b0119823ab93f822f8e9dae2ce7" dependencies = [ "cfg-if", "instant", From 32caae1c32aae38bde59756e52848bef1cef049b Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 14:17:03 +0800 Subject: [PATCH 18/23] [stability #171] mark git-hash and git-actor as ST1 as well --- git-repository/src/lib.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/git-repository/src/lib.rs b/git-repository/src/lib.rs index 60e4753a78d..6ee64eac535 100644 --- a/git-repository/src/lib.rs +++ b/git-repository/src/lib.rs @@ -81,13 +81,11 @@ use std::{path::PathBuf, rc::Rc, sync::Arc}; // Re-exports to make this a potential one-stop shop crate avoiding people from having to reference various crates themselves. // This also means that their major version changes affect our major version, but that's alright as we directly expose their // APIs/instances anyway. -#[cfg(feature = "unstable")] pub use git_actor as actor; #[cfg(all(feature = "unstable", feature = "git-diff"))] pub use git_diff as diff; #[cfg(feature = "unstable")] pub use git_features::{parallel, progress, progress::Progress}; -#[cfg(feature = "unstable")] pub use git_hash as hash; #[cfg(feature = "unstable")] pub use git_lock as lock; From 01278fe4e28bf97ce6a2b8947198683646e361ee Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 14:25:51 +0800 Subject: [PATCH 19/23] [stability #171] Prime git-tempfile and git-lock for release --- LICENSE-APACHE | 2 +- LICENSE-MIT | 2 +- README.md | 6 ++++-- etc/check-package-size.sh | 4 ++-- git-lock/CHANGELOG.md | 3 +++ git-lock/Cargo.toml | 2 +- git-lock/LICENSE-APACHE | 1 + git-lock/LICENSE-MIT | 1 + git-protocol/Cargo.toml | 2 +- git-repository/Cargo.toml | 2 +- git-tempfile/CHANGELOG.md | 3 +++ git-tempfile/Cargo.toml | 2 +- git-tempfile/LICENSE-APACHE | 1 + git-tempfile/LICENSE-MIT | 1 + 14 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 git-lock/CHANGELOG.md create mode 120000 git-lock/LICENSE-APACHE create mode 120000 git-lock/LICENSE-MIT create mode 100644 git-tempfile/CHANGELOG.md create mode 120000 git-tempfile/LICENSE-APACHE create mode 120000 git-tempfile/LICENSE-MIT diff --git a/LICENSE-APACHE b/LICENSE-APACHE index f12440887db..a51f59a06c9 100644 --- a/LICENSE-APACHE +++ b/LICENSE-APACHE @@ -176,7 +176,7 @@ END OF TERMS AND CONDITIONS - Copyright 2020 Sebastian Thiel + Copyright 2018-2021 Sebastian Thiel, and [contributors](https://github.com/byron/gitoxide/contributors) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/LICENSE-MIT b/LICENSE-MIT index 73fc000ff58..b58e818f138 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018-2020 Sebastian Thiel, and [others](https://github.com/byron/gitoxide/contributors). +Copyright (c) 2018-2021 Sebastian Thiel, and [contributors](https://github.com/byron/gitoxide/contributors). Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index e264b8138ca..e136d6ba645 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,10 @@ Please see _'Development Status'_ for a listing of all crates and their capabili Follow linked crate name for detailed status. Please note that all crates follow [semver] as well as the [stability guide]. +* **primed for 1.0 releaes** + - [git-tempfile](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-tempfile) + - [git-lock](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-lock) + * **usable** * [git-actor](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-actor) * [git-hash](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-hash) @@ -66,8 +70,6 @@ Follow linked crate name for detailed status. Please note that all crates follow * [git-traverse](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-traverse) * [git-config](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-config) * [git-features](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-features) - * [git-tempfile](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-tempfile) - * [git-lock](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-lock) * [git-ref](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-ref) * `gitoxide-core` * **very early** diff --git a/etc/check-package-size.sh b/etc/check-package-size.sh index 2bc21c53703..d1f0c73e2e3 100755 --- a/etc/check-package-size.sh +++ b/etc/check-package-size.sh @@ -18,8 +18,8 @@ echo "in root: gitoxide CLI" indent cargo diet -n --package-size-limit 25KB (enter cargo-smart-release && indent cargo diet -n --package-size-limit 15KB) (enter git-actor && indent cargo diet -n --package-size-limit 5KB) -(enter git-tempfile && indent cargo diet -n --package-size-limit 12KB) -(enter git-lock && indent cargo diet -n --package-size-limit 7KB) +(enter git-tempfile && indent cargo diet -n --package-size-limit 20KB) +(enter git-lock && indent cargo diet -n --package-size-limit 15KB) (enter git-config && indent cargo diet -n --package-size-limit 55KB) (enter git-hash && indent cargo diet -n --package-size-limit 5KB) (enter git-features && indent cargo diet -n --package-size-limit 20KB) diff --git a/git-lock/CHANGELOG.md b/git-lock/CHANGELOG.md new file mode 100644 index 00000000000..e1be473d04e --- /dev/null +++ b/git-lock/CHANGELOG.md @@ -0,0 +1,3 @@ +### 1.0 (2021-MM-DD) + +- initial release diff --git a/git-lock/Cargo.toml b/git-lock/Cargo.toml index ec0f2708f8d..ba17df75471 100644 --- a/git-lock/Cargo.toml +++ b/git-lock/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT/Apache-2.0" description = "A git-style lock-file implementation" authors = ["Sebastian Thiel "] edition = "2018" -include = ["src/**/*"] +include = ["src/**/*", "LICENSE-*", "CHANGELOG.md"] [lib] doctest = false diff --git a/git-lock/LICENSE-APACHE b/git-lock/LICENSE-APACHE new file mode 120000 index 00000000000..965b606f331 --- /dev/null +++ b/git-lock/LICENSE-APACHE @@ -0,0 +1 @@ +../LICENSE-APACHE \ No newline at end of file diff --git a/git-lock/LICENSE-MIT b/git-lock/LICENSE-MIT new file mode 120000 index 00000000000..76219eb72e8 --- /dev/null +++ b/git-lock/LICENSE-MIT @@ -0,0 +1 @@ +../LICENSE-MIT \ No newline at end of file diff --git a/git-protocol/Cargo.toml b/git-protocol/Cargo.toml index 10f82a28a11..7445fe069aa 100644 --- a/git-protocol/Cargo.toml +++ b/git-protocol/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT/Apache-2.0" description = "A WIP crate of the gitoxide project for implementing git protocols" authors = ["Sebastian Thiel "] edition = "2018" -include = ["src/**/*"] +include = ["src/**/*", "CHANGELOG.md", "!**/tests/**/*"] [lib] doctest = false diff --git a/git-repository/Cargo.toml b/git-repository/Cargo.toml index 32946a5c8c7..992dee7c6a5 100644 --- a/git-repository/Cargo.toml +++ b/git-repository/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT/Apache-2.0" version = "0.7.2" authors = ["Sebastian Thiel "] edition = "2018" -include = ["src/**/*", "src/assets/**"] +include = ["src/**/*", "CHANGELOG.md"] [lib] doctest = false diff --git a/git-tempfile/CHANGELOG.md b/git-tempfile/CHANGELOG.md new file mode 100644 index 00000000000..e1be473d04e --- /dev/null +++ b/git-tempfile/CHANGELOG.md @@ -0,0 +1,3 @@ +### 1.0 (2021-MM-DD) + +- initial release diff --git a/git-tempfile/Cargo.toml b/git-tempfile/Cargo.toml index 456ee797865..352aadb2cc4 100644 --- a/git-tempfile/Cargo.toml +++ b/git-tempfile/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT/Apache-2.0" description = "A tempfile implementation with a global registry to assure cleanup" authors = ["Sebastian Thiel "] edition = "2018" -include = ["src/**/*"] +include = ["src/**/*", "LICENSE-*", "CHANGELOG.md"] [lib] doctest = false diff --git a/git-tempfile/LICENSE-APACHE b/git-tempfile/LICENSE-APACHE new file mode 120000 index 00000000000..965b606f331 --- /dev/null +++ b/git-tempfile/LICENSE-APACHE @@ -0,0 +1 @@ +../LICENSE-APACHE \ No newline at end of file diff --git a/git-tempfile/LICENSE-MIT b/git-tempfile/LICENSE-MIT new file mode 120000 index 00000000000..76219eb72e8 --- /dev/null +++ b/git-tempfile/LICENSE-MIT @@ -0,0 +1 @@ +../LICENSE-MIT \ No newline at end of file From 3a1cf4d441b53c880b5c887916302a493ad28b41 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 14:51:39 +0800 Subject: [PATCH 20/23] [stability #171] prepare git-lock and git-tempfile release --- README.md | 9 ++++++--- crate-status.md | 19 ++----------------- git-lock/CHANGELOG.md | 2 +- git-lock/Cargo.toml | 2 +- git-lock/README.md | 5 +++++ git-tempfile/CHANGELOG.md | 2 +- git-tempfile/Cargo.toml | 2 +- git-tempfile/README.md | 12 ++++++++++++ 8 files changed, 29 insertions(+), 24 deletions(-) create mode 100644 git-lock/README.md create mode 100644 git-tempfile/README.md diff --git a/README.md b/README.md index e136d6ba645..0e758dfbd48 100644 --- a/README.md +++ b/README.md @@ -50,10 +50,13 @@ Please see _'Development Status'_ for a listing of all crates and their capabili Follow linked crate name for detailed status. Please note that all crates follow [semver] as well as the [stability guide]. -* **primed for 1.0 releaes** - - [git-tempfile](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-tempfile) - - [git-lock](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-lock) +### Released +* **Stability Tier 2** + - [git-tempfile](https://github.com/Byron/gitoxide/blob/main/git-tempfile/README.md) + - [git-lock](https://github.com/Byron/gitoxide/blob/main/git-lock/README.md) + +### In Development/Pre-Release * **usable** * [git-actor](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-actor) * [git-hash](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-hash) diff --git a/crate-status.md b/crate-status.md index 4322815bad7..a1cc3d6e5ae 100644 --- a/crate-status.md +++ b/crate-status.md @@ -214,26 +214,11 @@ Check out the [performance discussion][git-traverse-performance] as well. ### git-tempfile -Use tempfiles to minimize the risk of resource leakage when preparing to overwrite or create a file with new content -in a signal-safe way, making the change atomic. - -Tempfiles can also be used as locks as only one tempfile can exist at a given path at a time. - -* [x] registered temporary files which are deleted automatically as the process terminates or on drop - * [x] write to temorary file and persist it under new name - * [x] close temporary files to convert them into a marker while saving system resources - * [x] mark paths with a closed temporary file -* [x] persist temporary files to prevent them from perishing. -* [x] signal-handler integration with `git-repository` to clean lockfiles before the process is aborted. -* [x] use a temporary file transparently due thanks to implementations of `std::io` traits +See its [README.md](https://github.com/Byron/gitoxide/blob/main/git-tempfile/README.md). ### git-lock -Use lock-files in the way git does with auto-cleanup being the most notable feature. - -* [ ] writable lock files that can be committed to atomically replace the resource they lock -* [ ] read-only markers that lock a resource without the intend to overwrite it -* [ ] auto-removal of the lockfiles and intermediate directories on drop or on signal +See its [README.md](https://github.com/Byron/gitoxide/blob/main/git-lock/README.md). ### git-config * [ ] read diff --git a/git-lock/CHANGELOG.md b/git-lock/CHANGELOG.md index e1be473d04e..5a01336df2d 100644 --- a/git-lock/CHANGELOG.md +++ b/git-lock/CHANGELOG.md @@ -1,3 +1,3 @@ -### 1.0 (2021-MM-DD) +### 1.0 (2021-08-25) - initial release diff --git a/git-lock/Cargo.toml b/git-lock/Cargo.toml index ba17df75471..478022b677e 100644 --- a/git-lock/Cargo.toml +++ b/git-lock/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT/Apache-2.0" description = "A git-style lock-file implementation" authors = ["Sebastian Thiel "] edition = "2018" -include = ["src/**/*", "LICENSE-*", "CHANGELOG.md"] +include = ["src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md"] [lib] doctest = false diff --git a/git-lock/README.md b/git-lock/README.md new file mode 100644 index 00000000000..436b918effc --- /dev/null +++ b/git-lock/README.md @@ -0,0 +1,5 @@ +Use lock-files in the way git does with auto-cleanup being the most notable feature. + +* [x] writable lock files that can be committed to atomically replace the resource they lock +* [x] read-only markers that lock a resource without the intend to overwrite it +* [x] auto-removal of the lockfiles and intermediate directories on drop or on signal diff --git a/git-tempfile/CHANGELOG.md b/git-tempfile/CHANGELOG.md index e1be473d04e..5a01336df2d 100644 --- a/git-tempfile/CHANGELOG.md +++ b/git-tempfile/CHANGELOG.md @@ -1,3 +1,3 @@ -### 1.0 (2021-MM-DD) +### 1.0 (2021-08-25) - initial release diff --git a/git-tempfile/Cargo.toml b/git-tempfile/Cargo.toml index 352aadb2cc4..ec947b25168 100644 --- a/git-tempfile/Cargo.toml +++ b/git-tempfile/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT/Apache-2.0" description = "A tempfile implementation with a global registry to assure cleanup" authors = ["Sebastian Thiel "] edition = "2018" -include = ["src/**/*", "LICENSE-*", "CHANGELOG.md"] +include = ["src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md"] [lib] doctest = false diff --git a/git-tempfile/README.md b/git-tempfile/README.md new file mode 100644 index 00000000000..83a7cc64905 --- /dev/null +++ b/git-tempfile/README.md @@ -0,0 +1,12 @@ +Use tempfiles to minimize the risk of resource leakage when preparing to overwrite or create a file with new content +in a signal-safe way, making the change atomic. + +Tempfiles can also be used as locks as only one tempfile can exist at a given path at a time. + +* [x] registered temporary files which are deleted automatically as the process terminates or on drop + * [x] write to temorary file and persist it under new name + * [x] close temporary files to convert them into a marker while saving system resources + * [x] mark paths with a closed temporary file +* [x] persist temporary files to prevent them from perishing. +* [x] signal-handler integration with `git-repository` to clean lockfiles before the process is aborted. +* [x] use a temporary file transparently due thanks to implementations of `std::io` traits From 48a489b4247ed6feff222924bdcdb53ce45c6ce6 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 14:53:12 +0800 Subject: [PATCH 21/23] [smart-release #171] it's about time we get some tests --- git-repository/src/easy/ext/reference.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-repository/src/easy/ext/reference.rs b/git-repository/src/easy/ext/reference.rs index ed3277cdc2f..df9e06d6d57 100644 --- a/git-repository/src/easy/ext/reference.rs +++ b/git-repository/src/easy/ext/reference.rs @@ -35,7 +35,7 @@ pub trait ReferenceAccessExt: easy::Access + Sized { }, new: Target::Peeled(target.into()), }, - name: format!("tags/refs/{}", name.as_ref()).try_into()?, + name: format!("refs/tags/{}", name.as_ref()).try_into()?, deref: false, }), lock_mode, From 123853539dc30ddea2d822ab177ee09b191bdf1b Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 14:55:38 +0800 Subject: [PATCH 22/23] Release git-tempfile v1.0.0 --- Cargo.lock | 2 +- git-lock/Cargo.toml | 2 +- git-pack/Cargo.toml | 2 +- git-ref/Cargo.toml | 2 +- git-repository/Cargo.toml | 2 +- git-tempfile/Cargo.toml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 30b39a517c1..b6a10f09eb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1226,7 +1226,7 @@ dependencies = [ [[package]] name = "git-tempfile" -version = "0.6.1" +version = "1.0.0" dependencies = [ "dashmap", "libc", diff --git a/git-lock/Cargo.toml b/git-lock/Cargo.toml index 478022b677e..1b55d196d0b 100644 --- a/git-lock/Cargo.toml +++ b/git-lock/Cargo.toml @@ -16,7 +16,7 @@ test = true [dependencies] fastrand = "1.5.0" -git-tempfile = { version = "^0.6.0", path = "../git-tempfile" } +git-tempfile = { version ="^1.0.0", path = "../git-tempfile" } quick-error = "2.0.0" [dev-dependencies] diff --git a/git-pack/Cargo.toml b/git-pack/Cargo.toml index 3a8d201ba4c..d6c236f702e 100644 --- a/git-pack/Cargo.toml +++ b/git-pack/Cargo.toml @@ -37,7 +37,7 @@ git-hash = { version = "^0.5.0", path = "../git-hash" } git-object = { version ="0.12.0", path = "../git-object" } git-traverse = { version ="0.7.0", path = "../git-traverse" } git-diff = { version ="0.8.0", path = "../git-diff" } -git-tempfile = { version = "^0.6.0", path = "../git-tempfile" } +git-tempfile = { version ="^1.0.0", path = "../git-tempfile" } smallvec = "1.3.0" filebuffer = "0.4.0" diff --git a/git-ref/Cargo.toml b/git-ref/Cargo.toml index 995430d4862..b942d550475 100644 --- a/git-ref/Cargo.toml +++ b/git-ref/Cargo.toml @@ -30,7 +30,7 @@ git-object = { version ="0.12.0", path = "../git-object" } git-validate = { version = "^0.5.0", path = "../git-validate" } git-actor = { version ="0.3.1", path = "../git-actor" } git-lock = { version = "^0.3.0", path = "../git-lock" } -git-tempfile = { version = "^0.6.0", path = "../git-tempfile" } +git-tempfile = { version ="^1.0.0", path = "../git-tempfile" } quick-error = "2.0.0" bstr = { version = "0.2.13", default-features = false, features = ["std"] } diff --git a/git-repository/Cargo.toml b/git-repository/Cargo.toml index 992dee7c6a5..fd707fa2986 100644 --- a/git-repository/Cargo.toml +++ b/git-repository/Cargo.toml @@ -35,7 +35,7 @@ one-stop-shop = [ [dependencies] git-ref = { version ="^0.6.0", path = "../git-ref" } -git-tempfile = { version = "^0.6.0", path = "../git-tempfile" } +git-tempfile = { version ="^1.0.0", path = "../git-tempfile" } git-lock = { version = "^0.3.2", path = "../git-lock" } git-validate = { version = "^0.5.0", path = "../git-validate" } diff --git a/git-tempfile/Cargo.toml b/git-tempfile/Cargo.toml index ec947b25168..2fd2dddc739 100644 --- a/git-tempfile/Cargo.toml +++ b/git-tempfile/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "git-tempfile" -version = "0.6.1" +version = "1.0.0" repository = "https://github.com/Byron/gitoxide" license = "MIT/Apache-2.0" description = "A tempfile implementation with a global registry to assure cleanup" From f38f72c73f69775358d8b047de2e354364fcafc2 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Aug 2021 14:56:53 +0800 Subject: [PATCH 23/23] Release git-lock v1.0.0 --- Cargo.lock | 2 +- cargo-smart-release/Cargo.toml | 2 +- git-lock/Cargo.toml | 2 +- git-ref/Cargo.toml | 2 +- git-repository/Cargo.toml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b6a10f09eb2..cc4fcc365e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1069,7 +1069,7 @@ version = "0.0.0" [[package]] name = "git-lock" -version = "0.3.2" +version = "1.0.0" dependencies = [ "fastrand", "git-tempfile", diff --git a/cargo-smart-release/Cargo.toml b/cargo-smart-release/Cargo.toml index e7db3f9ed68..89fd6524bfa 100644 --- a/cargo-smart-release/Cargo.toml +++ b/cargo-smart-release/Cargo.toml @@ -13,7 +13,7 @@ keywords = ["cargo"] [dependencies] git-repository = { version = "^0.7", path = "../git-repository" } -git-lock = { version = "^0.3.2", path = "../git-lock" } +git-lock = { version ="^1.0.0", path = "../git-lock" } anyhow = "1.0.42" argh = { version = "0.1.5", default-features = false } env_logger = { version = "0.9.0", default-features = false, features = ["humantime", "termcolor", "atty"] } diff --git a/git-lock/Cargo.toml b/git-lock/Cargo.toml index 1b55d196d0b..81e85300bd3 100644 --- a/git-lock/Cargo.toml +++ b/git-lock/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "git-lock" -version = "0.3.2" +version = "1.0.0" repository = "https://github.com/Byron/gitoxide" license = "MIT/Apache-2.0" description = "A git-style lock-file implementation" diff --git a/git-ref/Cargo.toml b/git-ref/Cargo.toml index b942d550475..dfeef727835 100644 --- a/git-ref/Cargo.toml +++ b/git-ref/Cargo.toml @@ -29,7 +29,7 @@ git-hash = { version = "^0.5.0", path = "../git-hash" } git-object = { version ="0.12.0", path = "../git-object" } git-validate = { version = "^0.5.0", path = "../git-validate" } git-actor = { version ="0.3.1", path = "../git-actor" } -git-lock = { version = "^0.3.0", path = "../git-lock" } +git-lock = { version ="^1.0.0", path = "../git-lock" } git-tempfile = { version ="^1.0.0", path = "../git-tempfile" } quick-error = "2.0.0" diff --git a/git-repository/Cargo.toml b/git-repository/Cargo.toml index fd707fa2986..5996e7b430d 100644 --- a/git-repository/Cargo.toml +++ b/git-repository/Cargo.toml @@ -36,7 +36,7 @@ one-stop-shop = [ [dependencies] git-ref = { version ="^0.6.0", path = "../git-ref" } git-tempfile = { version ="^1.0.0", path = "../git-tempfile" } -git-lock = { version = "^0.3.2", path = "../git-lock" } +git-lock = { version ="^1.0.0", path = "../git-lock" } git-validate = { version = "^0.5.0", path = "../git-validate" } git-odb = { version ="0.20.0", path = "../git-odb" }