Skip to content

Commit 1d5da9e

Browse files
committed
Merge #63: Configurable API features
c475f48 api: git guard (Nick Johnson) 56683ad api: baseline config (Nick Johnson) 804f63d api: better git state switch (Nick Johnson) 0b1d49b api: Upgrade public-api to v0.50.2 for modern nightly support (Nick Johnson) 8e5eb11 api: Make FeatureConfig configurable via rbmt.toml (Nick Johnson) Pull request description: These changes make the `api` command more robust, been able to use it in the `rust-psbt` project as I explore different ways to break an exported API and see if this detects it. We might just have to drop these custom checks with cargo-semver-checks as discussed in #58, because this is quite the rabbit hole, but figure I'd give it the old college try and learn along the way. I think this new `rbmt.toml` config for the api command will be helpful no matter what. It also lets a user opt-in to the semver checking, they have to set a `baseline` in the package config. ```toml [api] # Additional feature combinations to test (beyond no-features and all-features). features = [ ["alloc"] ] # Optional: Git reference for semver compatibility checking. baseline = "v1.0.0" ``` ACKs for top commit: tcharding: utACK c475f48 Tree-SHA512: 913a7b170491375514a29443e3ffb886115c65ebae22c80cc8999163e222a56fbe5aac691bf1da0685f1c9f27f7c923e612090fdec978b13acac62623701eaad
2 parents ea360a1 + c475f48 commit 1d5da9e

File tree

9 files changed

+406
-454
lines changed

9 files changed

+406
-454
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Install Rust toolchains
1515
uses: actions-rust-lang/setup-rust-toolchain@v1
1616
with:
17-
toolchain: nightly,1.74.0,stable
17+
toolchain: nightly,1.85.0,stable
1818
components: clippy,rustfmt
1919

2020
- name: Install cargo-rbmt from current commit
@@ -36,7 +36,7 @@ jobs:
3636
run: cargo +nightly rbmt --lock-file existing test nightly
3737

3838
- name: Run tests with MSRV (existing lock)
39-
run: cargo +1.74.0 rbmt --lock-file existing test msrv
39+
run: cargo +1.85.0 rbmt --lock-file existing test msrv
4040

4141
- name: Run tests with stable (recent dependencies)
4242
run: cargo rbmt --lock-file recent test stable

Cargo-minimal.lock

Lines changed: 10 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,13 @@
11
# This file is automatically @generated by Cargo.
22
# It is not intended for manual editing.
3-
version = 3
4-
5-
[[package]]
6-
name = "anstream"
7-
version = "0.6.7"
8-
source = "registry+https://github.com/rust-lang/crates.io-index"
9-
checksum = "4cd2405b3ac1faab2990b74d728624cd9fd115651fcecc7c2d8daf01376275ba"
10-
dependencies = [
11-
"anstyle",
12-
"anstyle-parse",
13-
"anstyle-query",
14-
"anstyle-wincon",
15-
"colorchoice",
16-
"utf8parse",
17-
]
3+
version = 4
184

195
[[package]]
206
name = "anstyle"
217
version = "1.0.0"
228
source = "registry+https://github.com/rust-lang/crates.io-index"
239
checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d"
2410

25-
[[package]]
26-
name = "anstyle-parse"
27-
version = "0.2.0"
28-
source = "registry+https://github.com/rust-lang/crates.io-index"
29-
checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee"
30-
dependencies = [
31-
"utf8parse",
32-
]
33-
34-
[[package]]
35-
name = "anstyle-query"
36-
version = "1.0.0"
37-
source = "registry+https://github.com/rust-lang/crates.io-index"
38-
checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
39-
dependencies = [
40-
"windows-sys",
41-
]
42-
43-
[[package]]
44-
name = "anstyle-wincon"
45-
version = "3.0.1"
46-
source = "registry+https://github.com/rust-lang/crates.io-index"
47-
checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628"
48-
dependencies = [
49-
"anstyle",
50-
"windows-sys",
51-
]
52-
5311
[[package]]
5412
name = "cargo-rbmt"
5513
version = "0.1.0"
@@ -78,10 +36,8 @@ version = "4.5.0"
7836
source = "registry+https://github.com/rust-lang/crates.io-index"
7937
checksum = "458bf1f341769dfcf849846f65dffdf9146daa56bcd2a47cb4e1de9915567c99"
8038
dependencies = [
81-
"anstream",
8239
"anstyle",
8340
"clap_lex",
84-
"strsim",
8541
]
8642

8743
[[package]]
@@ -102,12 +58,6 @@ version = "0.7.0"
10258
source = "registry+https://github.com/rust-lang/crates.io-index"
10359
checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce"
10460

105-
[[package]]
106-
name = "colorchoice"
107-
version = "1.0.0"
108-
source = "registry+https://github.com/rust-lang/crates.io-index"
109-
checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
110-
11161
[[package]]
11262
name = "equivalent"
11363
version = "1.0.0"
@@ -165,9 +115,9 @@ dependencies = [
165115

166116
[[package]]
167117
name = "public-api"
168-
version = "0.47.0"
118+
version = "0.50.0"
169119
source = "registry+https://github.com/rust-lang/crates.io-index"
170-
checksum = "92f0a3ef1a7c5a2cf381b0b689c68089127d457be055fefb1291a7fa1b6983cc"
120+
checksum = "bb5d6a6896b49665a84f227c84d30d56faa526915a675261e9beb877c1b0444c"
171121
dependencies = [
172122
"hashbag",
173123
"rustdoc-types",
@@ -187,11 +137,12 @@ dependencies = [
187137

188138
[[package]]
189139
name = "rustdoc-types"
190-
version = "0.38.0"
140+
version = "0.55.0"
191141
source = "registry+https://github.com/rust-lang/crates.io-index"
192-
checksum = "77ecde53e08f3f1d7a67fb635914e053b85a024c73b920524acaa5c2d78482a6"
142+
checksum = "61f25a84ea78419de928cd82c3b2f76709a696a64a880486c567b4c4da8f2dda"
193143
dependencies = [
194144
"serde",
145+
"serde_derive",
195146
]
196147

197148
[[package]]
@@ -202,18 +153,18 @@ checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997"
202153

203154
[[package]]
204155
name = "serde"
205-
version = "1.0.179"
156+
version = "1.0.186"
206157
source = "registry+https://github.com/rust-lang/crates.io-index"
207-
checksum = "0a5bf42b8d227d4abf38a1ddb08602e229108a517cd4e5bb28f9c7eaafdce5c0"
158+
checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1"
208159
dependencies = [
209160
"serde_derive",
210161
]
211162

212163
[[package]]
213164
name = "serde_derive"
214-
version = "1.0.179"
165+
version = "1.0.186"
215166
source = "registry+https://github.com/rust-lang/crates.io-index"
216-
checksum = "741e124f5485c7e60c03b043f79f320bff3527f4bbf12cf3831750dc46a0ec2c"
167+
checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670"
217168
dependencies = [
218169
"proc-macro2",
219170
"quote",
@@ -240,12 +191,6 @@ dependencies = [
240191
"serde",
241192
]
242193

243-
[[package]]
244-
name = "strsim"
245-
version = "0.11.0"
246-
source = "registry+https://github.com/rust-lang/crates.io-index"
247-
checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01"
248-
249194
[[package]]
250195
name = "syn"
251196
version = "2.0.87"
@@ -317,78 +262,6 @@ version = "1.0.0"
317262
source = "registry+https://github.com/rust-lang/crates.io-index"
318263
checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee"
319264

320-
[[package]]
321-
name = "utf8parse"
322-
version = "0.2.1"
323-
source = "registry+https://github.com/rust-lang/crates.io-index"
324-
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
325-
326-
[[package]]
327-
name = "windows-sys"
328-
version = "0.48.0"
329-
source = "registry+https://github.com/rust-lang/crates.io-index"
330-
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
331-
dependencies = [
332-
"windows-targets",
333-
]
334-
335-
[[package]]
336-
name = "windows-targets"
337-
version = "0.48.0"
338-
source = "registry+https://github.com/rust-lang/crates.io-index"
339-
checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
340-
dependencies = [
341-
"windows_aarch64_gnullvm",
342-
"windows_aarch64_msvc",
343-
"windows_i686_gnu",
344-
"windows_i686_msvc",
345-
"windows_x86_64_gnu",
346-
"windows_x86_64_gnullvm",
347-
"windows_x86_64_msvc",
348-
]
349-
350-
[[package]]
351-
name = "windows_aarch64_gnullvm"
352-
version = "0.48.0"
353-
source = "registry+https://github.com/rust-lang/crates.io-index"
354-
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
355-
356-
[[package]]
357-
name = "windows_aarch64_msvc"
358-
version = "0.48.0"
359-
source = "registry+https://github.com/rust-lang/crates.io-index"
360-
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
361-
362-
[[package]]
363-
name = "windows_i686_gnu"
364-
version = "0.48.0"
365-
source = "registry+https://github.com/rust-lang/crates.io-index"
366-
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
367-
368-
[[package]]
369-
name = "windows_i686_msvc"
370-
version = "0.48.0"
371-
source = "registry+https://github.com/rust-lang/crates.io-index"
372-
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
373-
374-
[[package]]
375-
name = "windows_x86_64_gnu"
376-
version = "0.48.0"
377-
source = "registry+https://github.com/rust-lang/crates.io-index"
378-
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
379-
380-
[[package]]
381-
name = "windows_x86_64_gnullvm"
382-
version = "0.48.0"
383-
source = "registry+https://github.com/rust-lang/crates.io-index"
384-
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
385-
386-
[[package]]
387-
name = "windows_x86_64_msvc"
388-
version = "0.48.0"
389-
source = "registry+https://github.com/rust-lang/crates.io-index"
390-
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
391-
392265
[[package]]
393266
name = "winnow"
394267
version = "0.5.0"

0 commit comments

Comments
 (0)