-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Implement path-bases (RFC 3529) 1/n: path dep and patch support #14360
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (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 (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What odd cases might we need to test?
path = """
path = "."
Anything else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it really make sense to have dedicated tests for these? I'm using PathBuf::join
, so I'd expect any unusual value for the path base or the path to be handled by the Standard Library/OS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That depends on how the paths are used after this I've had tests that don't do well in odd cases like this. It depends on if you are dependent on the paths being "clean (prefix checks) and making sure the cleaning comes after.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, added a few different tests: .
, ..
, "
Also added a test for self-dependency via a path base.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see self_dependency_using_base
which is a good case but not the others
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid_path_with_base
, parent_dir_with_base
and current_dir_with_base
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry, that was a typo. I didn't mean path = """
but path = ""
. I was really confused when you mentioned an "invalid" test.
Wanting to double check that you intended to not push the mentioned changes. |
Yes, sorry, not sure what the correct etiquette is with this. Usually I reply to comments and resolve conversations -> push updated code -> require reviews. |
Not many people remember to "request review" and you never know whether someone will or not (in general, I just assume people won't do it). In general, its strange to look at a PR with things marked "done" without code pushes, particularly if I'm coming back to the PR several days after the message. |
f6c1ae3
to
8d3fe6a
Compare
If @bors r+ |
☀️ 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
RFC: rust-lang/rfcs#3529
Tracking Issue: #14355
This PR add support in path dependencies and
patch
table and theworkspace
built-in path base.