8000 make each project a workspace by joseluis · Pull Request #3 · PacktPublishing/Asynchronous-Programming-in-Rust · GitHub
[go: up one dir, main page]

Skip to content

make each project a workspace #3

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joseluis
Copy link
Contributor

This fixes the error "current package believes it's in a workspace", if the repository was cloned inside the directory structure of another workspace, as explained in cargo issue 5418.

It doesn't affect anything else and will make the projects compile more reliably under those special conditions.

This fixes the error "current package believes it's in a workspace",
if the repository was cloned inside the directory structure of another
workspace, as explained in cargo issue 5418.

It doesn't affect anything else and will make the projects compile more
reliably under those special conditions.
@cfsamson
Copy link
Collaborator
cfsamson commented Feb 12, 2024

Thank you for submitting and suggesting this change. I'm reluctant to make so big changes at this point since I've been testing everything extensively until the release and won't risk doing anything without testing everything again. This all seems good, though, and I can't see any problems with it. I'll leave the PR here so I can include it if and when I make larger changes and re-test everything at a later point.

Does cloning the repository into an existing workspace have any advantages that I might be unaware of?

@joseluis
Copy link
Contributor Author

No advantage in cloning a repository inside an existing workspace, just that if you choose to do so you encounter that error. This happens to me sometimes. And since this project has a lot of nested manifest files I thought it could be nice to prevent that problem from arising for any other readers.

Of course the simple solution is to clone/move the project's directory elsewhere, and one can also modify the manifests recursively with a one-liner like: find . -type f -name "Cargo.toml" -exec sed -i '1s/^/[workspace]\n/' {} \; so maybe this PR is not needed after all.

Please feel free to close this if you think it's more noise than signal

@cfsamson
Copy link
Collaborator

Thanks for being patient. Let's keep this open for now, maybe there are others in the same situation and while I'm a little bit reluctant to make significant changes at the moment, I see no problem of adding this in the future.

@cfsamson cfsamson added enhancement New feature or request second edition Issues that should be considered for an eventual second edition of the book labels Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request second edition Issues that should be considered for an eventual second edition of the book
Development

Successfully merging this pull request may close these issues.

2 participants
0