Skip to content
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

Does the Cargo team accept RFC: Packages as (optional) namespaces #3243 #12901

Closed
epage opened this issue Oct 31, 2023 · 14 comments
Closed

Does the Cargo team accept RFC: Packages as (optional) namespaces #3243 #12901

epage opened this issue Oct 31, 2023 · 14 comments
Labels

Comments

@epage
Copy link
Contributor

epage commented Oct 31, 2023

rust-lang/rfcs#3243 has enough impact on cargo (and we want to make sure all voices are heard) that we wanted to have an FCP for this, rather than an informal yay/nay.

To avoid the "two team FCP" problem (both teams - 2 people must approve), we're holding the FCP here so its only "cargo team - 2 people"

Note: This issue exists purely for process purposes and feedback should be given on rust-lang/rfcs#3243

@epage epage added the T-cargo Team: Cargo label Oct 31, 2023
@epage
Copy link
Contributor Author

epage commented Oct 31, 2023

@rfcbot fcp merge

Main effects on cargo

  • Support :: in the middle of a package name, once
    • Including dep: feature syntax
  • Ramifications for implicit feature names (do we support it for those?)
    • Decide during implementation/stabilization?
  • What should the lib name be?
    • Decide during implementation/stabilization?
  • Should we support renaming a package into a namespace?
    • Decide during implementation/stabilization?
  • What should the generated .crate file names be?
  • What should be used for :: in the index file paths?

This is assuming that namespace participation is only enforced within a registry when a package is published to it.

@rfcbot
Copy link
Collaborator

rfcbot commented Oct 31, 2023

Team member @epage has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period An FCP proposal has started, but not yet signed off. disposition-merge FCP with intent to merge labels Oct 31, 2023
@weihanglo
Copy link
Member

What should the lib name be?

The current iteration of rust-lang/rfcs@482fae8 choose pkg as the autogenerated lib.name for namespace::pkg. This might introduce more name conflicts on build artifacts (see #6313). For example, a workspace contains both png::codec and avif::codec and want to build them into dylib.

This is not a blocker if postponing it to implementation stage is permitted, but it would be great if we can have a consensus on it.

@ehuss
Copy link
Contributor

ehuss commented Nov 4, 2023

@weihanglo Can you clarify what kind of conflict you see? For rlibs, the filename should have a distinct hash between them.

The conflicts I can think of are:

  • dylib/cdylib — these don't have hashes. This seems unlikely in practice, though something to consider.
  • rustdoc — I'm going to leave a comment about this on the RFC.

@weihanglo
Copy link
Member

Yes thanks, Eric. dylib/cdylib are things I am aware of. Might not be common, and if cargo can apply rename feature to namespaced package, everything would be okay. rustdoc's issue is more prominent.

@rfcbot rfcbot added final-comment-period FCP — a period for last comments before action is taken and removed proposed-final-comment-period An FCP proposal has started, but not yet signed off. labels Nov 7, 2023
@rfcbot
Copy link
Collaborator

rfcbot commented Nov 7, 2023

🔔 This is now entering its final comment period, as per the review above. 🔔

@decathorpe

This comment was marked as off-topic.

@weihanglo

This comment was marked as off-topic.

@epage

This comment was marked as off-topic.

@tarcieri

This comment was marked as off-topic.

@epage

This comment was marked as off-topic.

@werdahias

This comment was marked as off-topic.

@rfcbot rfcbot added finished-final-comment-period FCP complete to-announce and removed final-comment-period FCP — a period for last comments before action is taken labels Nov 17, 2023
@rfcbot
Copy link
Collaborator

rfcbot commented Nov 17, 2023

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

@ehuss
Copy link
Contributor

ehuss commented Nov 17, 2023

I'm going to close this as accepted. Thanks everyone!

@ehuss ehuss closed this as completed Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants