build: cargo test 실행 가능하도록 PyO3 extension-module feature 분리#13
Merged
Conversation
변경사항: - Cargo.toml: pyo3 dependency 의 default features 에서 extension-module 제거 - Cargo.toml: [features] extension-module = ["pyo3/extension-module"] 섹션 추가 — wheel 빌드 시에만 활성화 - pyproject.toml: [tool.maturin] features 를 자기 crate 의 extension-module 가리키도록 변경 (wheel 빌드 동작 동일) - .github/workflows/ci.yml: cargo-test job 추가 (Rust unit test 13개 실행, src/ir.rs 의 #[should_panic] 검증 포함) - .github/workflows/ci.yml: all-tests-passed aggregator 의 needs/allowed-skips 에 cargo-test 등록 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extension-modulefeature 를 default features 에서 분리해[features]섹션으로 이동pyproject.toml [tool.maturin] features를 자기 crate 의extension-module가리키도록 변경 (wheel 빌드 동작 동일)cargo-testjob 추가 (Linux, Rust unit test 13개 실행)Why
기존
Cargo.toml은pyo3 = { features = ["extension-module", ...] }로 default features 에extension-module이 들어가 있어cargo test가 libpython 링크 시도 →_PyExc_SystemError등 심볼 부재로 실패. 이 때문에src/ir.rs의#[cfg(test)]모듈 (특히assert_position_invariant_panics_on_mismatch의#[should_panic]가드) 이 CI 에서 검증되지 않아, v0.3.1 spec AC-12 는 source-grep 우회 (tests/test_v0_3_1_marker_char_offset.py::test_rust_uses_assert_eq_not_debug_assert) 로만 보호되고 있었다.PyO3 FAQ "I can't run cargo test" 권장 패턴 적용:
검증
Reference 패턴
PyO3 + maturin 동일 스택 OSS 모두 default features 에서 `extension-module` 제거 패턴 사용:
Related Issues
(없음 — build infra 정리)