-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Allow Cargo Targets in Virtual Workspaces #16949
Copy link
Copy link
Open
Labels
A-workspacesArea: workspacesArea: workspacesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-testS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.
Metadata
Metadata
Assignees
Labels
A-workspacesArea: workspacesArea: workspacesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-testS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
No status
Problem
I want to add tests and examples to my virtual workspace, not in one of its member crates.
Cargo v1.95 simply ignores any tests and examples in the default folders of the virtual workspace.
This does make sense because there is no auto discovery without a package.
Proposed Solution
I want to be able to add tests and examples even without a workspace root package, ergo a virtual workspace. Ergo adding
auto*fields to[workspace].To make this work effectively it would also require adding Cargo targets in a virtual workspace, e.g.
[[test]]and[[example]].[dev-dependencies]and[lints]would also be great.Notes
The current workaround is to add a placeholder package to make it a non-virtual workspace:
This does also not require a placeholder library or binary, so its a very minimal workaround.