Commit 32c0c8d
committed
Merge #43: Add API subcommand
d0abec0 cargo-rbmt: extend api command with baseline arg (Nick Johnson)
a105adc cargo-rbmt: add API command (Nick Johnson)
dfcf054 cargo-rbmt: refactor get_packages to return tuples (Nick Johnson)
Pull request description:
This is a little more complex than the other `rbmt` commands. Up to now, `rbmt` has just orchestrated `cargo` commands, no other tool dependencies. But this patch adds an `api` command which takes over [the exposed API checks](https://github.com/rust-bitcoin/rust-bitcoin/blob/a4d9d21d4fa0c10099e356cd401eac668c042eca/contrib/check-for-api-changes.sh) and uses an internal dependency.
The legacy scripts in rust-bitcoin use the `cargo-public-api` tool has a nice library crate, `public-api`. This patch uses the library crate under the hood for `rbmt`'s `api` command.
The `api` command has two modes which I think models mostly the usage in rust-bitcoin. The standard `cargo rbmt api` generates exposed API files for all packages. It can use the global `-p` flag to filter which packages. It checks to make sure the feature flags are additive and if anything has changed. The second mode is `cargo rbmt api --baseline $REF` which takes a git ref and does a comparison. It fails if there are any breaking changes.
ACKs for top commit:
tcharding:
ACK d0abec0
Tree-SHA512: 41a40828b63d890e3aedb7decd4277670350048db7eec27ac6d2a4a3e877046eeaf4beb74d72f65fe14f14ee2c1ba78308efa101bd87964dcecd3693a089c905File tree
11 files changed
+423
-59
lines changed- cargo-rbmt
- src
11 files changed
+423
-59
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | 118 | | |
123 | 119 | | |
124 | 120 | | |
| |||
127 | 123 | | |
128 | 124 | | |
129 | 125 | | |
130 | | - | |
131 | | - | |
132 | 126 | | |
133 | 127 | | |
134 | 128 | | |
| |||
143 | 137 | | |
144 | 138 | | |
145 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
146 | 160 | | |
147 | 161 | | |
148 | 162 | | |
| |||
0 commit comments