- Configure workspace with pdftract-core, pdftract-cli, pdftract-py members - Add workspace.package metadata: version, edition, rust-version (1.78), license (MIT OR Apache-2.0) - Add workspace.dependencies for shared external deps (anyhow, flate2, lzw, memchr, secrecy, serde, thiserror, tracing) - Create .cargo/config.toml with CI and development build aliases - All member crates reference workspace metadata via workspace = true - pdftract-py configured as cdylib with pyo3 extension-module feature Acceptance criteria: - PASS: 3 workspace members listed by cargo metadata - PASS: All crates use workspace metadata references - WARN: cargo build fails due to code compilation errors (separate concern) Refs: pdftract-279, plan lines 3343-3367 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2.1 KiB
2.1 KiB
pdftract-279: Workspace Layout Verification
Acceptance Criteria Status
PASS
cargo metadata --format-version 1lists exactly 3 workspace members: pdftract-core, pdftract-cli, pdftract-py- All three crate
Cargo.tomls reference workspace-wideversion,edition,rust-version,license,repositoryviaworkspace = true - Root
Cargo.tomlusesresolver = "2"as required for cdylib feature compatibility - Workspace is configured with
[workspace.package]for shared metadata (version, edition, rust-version, license, repository, authors, homepage, documentation) - Workspace is configured with
[workspace.dependencies]for shared external deps (anyhow, flate2, lzw, memchr, secrecy, serde, thiserror, tracing) - pdftract-cli has
[[bin]] name = "pdftract"anddefault-run = "pdftract" - pdftract-py uses
pyo3withextension-modulefeature andcrate-type = ["cdylib"] .cargo/config.tomlprovides build aliases for CI (bench-ci, test-ci) and development (b, br, c, cr, t, tr)- Adding a fourth member requires only one edit to root
Cargo.toml(workspace.members list) - pdftract-core is
publish = true; pdftract-cli ispublish = true; pdftract-py ispublish = false
WARN
cargo build --workspace --lockedfails due to compilation errors in pdftract-core source code (12 errors, 15 warnings)- These are code-level issues, not workspace structure issues
- The workspace configuration itself is correct and complete
- Separate beads are needed to fix the compilation errors
Files Modified
Cargo.toml- Updated workspace members from["crates/pdftract-core", "crates/pdftract-cer-diff", "crates/pdftract-cli"]to["crates/pdftract-core", "crates/pdftract-cli", "crates/pdftract-py"]Cargo.toml- Added workspace metadata: rust-version, authors, homepage, documentationCargo.toml- Updated license fromMITtoMIT OR Apache-2.0Cargo.toml- Added workspace dependencies: anyhow, lzw, memchr, secrecy (updated from 0.8 to 0.10), serde, tracing.cargo/config.toml- Created new file with build aliases
References
- Plan section: Release Engineering and Distribution / Artifact Taxonomy, lines 3343-3367