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

Workspaces: Cargo commands with explicit package should work from the root of the workspace. #3194

Closed
matklad opened this issue Oct 12, 2016 · 5 comments · Fixed by #3385
Closed

Comments

@matklad
Copy link
Member

matklad commented Oct 12, 2016

Currently most Cargo commands do not work with workspaces. There is #2878 for providing --all flag. However oftentimes you want to execute command only on a single member. --package argument should handle that, but currently cargo test --package foo will give you a virtual manifest error.

@alexcrichton
Copy link
Member

👍

Definitely the intention of workspaces!

@matklad
Copy link
Member Author

matklad commented Oct 15, 2016

Hm, and how should profiles work with workspaces? I am looking at this line and I don't know what to do if we don't have a current package.

One possible solution is to treat a single --package argument as if it specifies the current package, but this won't work if there are several -p specified, or if the package is not from the current workspace.

@alexcrichton
Copy link
Member

Oh that may be a bug from the RFC actually, it was intended that the workspace root configured all the profiles of one compilation.

@matklad
Copy link
Member Author

matklad commented Oct 16, 2016

Can the virtual manifest contain profiles section?

@alexcrichton
Copy link
Member

Hm maybe not currently, but it in theory should be able to, yeah.

@matklad matklad changed the title Cargo commands with explicit package should work from the root of the workspace. Workspaces: Cargo commands with explicit package should work from the root of the workspace. Oct 17, 2016
matklad added a commit to matklad/cargo that referenced this issue Dec 12, 2016
bors added a commit that referenced this issue Dec 13, 2016
Add test for --package and virtual manifest

closes #3194

The issue was actually fixed by #3221 (thanks @euclio !), so let's just add a test (a copy of `virtual_works` basically).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants