Open
Description
Summary
RFC: #3529
Original issue: #9855
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#path-bases
Implementation:
- Implement path-bases (RFC 3529) 1/n: path dep and patch support #14360
- Implement path-bases (RFC 3529) 2/n:
cargo [add|remove|update]
support #14427 - 3/n
[patch]
table in config support
Introduce shared base directories in Cargo configuration files that in turn enable base-relative path dependencies.
Changes from RFC
base
naming was switched topackage
/registry
naming rules, meaning we support unicode instead of just ASCII (Implement path-bases (RFC 3529) 1/n: path dep and patch support #14360)
Unresolved Issues
- How should each layer (config, eventually manifest) layer? Section-wide, per-field? We should have tests to confirm the approach we have
- Can we switch our existing "make dep paths absolute" to build on top of this? (Implement path-bases (RFC 3529) 1/n: path dep and patch support #14360)
- What exact names we should use for the table (
path-bases
) and field names (base
)? - What other built-in base paths could be useful?
package
orcurrent-dir
for the directory of the current project?home
oruser_home
for the user's home directory?sysroot
for the current rustc sysroot?
- Do we actually want to support the
[patch]
table? Adding support for[patch]
in config files greatly complicates the implementation - Should
base = "workspace"
work with implicit workspaces?
Future Extensions
- Add support for declaring path bases in the manifest
- Motivating example: You have a Git dependency that has a path dependency to one of its submodules. It would be nice if the Git dependency could use a path base to point to the submodule, but currently this is broken as the configuration file in that git dependency is never loaded. See https://blog.rust-lang.org/inside-rust/2024/08/15/this-development-cycle-in-cargo-1.81.html#path-bases
- Path bases relative to other path bases
- Path dependency with just a base
- Git dependencies
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Metadata
Metadata
Assignees
Type
Projects
Status
In Progress