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
Improve development experience #410
Conversation
bffefba
to
1d6a879
Compare
I'm not entirely opposed to this change, but in the past I decided intentionally against it so I can end up with different |
FWIW for dependencies that are only part of (but maybe the dependencies are overlapping...) I do think a workspace is a much nicer development experience. |
@mitsuhiko I don't quite understand the concern. Wouldn't the .lock file only be published for cargo-insta, not for insta? That's my understanding of the usual convention. |
There is only a single |
That's right. I removed it. But my point was that the Cargo.lock should not be published with the insta library, only the cargo-insta CLI. |
cdfd93e
to
3d2be4e
Compare
Ah, I see what you mean now. Indeed this change means that the versioning restrictions that apply to |
Ugh, this changed the current directory when the integration tests run, and they are not resilient to this. I'll wait for #412 to land first. |
Yes cool. Still a big fan of the change! Do you think we can still get |
Yeah, they were passing before I split out #412. |
FWIW I would prefer a workspace as well. I think the way it could be accomplished might be with manually maintaining a secondary |
Re the MSRV — FWIW in PRQL we use It allows different MSRVs by crate. Relative to maintaining another |
Alright I've abandoned the virtual manifest for now. Instead I added cargo-insta and its integration tests to the root manifest workspace. |
That won't work here because MSRV is 1.51 but the tests also need to run against 1.61. @mitsuhiko I did what you suggested with |
At long last this is green. |
Clarify that `cargo insta test` is expected to produce a change in the snaphots.
This allows IDE integration to work when the root of the repository is opened. Prior to this change, a developer would have to open cargo-insta to get code completion for that crate. This also causes clippy to run on all crates, so this commit fixes a few lints. The integration-tests crate's test is changed to a proper test function so that it can rely on always being run from the root of the integration-tests crate. Care is taken to remove the tests directory after running to avoid pollution in which `cargo test` attempts to run those tests.
I'm inclined to merge this (thus the approval). One thing I still need to figure out is if the cargo-insta installation with lockfile continues to work as intended. In particular I'm not sure if cargo publish is clever enough to publish a rewritten version of the workspace lock with the package. |
Validated: the lock file is handled correctly by |
FYI this isn't how Thanks for this PR! |
See individual commits.