-
Notifications
You must be signed in to change notification settings - Fork 457
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
rust: add support for workspaces #2842
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ba1c0be
to
d6b80f1
Compare
Tested by building alacritty snap, which makes use of workspaces. |
sergiusens
requested changes
Jan 6, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo and question. Looks pretty good!
If a plugin detects an error prior to attempting to build a part's source, it can raise SnapcraftPluginAssertionError() with a brief reason and optional details. SnapcraftEnvironmentError() was also a viable choice, but it's slated to be nuked and as it is too generic. This seems like a fair middle ground that can be re-used across the the plugins when they make an assertion that fails to check out at runtime. Signed-off-by: Chris Patterson <[email protected]>
Unfortunately, `cargo install` does not support workspaces yet: rust-lang/cargo#7599 Alternatively, we use `cargo build`, which will respect the Cargo.lock configuration. It however, does require a bit more hoop jumping to determine which binaries were built and install them. Introudce _install_workspace_artifacts() to install the built executables into the correct paths. Testing has covered executables and libraries, though dynamic linking is not quite yet supported by the rust plugin (at least in my testing, it will have unmnet dependencies on libstd-<id>.so). We can address that feature gap in the future, but likely doesn't affect snap users because they are probably using the standard linking process which doesn't require libstd (likely due to static linking of those dependencies). `cargo build` has an unstable flag option for `--out-dir` which may simplifiy the install process, but is currently unavailable for stable use: https://doc.rust-lang.org/cargo/reference/unstable.html#out-dir Add/update unit tests for coverage and add a spead test. Signed-off-by: Chris Patterson <[email protected]>
rebased/squashed |
sergiusens
reviewed
Jan 7, 2020
sergiusens
reviewed
Jan 7, 2020
Signed-off-by: Chris Patterson <[email protected]>
Signed-off-by: Chris Patterson <[email protected]>
sergiusens
approved these changes
Jan 8, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.