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

Fix: Not all projects have a root package #61

Merged
merged 2 commits into from Feb 17, 2020
Merged

Fix: Not all projects have a root package #61

merged 2 commits into from Feb 17, 2020

Conversation

phil-opp
Copy link
Member

Since #57, we try to read the config from the root package of the workspace, instead of just defaulting to the first package. The problem with this is that the new code assumes that there is always a root package in the workspace, which is not true when only a virtual manifest is used at the root.

With this pull request we no longer error for such workspaces. Instead, we emit a warning that no cargo-xbuild configuration is applied and use the default config. This isn't optimal, but there is no canoncial place to read the config from and I can't think of a better approach.

To ensure that future config related errors are easier to debug, this pull request also prints the underlying cause for config load errors.

Fixes #60

@phil-opp
Copy link
Member Author

@ascjones This changes the code that you introduced in #57. Could you test whether your use case still works with this PR?

Copy link

@ascjones ascjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that still works for me thanks. Sorry should have thought of the case of the virtual manifest. Still, this is much improved now with the warning, where previously it would have silently used the default config.

@phil-opp
Copy link
Member Author

Thanks for verifying that it still works! I didn't think of virtual manifests either, so no worries!

Still, this is much improved now with the warning, where previously it would have silently used the default config.

I fully agree!

@phil-opp phil-opp merged commit b18e90b into master Feb 17, 2020
@phil-opp phil-opp deleted the fix-60 branch February 17, 2020 14:23
phil-opp added a commit that referenced this pull request Feb 17, 2020
@phil-opp
Copy link
Member Author

Published as version 0.5.25

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 this pull request may close these issues.

error: parsing package.metadata.cargo-xbuild section failed
2 participants