-
Notifications
You must be signed in to change notification settings - Fork 37
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
feat: add a utility function that determines whether a part has slices #637
base: main
Are you sure you want to change the base?
feat: add a utility function that determines whether a part has slices #637
Conversation
@tigarmo Ready for review. |
Tagging @cmatsuoka @lengau @mr-cal for review. Failing integreation test is due to network connection issue so it needs a retrigger. |
c71971d
to
71d1b19
Compare
71d1b19
to
727e012
Compare
I have changed the utility function to a property, and added unit tests for it. This is to accomodate the function to how similar functions are unit tested. |
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.
Code looks good, thanks :-)
@linostar could you rebase this on main and resolve the conflicts here? |
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.
LGTM, maybe we could make it slightly more performant with a short-circuit return in has_slice
.
@cmatsuoka @tigarmo Can we merge this PR if there are no further comments, so that we can move forward with canonical/rockcraft#464? |
A utility function is needed in rockcraft to determine whether parts has slices in them.
Instead of implementing such a function in rockcraft, it is better to implement it in craft-parts instead.