Repository navigation
hermetic: cc-rs C and C++ crates in the cpp_rust consumer cargo hub (part of #11966) - #12489
TrapsterDK wants to merge 5 commits into
Conversation
|
Evidence dispatched: windows_x86_64, test, //tools/testing/hermetic:cpp_rust, run 43516091977. Stays draft until green. 🤖 Generated with Claude Code |
1cf4931 to
7fb66b7
Compare
|
Merge train: dropped and returned to draft, //tools/testing/hermetic:c_msvc_fixture_test failed on windows_x86_64 in run 43527640040 (rejected_source_fails_with_the_compiler_message, executables_name_the_selected_compiler) and no failing run on main shows it is pre-existing; the PR also edits tools/testing/hermetic/BUILD.bazel 🤖 Generated with Claude Code |
…part of #11966) The cpp_rust consumer gets a root cargo workspace with a crate that depends on libz-sys (static, C via cc) and cxx (C++ via cc), so dx init writes a cargo.from_cargo hub with the build-script cc annotation and the consumer builds and tests both crates. Cargo.lock comes from bazel run @rules_rust//tools/upstream_wrapper:cargo -- generate-lockfile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hygW8NyPkC1Ea1mT4L
…t of #11966) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hws3L7Tg4oUvpSvuYD
…ense (part of #11966) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hws3L7Tg4oUvpSvuYD
…o name (part of #11966) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hws3L7Tg4oUvpSvuYD
|
Fixed: nothing to fix in this PR's files. Rebased onto current main (clean, no code changes, so no review is stale); hermetic_unit_test passes locally. The windows c_msvc_fixture_test failure (run 43527640040) is in files this PR does not touch: the starter binary links CRT objects from several MSVC versions (producers msvc 147.30729 to 261.35403, wanted msvc 261.35728) and the rejected-source log shows C1083 instead of STL1003. It cannot be reproduced on linux, and no main run covers //tools/testing/hermetic on windows, so it is not shown pre-existing. Left as draft; :cpp_rust windows result is still unconfirmed. 🤖 Generated with Claude Code |
ef3a071 to
12ce8b5
Compare
…nostic (part of #11966) cl.exe writes Rich header prodid 260 for C and 261 for C++, so C-only fixtures and consumers now want "msvc 260.<build>". The pinned cl rejects <string> in a C source with C1083, which c_msvc_fixture and c_fixture_msvc now expect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hws3L7Tg4oUvpSvuYD
|
Blocked, left draft: Windows 🤖 Generated with Claude Code |
Part of #11966.
Changed
tools/testing/hermetic/consumers/cpp_rust/cc_rs/: root cargo workspace (root.Cargo.toml,root.Cargo.lock) and a craterust/tests/fixtures/cc-rsthat depends onlibz-sys1.1.31 (static, C through cc-rs) andcxx1.0.205 (C++ through cc-rs).rust_testcalls zlibcrc32/zlibVersionand aCxxString.tools/testing/hermetic/BUILD.bazel: thecpp_rustqualification copies those files and adds//rust/tests/fixtures/cc-rs/...to its patterns.dx initthen writes thecargo.from_cargohub with the build-script cc annotation (adopt: dx init writes the build-script cc annotation with the cargo hub (part of #11966) #12307).tools/testing/hermetic/defs.bzl,compilers.bzl,BUILD.bazel: C-only msvc fixtures and consumers want the cl C Rich header entrymsvc 260.<build>(261 is C++), andc_msvc_fixture/c_fixture_msvcexpect the pinned cl'sC1083: Cannot open include file: 'string'forcxx_in_c.c. Main fails the same way (run 43533929381); every producer in the binary comes from the pinned msvc_runtime and SDK libraries.root.Cargo.lockfrombazel run @rules_rust//tools/upstream_wrapper:cargo -- generate-lockfile.Tests
bazel test //tools/testing/hermetic:hermetic_unit_test :c_gcc_fixture_test :cpp_gcc_fixture_test :c_llvm_fixture_testand build of:cpp_rust_manifest,:c_fixture_msvc_manifest: pass.//tools/testing/hermetic/...: green, run 43534848344 (c_msvc_fixture_testpasses;manualqualifications not included).//tools/testing/hermetic:cpp_rust: red, run 43535197490. The consumer's@rules_dx//dx:generate_checkfails analysis:gazelle/julia/BUILD.bazelsetspackage_nameonjulia_binary/julia_test, which only the root-onlypatches/rules_julia:package_name.patchadds (consumer-setup: rules_cuda, rules_python, rules_go, rules_julia, protobuf and lua patches upstream or root only (part of #11387) #11418, julia: bump rules_julia to the release with package_name and drop package_name.patch #6659).//tools/testing/hermetic:c_fixture_msvc: red, run 43535210349.@dx_msvc//:cc_toolchain_x64_x64_filesreferences@windows_sdk//:winsdk_bin_x64, which only the root-only windows_support patches declare (consumer-setup: llvm, windows_support and hermetic_launcher patches upstream or into rules_dx code (part of #11387) #11416).tools/dx check --affected: timed out at 1200 s, not checked.cpp_rustconsumer qualification (nested Bazel); CI runs it.Remaining
:cpp_rustand:c_fixture_msvcon Windows: blocked by consumer-setup: rules_cuda, rules_python, rules_go, rules_julia, protobuf and lua patches upstream or root only (part of #11387) #11418 (rules_juliapackage_name) and consumer-setup: llvm, windows_support and hermetic_launcher patches upstream or into rules_dx code (part of #11387) #11416 (windows_supportwinsdk_bin_x64); rerun both once those land.analysis (PR-time checks on linux_x86_64)fails in//haskell/private/tools/weeder:weeder_build_test(no matching toolchain), outside this diff.//rust/tests/fixtures/cc-rs/...in the consumer: no cross qualification exists forcpp_rustyet.msvc_libasAR_*for libz-sys (MODULE.bazel); a consumer hub may need the same from the public annotation.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xut2hygW8NyPkC1Ea1mT4L