-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking issue for RFC 1977: public & private dependencies #44663
Copy link
Copy link
Open
Labels
A-maybe-future-editionSomething we may consider for a future edition.Something we may consider for a future edition.B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCE-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.F-public_private_dependenciesfeature: public_private_dependenciesfeature: public_private_dependenciesS-tracking-design-concernsStatus: There are blocking design concerns.Status: There are blocking design concerns.S-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.S-tracking-needs-documentationStatus: Needs documentation.Status: Needs documentation.S-tracking-needs-migration-lintStatus: This item needs a migration lint.Status: This item needs a migration lint.T-cargoRelevant to the cargo team, which will review and decide on the PR/issue.Relevant to the cargo team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-maybe-future-editionSomething we may consider for a future edition.Something we may consider for a future edition.B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCE-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.F-public_private_dependenciesfeature: public_private_dependenciesfeature: public_private_dependenciesS-tracking-design-concernsStatus: There are blocking design concerns.Status: There are blocking design concerns.S-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.S-tracking-needs-documentationStatus: Needs documentation.Status: Needs documentation.S-tracking-needs-migration-lintStatus: This item needs a migration lint.Status: This item needs a migration lint.T-cargoRelevant to the cargo team, which will review and decide on the PR/issue.Relevant to the cargo team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Accepted
Status
In Progress
Summary
RFC (original, superseded): #1977
RFC: #3516
Cargo tracking issue: rust-lang/cargo#6129
Issues: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+label%3AF-public_private_dependencies
Cargo issues: https://github.com/rust-lang/cargo/issues?q=is%3Aopen+is%3Aissue+label%3AZ-public-dependency
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#public-dependency
This feature enables the ability to track which dependencies are publicly exposed through a library's interface. It has two sides to the implementation: rustc (lint and
--externflag), and cargo (Cargo.tomlsyntax, and passing--externflags).This feature was originally specified in rust-lang/rfcs#1977, but was later down-scoped in rust-lang/rfcs#3516.
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.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Unresolved Questions
Steps
exported_private_dependencieslint only take effect in innermost dependency #119428private-dependencybug #122757publicdependency configuration with workspace deps cargo#12817exported-private-dependencieslints to libraries cargo#13039--publicsupport forcargo addcargo#13037cargo addshould check public transitive dependencies when auto-picking a version cargo#13038cargo metadatacargo#14502Command to update Cargo.lock to minimal versions (Command to update Cargo.lock to minimal versions cargo#4100)Makecargo publishuse the minimal versions allowed by Cargo.tomlcargo fixsupport forexported-private-dependenciescargo#13095exported-private-dependenciesallow-by-default pre-2024 anddeny-by-default in 2024+ / in the 2024-compatibility lint groupalloworwarn(context from zulip)publicbetween more than one dependencies table (normal, target A normal, target B normal), bothpublic = <bool>and default andpublic = truewithpublic = falseNon-blocking further improvements
Cargo.tomlcontext toexported-private-dependencieslints cargo#13096Changes from RFC
cc @rust-lang/cargo @epage