Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Cargo.lock from workspace root (if available) (#111)
When using macrotest, to make output consistent, it is necessary to pin to a particular version of Nightly Rust. But of course usptream Nightly Rust changes, and that means that dependencies (of the macro package under test) may need to be updated upstream. Sometimes those updates aren't compatible with our pinned Nightly. Therefore, tests must run with pinned versions of the dependencies, not just pinned versions of the compiler. Without this, we can run into trouble, as seen here, for example: https://gitlab.torproject.org/Diziet/rust-derive-deftly/-/issues/60 Borrow a trick from dtolnay's trybuild, which faces the same problem: copy the outer workspace's Cargo.lock into the synthetic crate. This influences Cargo's resolver sufficiently; but since we run without --locked, Cargo can still adjust the file as needed for the synthetic crate.
- Loading branch information