From 04852958b9ff9b4f52616daf975ef9e20105c70e Mon Sep 17 00:00:00 2001 From: Jose Storopoli Date: Fri, 13 Dec 2024 17:24:17 -0300 Subject: [PATCH 1/3] contrib: check if the user has cargo-public-api --- contrib/check-for-api-changes.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/check-for-api-changes.sh b/contrib/check-for-api-changes.sh index dc305dca05..3bfe415715 100755 --- a/contrib/check-for-api-changes.sh +++ b/contrib/check-for-api-changes.sh @@ -22,6 +22,7 @@ export LC_ALL=C main() { need_nightly + need_cargo_public_api generate_api_files "hashes" generate_api_files "io" @@ -81,6 +82,13 @@ need_nightly() { fi } +need_cargo_public_api() { + if command -v cargo-public-api > /dev/null; then + return + fi + err "cargo-public-api is not installed; please run 'cargo +nightly install cargo-public-api --locked'" +} + err() { echo "$1" >&2 exit 1 From ff67eadc7fac0bd1cbe3a42fb385edd286ac9cb5 Mon Sep 17 00:00:00 2001 From: Jose Storopoli Date: Fri, 13 Dec 2024 17:30:52 -0300 Subject: [PATCH 2/3] contributing: clarify API changes --- CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ff1d586650..451376049d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -157,6 +157,9 @@ running `just check-api`. - `primitives` - `units` +Check the [API text files](api/README.md) for more information +on how to install the dependencies and create the text files. + ### Repository maintainers Pull request merge requirements: From f01f071751332bb6aa8b9affa4677f913035de7f Mon Sep 17 00:00:00 2001 From: Jose Storopoli Date: Sun, 15 Dec 2024 11:42:42 -0300 Subject: [PATCH 3/3] api: document the need of cargo nightly --- api/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/README.md b/api/README.md index 8979cd542d..f83f990b14 100644 --- a/api/README.md +++ b/api/README.md @@ -6,7 +6,7 @@ enabled. To create these files run `../contrib/check-for-api-changes.sh`: Requires `cargo-public-api`, install with: ``` -cargo +stable install cargo-public-api --locked +cargo +nightly install cargo-public-api --locked ``` ref: https://github.com/enselic/cargo-public-api