-
Notifications
You must be signed in to change notification settings - Fork 602
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
Allow features prefixed with "crate:" for namespaced-features #2277
Conversation
See description of the unstable cargo feature here: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#namespaced-features This allows crates that enable namespaced features to be published to a crate registry.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @smarnach (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
(The nightly test failure here is spurious, from rust-lang/rust#70041.) |
Hey @djc, I've added this to the agenda for our weekly meeting. Feel free to attend if you're able to make it. We don't really have a solid process in place yet for how we handle unstable features, and hopefully the team can iron some of that out soon. Regarding tests, Lines 1816 to 1819 in 3d8c86e
It doesn't look like crates.io/src/tests/builders.rs Line 472 in 3d8c86e
Once the crates are published, then tests usually query API endpoints (like search or crate#show) to verify the public data. In the next example, the first line also captures Lines 1595 to 1603 in 3d8c86e
|
Hi @jtgeibel, don't think I can attend the meeting, but let me know what you come up with. In the meantime, I'll see if I can figure out a test for this functionality. |
Do we know what impact this will have on older cargo's? |
@djc I'm trying to figure out the impact of this change, so I'd like to ask for some context.
I'll probably have more questions until I fully get this, but let's go with these for starters. :) |
@smarnach thanks for taking a look!
The way I see it the flag |
I don't! cargo has known about |
@djc Thanks for the clarifications! Thinking about your answer for the first bullet point, I realize that implicitly defined features aren't new – we already have them. I'll double check how they are currently handled. We probably need further changes in the crates.io codebase to make sure the names in the form We also need clarity about backwards compatibility before we can merge this, so there is still a bit of work left. :) |
Sure, I'm happy to do the necessary work -- but am very happy to get some mentoring on what exactly the work is that needs to be done. |
@djc It looks like there isn't full clarity yet how exactly the feature should work. We should first clarify what exactly we want before implementing something that's hard to revert in crates.io. I'll comment on the tracking issue as well. |
I am also happy to help with anything regarding this PR. |
☔ The latest upstream changes (presumably #2510) made this pull request unmergeable. Please resolve the merge conflicts. |
@djc @ehuss is this PR still relevant? given that rust-lang/rfcs#3143 has proposed to stabilize the cargo feature without our API explicitly supporting it, I'm wondering if this change is really needed on our side. 🤔 |
I think this PR can be closed. I am preparing a new one that accommodates the new syntax. I have it mostly finished, I've just been working on thoroughly testing it. |
awesome, thank you! :) |
See description of the unstable cargo feature here:
https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#namespaced-features
I would like some mentoring on how/where to add tests for this. Ideally in my mind we'd have some kind of end-to-end test that we can publish a crate that makes use of the new explicit dependency features. I did search for tests around the features aspect, but didn't find any.