Skip to content

Tracking Issue for path-bases #14355

Open
@dpaoliello

Description

@dpaoliello

Summary

RFC: #3529
Original issue: #9855
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#path-bases
Implementation:

Introduce shared base directories in Cargo configuration files that in turn enable base-relative path dependencies.

Changes from RFC

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 or current-dir for the directory of the current project?
    • home or user_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
  • 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

No one assigned

    Labels

    A-manifestArea: Cargo.toml issuesC-tracking-issueCategory: A tracking issue for something unstable.

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions