Include cxxbridge-cmd in Cargo.lock, check version consistency (#3712)

This adds cxxbridge-cmd to Cargo.lock per
https://github.com/dtolnay/cxx/issues/1407#issuecomment-2509136343

It adds an MSRV to `src/taskchampion-cpp/Cargo.toml` so that the
version of `Cargo.lock` is stil compatible with the MSRV.

It additionally adds a check of the Cargo metadata for all of the cxx*
versions agreeing, and for the MSRV's agreeing.
This commit is contained in:
Dustin J. Mitchell 2024-12-01 10:22:26 -05:00 committed by GitHub
parent e5ab1bc7a5
commit c2cb7f36a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 164 additions and 11 deletions

View file

@ -3,17 +3,28 @@ name = "taskchampion-lib"
version = "0.1.0"
edition = "2021"
publish = false
rust-version = "1.73.0" # MSRV
[lib]
crate-type = ["staticlib"]
[dependencies]
taskchampion = "0.9.0"
cxx = "1.0.124"
# All three cxx* dependencies must have precisely the same version.
cxx = "=1.0.124"
[features]
# use native CA roots, instead of bundled
tls-native-roots = ["taskchampion/tls-native-roots"]
[build-dependencies]
cxx-build = "1.0"
# All three cxx* dependencies must have precisely the same version.
cxx-build = "=1.0.124"
# Include cxxbridge-cmd in Cargo.lock along with the others. This gives a
# warning "ignoring invalid dependency `cxxbridge-cmd` which is missing a lib
# target" but this can be safely ignored.
# See https://github.com/dtolnay/cxx/issues/1407#issuecomment-2509136343
[target.'cfg(any())'.dependencies]
# All three cxx* dependencies must have precisely the same version.
cxxbridge-cmd = "=1.0.124"