Skip to content

Commit

Permalink
Update to cxx 1.0.133
Browse files Browse the repository at this point in the history
Per
GothenburgBitFactory#3712 (review),
this version includes a cxxbridge-cmd dependency internally, so there's
no need to keep that within Taskwarrior, nor to check it in CI.
  • Loading branch information
djmitche committed Dec 1, 2024
1 parent c2cb7f3 commit 0a7ac2f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 59 deletions.
37 changes: 1 addition & 36 deletions .github/workflows/metadata-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,41 +19,7 @@ get_msrv() {
jq -r '.packages[] | select(.name == "'"${package}"'") | .rust_version' "${META}"
}

# check that the cxx packages all have the same version
check_cxx_versions() {
local cxx_version=$(get_version "cxx")
local cxx_build_version=$(get_version "cxx-build")
local cxxbridge_cmd_version=$(get_version "cxx-build")
local cxxbridge_flags_version=$(get_version "cxxbridge-flags")
local cxxbridge_macro_version=$(get_version "cxxbridge-macro")

ok=true
echo "Found cxx version ${cxx_version}"
if [ "${cxx_version}" != "${cxx_build_version}" ]; then
echo "Found differing cxx-build version ${cxx_build_version}"
ok = false
fi
if [ "${cxx_version}" != "${cxxbridge_cmd_version}" ]; then
echo "Found differing cxxbridge-cmd version ${cxxbridge_cmd_version}"
ok = false
fi
if [ "${cxx_version}" != "${cxxbridge_flags_version}" ]; then
echo "Found differing cxxbridge-flags version ${cxxbridge_flags_version}"
ok = false
fi
if [ "${cxx_version}" != "${cxxbridge_macro_version}" ]; then
echo "Found differing cxxbridge-macro version ${cxxbridge_macro_version}"
ok = false
fi

if ! $ok; then
echo "All cxx packages must be at the same version. Fix this in src/taskchampion-cpp/Cargo.toml."
exit 1
else
echo "✓ All cxx packages are at the same version."
fi
}

# Check that the MSRVs match
check_msrv() {
local taskchampion_msrv=$(get_msrv taskchampion)
local taskchampion_lib_msrv=$(get_msrv taskchampion-lib)
Expand All @@ -69,5 +35,4 @@ check_msrv() {
fi
}

check_cxx_versions
check_msrv
30 changes: 19 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 2 additions & 12 deletions src/taskchampion-cpp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,11 @@ crate-type = ["staticlib"]

[dependencies]
taskchampion = "0.9.0"
# All three cxx* dependencies must have precisely the same version.
cxx = "=1.0.124"
cxx = "1.0.133"

[features]
# use native CA roots, instead of bundled
tls-native-roots = ["taskchampion/tls-native-roots"]

[build-dependencies]
# 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"
cxx-build = "1.0"

0 comments on commit 0a7ac2f

Please sign in to comment.