-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure tests are built with same dependencies as parent crate #53
Comments
Steps to repro:
|
locally I'm getting
|
A naive solution would be to remove the cached It will then write a new I've tested this for the repro above and it works, and rerunning the tests with the package resolution is fast. I'm not sure though that this will guarantee the exact same set of dependencies, or what other unintended consequences there may be. But putting this suggestion forward as the "simplest thing that will possibly work". Another idea I'm currently investigating is when copying the dependencies to the crate generated by @dtolnay let me know what you think of those ideas and I can prepare a PR, or go back to the drawing board. |
As an alternative to deleting the Tried it and it works: master...ascjones:generate-lockfile Edit: PR for this 👇 |
I'm still getting this issue on version 1.0.35 |
This reverts commit 9055ec2. dtolnay/trybuild#53
* Initial commit Forked at: d67fc4c Parent branch: origin/master * WIP Forked at: d67fc4c Parent branch: origin/master * WIP Forked at: d67fc4c Parent branch: origin/master * WIP Forked at: d67fc4c Parent branch: origin/master * WIP Forked at: d67fc4c Parent branch: origin/master * WIP Forked at: d67fc4c Parent branch: origin/master * CLEANUP Forked at: d67fc4c Parent branch: origin/master * Add notes to original source code * CLEANUP Forked at: d67fc4c Parent branch: origin/master * CLEANUP Forked at: d67fc4c Parent branch: origin/master * WIP Forked at: d67fc4c Parent branch: origin/master * WIP Forked at: d67fc4c Parent branch: origin/master * WIP Forked at: d67fc4c Parent branch: origin/master * CLEANUP Forked at: d67fc4c Parent branch: origin/master * WIP Forked at: d67fc4c Parent branch: origin/master * Some doc * Test with trybuild * Revert "Test with trybuild" (issue with trybuild atm) This reverts commit 9055ec2. dtolnay/trybuild#53 * Apply suggestions * Rename derive to proc-macro * Remove "prefix" feature from informant * Blocking task should use SpawnHandle::spawn_blocking * Improve doc as suggested * Fixes Forked at: d67fc4c Parent branch: origin/master * Apply suggestion * Update client/cli/proc-macro/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * More suggestions * CLEANUP Forked at: d67fc4c Parent branch: origin/master * Improve error message * CLEANUP Forked at: d67fc4c Parent branch: origin/master * Fix async issue * CLEANUP Forked at: d67fc4c Parent branch: origin/master * CLEANUP Forked at: d67fc4c Parent branch: origin/master * Add test * fix doc test * Update client/cli/src/logging.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Apply suggestions * Suggestions * Clarify doc * WIP Forked at: d67fc4c Parent branch: origin/master Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
The crate that gets compiled by trybuild is given the same dependencies in its Cargo.toml as the outer crate has. But it may have an old Cargo.lock left over from a previous
cargo test
run that causes it to use a different set of patch versions of those dependencies compared to what is used currently by the outer crate whose tests we are running. To avoid this, trybuild should somehow write a Cargo.lock (or failing that, use a sequence ofcargo update --precise
commands) to keep the resolved set of dependencies in sync.The text was updated successfully, but these errors were encountered: