From 596ce17fe9b75f4435250b531485069d1e1348f2 Mon Sep 17 00:00:00 2001 From: Colton Hurst Date: Mon, 25 Mar 2024 11:31:55 -0400 Subject: [PATCH] Nightly Toolchain Note (#675) ## Type of change ``` - [ ] Bug fix - [ ] New feature development - [x] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ``` ## Objective Add a note about the required nightly toolchain. Without this people will receive an error when attempting to run the `build-api.sh` script. For posterity, the nightly toolchain is required for certain features deemed unsafe. You can find more info here: https://github.com/bitwarden/sdk/pull/512 ## Code changes - **README.md:** Add nightly install instructions ## Before you submit - Please add **unit tests** where it makes sense to do so --- README.md | 3 +++ support/build-api.sh | 1 + 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index cdc52a7cb..a1ef88b7d 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,9 @@ This project uses customized templates which lives in the `support/openapi-templ These templates resolves some outstanding issues we've experienced with the rust generator. But we strive towards modifying the templates as little as possible to ease future upgrades. +Note: If you don't have the nightly toolchain installed, the `build-api.sh` script will install it +for you. + ## Tests Many of the SDK tests are based on encrypted data provided by the other Bitwarden clients. In order diff --git a/support/build-api.sh b/support/build-api.sh index a668b5564..ea295a523 100755 --- a/support/build-api.sh +++ b/support/build-api.sh @@ -22,5 +22,6 @@ npx openapi-generator-cli generate \ -t ./support/openapi-template \ --additional-properties=packageVersion=1.0.0 +rustup toolchain install nightly cargo +nightly fmt npm run prettier