You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "slachiewicz (via GitHub)" <gi...@apache.org> on 2026/10/12 17:49:46 UTC

[PR] THRIFT-6405: Resolve Rust dependencies to versions the pinned toolchain can build [thrift]

slachiewicz opened a new pull request, #4002:
URL: https://github.com/apache/thrift/pull/4002

   `lib-rust` has failed on master since `uuid` 1.27.0 (2026-10-02) raised its minimum to Rust 1.89; the job builds with 1.85.1 from `rust-toolchain`. A root `.cargo/config.toml` sets `resolver.incompatible-rust-versions = "fallback"`, so every Cargo build in the tree resolves to the newest versions the running toolchain can compile (`uuid` 1.26.1 under 1.85.1). https://issues.apache.org/jira/browse/THRIFT-6405
   
   The file applies to builds from a checkout or the source tarball (it is added to `EXTRA_DIST`), not to the published crate. It does not set `rust-version`; that decision stays with [THRIFT-6162](https://issues.apache.org/jira/browse/THRIFT-6162).
   
   Verified: the `lib-rust` job's steps (`make -C lib/rs`, `check`, `check-rustls`, `lib/rs/test check`, `test/rs precross`, `lib/rs/test_recursive check`) in `ubuntu:24.04` on arm64 with rustc 1.85.1 → all pass; master fails at the first step with `uuid@1.28.0 requires rustc 1.89.0`.
   
   - [x] Did you create an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket? [THRIFT-6405](https://issues.apache.org/jira/browse/THRIFT-6405)
   - [x] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
   - [x] Did you squash your changes to a single commit?
   - [x] Did you do your best to avoid breaking changes? Builds that used to fail now pick older compatible dependency versions; nothing else changes.
   - [x] Build change, so the commit carries no CI-skip marker.
   - [x] AI-assisted: the commit carries a `Co-Authored-By:` trailer. No new dependency or third-party code.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] THRIFT-6405: Resolve Rust dependencies to versions the pinned toolchain can build [thrift]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #4002:
URL: https://github.com/apache/thrift/pull/4002#discussion_r4250983697


##########
.cargo/config.toml:
##########
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Every Cargo build in this tree resolves dependencies to the newest versions
+# that the toolchain pinned in rust-toolchain can compile, instead of failing
+# when a dependency raises its minimum Rust version. None of the crates sets
+# package.rust-version, so the running rustc is the version that counts.
+# Applies to builds from this checkout only; it is not part of the published
+# crate.

Review Comment:
   The comment asserts that none of the crates set `package.rust-version`, which can easily become outdated (and misleading) if any crate adds `rust-version` later. Consider rewording to describe the behavior without depending on that invariant (e.g., explain that resolution is constrained by the running toolchain / MSRV policy, regardless of whether crates set `rust-version`).



##########
Makefile.am:
##########
@@ -140,6 +140,7 @@ distdir:
 
 EXTRA_DIST = \
 	.asf.yaml \
+	.cargo \
 	.clang-format \
 	.dockerignore \
 	.editorconfig \

Review Comment:
   Including the entire `.cargo` directory in `EXTRA_DIST` can unintentionally ship any future files added under `.cargo/` (e.g., private registry config, credentials, CI-only overrides). Prefer listing the specific file(s) needed for the tarball (e.g., `.cargo/config.toml`) so the dist contents remain minimal and less leak-prone.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] THRIFT-6405: Resolve Rust dependencies to versions the pinned toolchain can build [thrift]

Posted by "Jens-G (via GitHub)" <gi...@apache.org>.
Jens-G commented on code in PR #4002:
URL: https://github.com/apache/thrift/pull/4002#discussion_r4265368603


##########
Makefile.am:
##########
@@ -140,6 +140,7 @@ distdir:
 
 EXTRA_DIST = \
 	.asf.yaml \
+	.cargo \
 	.clang-format \
 	.dockerignore \
 	.editorconfig \

Review Comment:
   Done in 8d7c5d8a8: `EXTRA_DIST` lists `.cargo/config.toml` only. Checked with a throwaway `.cargo/credentials.toml`: with the directory listed, `make dist` packed it into the tarball; with the file listed, the tarball has `.cargo/config.toml` only.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)



##########
.cargo/config.toml:
##########
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Every Cargo build in this tree resolves dependencies to the newest versions
+# that the toolchain pinned in rust-toolchain can compile, instead of failing
+# when a dependency raises its minimum Rust version. None of the crates sets
+# package.rust-version, so the running rustc is the version that counts.
+# Applies to builds from this checkout only; it is not part of the published
+# crate.

Review Comment:
   Done in 8d7c5d8a8: the comment now names the bound as the crates' `package.rust-version` where one is set, otherwise the running rustc. It stays correct once THRIFT-6162 (#4003) sets `rust-version`.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] THRIFT-6405: Resolve Rust dependencies to versions the pinned toolchain can build [thrift]

Posted by "Jens-G (via GitHub)" <gi...@apache.org>.
Jens-G merged PR #4002:
URL: https://github.com/apache/thrift/pull/4002


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org