-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
override "current package believes it's in a workspace" #5418
Comments
It sounds like |
I guess that's a workaround, but modifying the outer crate (the one that's interfering with my ability to build the one I just created) is not an ideal solution. The error message is non-intuitive (the crate "believes"? based on what evidence? since when do TOML files have beliefs??) and hampers quick experimentation. |
I ran into this here, #5421 which arnavion suggested on IRC is a duplicate of this one. I worked around the issue by adding a: [workspace]
members = [] to the crate in question. |
Yeah, the current solutions to this are
I wonder if |
The error message should at least mention the current solutions, I did not know about exclude, it would have been an option for me as well. |
This still gets me every time. Would a PR to change the behavior of |
I think if it's conditional on being nested in another crate, then yes, allowing regular |
Add more suggestions on how to deal with excluding a package from a workspace. Closes #5418
Fix cargo tests when running inside the rustlang/rust repo It seems we hit rust-lang/cargo#5418, so I've applied the suggested solution. Also added some more info when cargo-metadata fails to execute. (there was no open issue for this) changelog: none
I encountered similar error where I added flipper smart contract folder |
I hit this problem today and modifying either manifest is not an option (setting an environment variable would be). It seems the only workaround for me is to make the directory structures of the two projects disjoint. |
If you create a crate inside another one, sometimes you get the above quoted error when trying to build it.
As far as I can tell, there's no solution. You can never build the crate because it's not really in the workspace, yet you can't build it separately either. The only recourse is to move the whole thing to another directory.
I propose a new flag, called something like
--no-workspace
or--believe-nothing--reality-is-fake--just-build-here
, that would ignore the surrounding workspace and build the crate as it would have done before workspaces were invented. Does this make sense?The text was updated successfully, but these errors were encountered: