Conversation
- Also add necessary tests for the new flag
- All commands that support `manifest-path` (except `locate-project`, `verify-project` and `read-manifest`)
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @epage (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
doc: convert comments to rustdoc in workspace Converting workspace comments into docs and adding docs on members that were missing it. [Original discussion](#14326 (comment))
|
@rustbot author |
|
Thanks for your patience @weihanglo ! |
|
@bors r+ |
|
Here are some tasks we can do in follow-ups, if you're still interested :) For feature gated tests, we should have
For reference: cargo/tests/testsuite/build.rs Lines 298 to 319 in d3e84f0 |
|
If we're going back and making changes, please rename |
|
☀️ Test successful - checks-actions |
Update cargo 8 commits in 2f738d617c6ead388f899802dd1a7fd66858a691..ba8b39413c74d08494f94a7542fe79aa636e1661 2024-08-13 10:57:52 +0000 to 2024-08-16 22:48:57 +0000 - feat(update): Report when incompatible-rust-version packages are selected (rust-lang/cargo#14401) - test: Migrate old_cargos to snapbox (rust-lang/cargo#14410) - Correct diagnostic for `TomlDebugInfo` (rust-lang/cargo#14413) - Add `--lockfile-path` flag (rust-lang/cargo#14326) - test: Migrate some json tests to snapbox (rust-lang/cargo#14402) - Implement base paths (RFC 3529) 1/n: path dep and patch support (rust-lang/cargo#14360) - doc: convert comments to rustdoc in workspace (rust-lang/cargo#14397) - Fix MSRV for workspace .package and .dependencies (rust-lang/cargo#14400) r? ghost
Lockfile path tests (follow-up) Addressing comments by [Weihang](#14326 (comment)) and [Ed](#14326 (comment)) from #14326
This change implements a new
--lockfile-pathproposed in #5707 .Functionality added:
--lockfile-path <PATH>to all commands that supportmanifest-pathwith exception of:locate-project(doesn't use lock file)verify-project(is deprecated)read-manifest(doesn't use lock file)--helphas (unstable) in them<PATH>must end withCargo.lock. If specified path doesn't exist (or parent director(ies), create all the parent directories and the lockfile itselfImplementation TLDR: add
requested_lockfile_pathintoWorkspaceand set it onworkspace(gctx)call (setting from the context)Update
lockfile.lock_root()to respectrequested_lockfile_path(if set)Add test cases covering all affected commands. Tested creating lockfile, reading lockfile, overriding default (
./Cargo.lock) lockfile, symlink tests. Extra tests for package to make sure pinned versions from path's lockfile are respected (i.e. double check correct lockfile is used)I doubt this flag will be used for any command that's not read-only, but I tried to cover all the commands.