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

Tracking Issue for Packages as (optional) namespaces #13576

Open
2 of 5 tasks
epage opened this issue Mar 12, 2024 · 3 comments
Open
2 of 5 tasks

Tracking Issue for Packages as (optional) namespaces #13576

epage opened this issue Mar 12, 2024 · 3 comments
Labels
C-tracking-issue Category: A tracking issue for something unstable.

Comments

@epage
Copy link
Contributor

epage commented Mar 12, 2024

Summary

RFC: #3243
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#my-feature
rustc tracking issue: rust-lang/rust#122349
crates.io tracking issue: rust-lang/crates.io#8292

Allow a parent package to open its API namespace for other packages to participate

Implementation

Unresolved Issues

  • For an implicit bin in a namespaced package, should do something (e.g. warn, error) about cross-platform hazard of :: being in the name?

Future Extensions

No response

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.

@epage epage added the C-tracking-issue Category: A tracking issue for something unstable. label Mar 12, 2024
@ehuss ehuss moved this to Big Projects, no backers in Cargo Roadmap Mar 14, 2024
epage added a commit to epage/cargo that referenced this issue Mar 15, 2024
epage added a commit to epage/cargo that referenced this issue Mar 15, 2024
bors added a commit that referenced this issue Mar 15, 2024
feat: Add 'open-namespaces' feature

### What does this PR try to resolve?

This is a step towards #13576

### How should we test and review this PR?

### Additional information
@hydroperfox
Copy link

I have created this simple package sunform::package1 with the open-namespaces feature enabled.

cargo-features = ["open-namespaces"]

[package]
...

sunform-package1.zip

When I initialize a Git repository in the local package, commit files, and run

cargo publish --allow-dirty

I get

    Updating crates.io index
error: failed to open: C:\Users\hydro\Downloads\Repositories\sunform-package1\target\package\.sunform::package1-0.1.0.crate

Caused by:
  A sintaxe do nome do arquivo, do nome do diretório ou do rótulo do volume está incorreta. (os error 123)

So for Windows these don't work yet?

@epage
Copy link
Contributor Author

epage commented Jul 22, 2024

@hydroperfox publish support is not done yet, see this task from the task list

[ ] Publish support including index file system layout

@hydroperfox
Copy link

hydroperfox commented Jul 22, 2024

I've remembered of binaries, where the default binary's name is derived from the package's name, in which case it requires translating :: to - (actually an underscore, not a hyphen) when writing the binary.

bors added a commit that referenced this issue Aug 29, 2024
fix(pkgid): Allow open namespaces in PackageIdSpec's

### What does this PR try to resolve?

This is a part of #13576

This unblocks #14433.  We have a test to ensure you can't publish a namespaced package and the error for that is getting masked in #14433 because the package name is getting  parsed as a `PackageIdSpec` which wasn't supported until this PR.

### How should we test and review this PR?

### Additional information
charmitro pushed a commit to charmitro/cargo that referenced this issue Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for something unstable.
Projects
Status: Big Projects, no backers
Development

No branches or pull requests

2 participants