Skip to content

feat: treating required-feature as default feature for cli#16852

Closed
cathaysia wants to merge 1 commit intorust-lang:masterfrom
cathaysia:fix4663
Closed

feat: treating required-feature as default feature for cli#16852
cathaysia wants to merge 1 commit intorust-lang:masterfrom
cathaysia:fix4663

Conversation

@cathaysia
Copy link
Copy Markdown

@cathaysia cathaysia commented Apr 8, 2026

What does this PR try to resolve?

fix #4663

This PR changes the semantics of required-features for binary targets, treating them as default features. When --no-default-features is not specified, the features listed in required-features are automatically enabled.

How to test and review this PR?

$ cargo install xidlc # success
$ cargo install xidlc@0.38.0 --no-default-features # failed
$ cargo install xidlc@0.38.0 --no-default-features -F cli -F fmt #  success

fix rust-lang#4663

Signed-off-by: loongtao.zhang <loongtao.zhang@outlook.com>
@rustbot rustbot added A-workspaces Area: workspaces S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 8, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 8, 2026

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, epage, weihanglo

@cathaysia cathaysia changed the title feat: seem required-feature as default feature for cli feat: seen required-feature as default feature for cli Apr 8, 2026
@cathaysia cathaysia changed the title feat: seen required-feature as default feature for cli feat: treating required-feature as default feature for cli Apr 8, 2026
@epage
Copy link
Copy Markdown
Contributor

epage commented Apr 10, 2026

I'm going to close this pending design discussions per our contrib guide. #4663 is marked as S-needs-design and not S-accepted. In particular, this is going in a completely new discussion from previous discussions and needs more work on the proposal.

@epage epage closed this Apr 10, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 10, 2026
@cathaysia
Copy link
Copy Markdown
Author

I noticed that issue dates back about nine years, and there doesn't seem to have been any significant progress. Is there really any chance of further progress?

@cathaysia
Copy link
Copy Markdown
Author

I have no objections to the process itself; however, given that it has been shelved for so long—and rather than getting bogged down in endless disputes—why not implement a version first to see what the response is?

@weihanglo
Copy link
Copy Markdown
Member

Please see #4663 (comment) and the RFC rust-lang/rfcs#3374. There are some technical and design problems needing to resolve and experiment.

why not implement a version first to see what the response is?

I am not sure whether your first version referring to a stable version or not. A PR that aims for insta-stable is unlikely to get merge. Cargo follows a strong compatibility guarantee. That said, you are welcome to experiment and if it is working good we can start from a nightly feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-workspaces Area: workspaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically enable required-features

4 participants