Skip to content

Make shared native doctests portable across dimensions and precision - #1060

Open
partaevil wants to merge 1 commit into
dimforge:masterfrom
partaevil:fix/shared-doctest-portability
Open

partaevil wants to merge 1 commit into
dimforge:masterfrom
partaevil:fix/shared-doctest-portability

Conversation

@partaevil

Copy link
Copy Markdown

Shared native documentation imports rapier3d and uses 3D/f32-specific constructors in
examples compiled by all four core crates. For example, cargo test -p rapier2d --doc 'data::arena::Arena<T>::contains' fails with E0433 on the base revision.

Use hidden aliases for the selected crate, dimension-independent vector expressions,
explicit 2D/3D constructor branches and math::Real values. Only documentation comments in
22 files change. The 92 executable snippets and 15 existing ignored snippets per variant
are preserved; non-documentation source and ignored blocks are unchanged.

Validation on pinned base 475caa3f: the isolated four-crate native workspace passes 368
doctests with 60 existing ignored snippets in each of the default and parallel matrices.
Those checks were run alongside the separate origin proposal and parallel-test fixture
repair; this PR contains neither. The original pristine-source 2D import failure was
reproduced independently. Representative command for each selected crate:

cargo test -p rapier2d --doc
cargo test -p rapier2d --doc --features parallel

Repeat for rapier3d, rapier2d-f64 and rapier3d-f64. This is documentation portability;
no runtime behavior or example ignore count changes.

Base: 475caa3
Patch-SHA256: 86517f90adac0f26f5d6e379d4642c0f8f0885728440b095309d0953566a30bc

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant