Two Rust benches cannot link, so they can never run; the CI gate only type-checks them
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- build-system, ci-cd, testing-qa
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện các lỗi với cargo bench --manifest-path fraiseql_rs/Cargo.toml --all-features --bench memory -- --test và lệnh pipeline tương đương. Đọc fraiseql_rs/Cargo.toml, benches/memory.rs, benches/pipeline.rs và bước CI được thêm bởi #500. Hoàn thành có nghĩa là phạm vi đã chọn được giải quyết và cả hai benchmark đều chạy thành công hoặc bị xóa, với CI kiểm tra các target tương ứng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Found while verifying what remained actionable in #491. #500 fixed the bench compile errors and added a CI step that keeps them compiling, which holds — but "compiling" here means cargo check, and cargo check does not link. Two of the seven benches cannot produce an executable at all.
What happens
Each bench built individually, --all-features, on b85762dee:
connection_pool builds
core_benchmark builds
memory LINK FAILS
mutation_benchmark builds
pipeline LINK FAILS
query_execution builds
streaming builds
cargo bench --manifest-path fraiseql_rs/Cargo.toml --all-features --bench memory -- --test:
mold: error: undefined symbol: PyUnicode_FromStringAndSize
mold: error: undefined symbol: PyEval_RestoreThread
mold: error: undefined symbol: _Py_Dealloc
>>> referenced 52 more times
clang: error: linker command failed with exit code 1
error: could not compile `fraiseql_rs` (bench "memory")
The five that build do run — cargo bench --bench core_benchmark -- --test reports Testing components/byte_reader_parsing … Success.
Why
Both failing benches, and only those two, call into the PyO3-dependent half of the crate:
// fraiseql_rs/benches/memory.rs:2, fraiseql_rs/benches/pipeline.rs:3
use fraiseql_rs::pipeline::builder::build_graphql_response;
pyo3 is declared with extension-module unconditionally (fraiseql_rs/Cargo.toml:62), which tells it not to link libpython — the interpreter resolves those symbols at import time. Any target that produces an executable and actually references them therefore cannot link. It is the same constraint the comment above the CI build step already records for cargo test. There is no feature combination that avoids it: extension-module is on the dependency line, not behind a feature.
The other five link because nothing they call reaches a Python symbol.
Why CI does not catch it
The gate added by #500 is:
- name: Check all targets (benches and test binaries)
run: cargo check --manifest-path fraiseql_rs/Cargo.toml --all-targets --all-features
cargo check stops after type-checking, so it validates that these two benches still match the API they call — the #471 drift problem, which it does solve — while never discovering that they cannot be executed. Adding --all-targets to the neighbouring cargo build step does not work either; that is exactly what #491 proposed, and it fails on memory, pipeline and the lib test target.
Scope
Both benches are declared with harness = false in Cargo.toml, so they are meant to be run. As things stand they are dead weight of the same kind as the test directories removed in #506: present, type-checked, and unrunnable.
Worth deciding rather than assuming: remove them, or move build_graphql_response behind a boundary the benches can call without dragging in PyO3. The second is only worth it if the pipeline builder is genuinely something we want benchmarked, which is a performance question, not a build one.
Credit to @Joemon24, whose #491 was pulling on this same thread — the benches not really being built — and whose PR is what prompted the check.
- Ngôn ngữ chính
- Python
- Star
- 23
- Fork
- 3
- Merge trung bình
- 30 phút
- Pull request đã merge (30 ngày)
- 35
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue tương tự
-
Broken links found in docsĐang mởdocs pydanty:is-working
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
pydantic/pydantic-ai#8863 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
run-llama/llama_index#23278 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
documentation from-review-extraction github-actions priority: low severity:nit
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
LearningCircuit/local-deep-research#6946 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
oracle/langchain-oracle#323 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
tenstorrent/tt-metal#58057 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày