-
Notifications
You must be signed in to change notification settings - Fork 36
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 panic when calling parents #72
Conversation
6efd84a
to
a18573e
Compare
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, thanks!
In case a dependency doesn't have a manifest, the parents command panicks as it cannot read the dependencies from the manifest. This fixes the issue, simply ignoring these dependencies.
When the Bender.lock and the manifests do not match, bender can panic. This gives a slightly clearer indication to what the error is.
a18573e
to
092977e
Compare
After further testing in the hero repo I found another bug. These changes should clarify the source of the issue, either a missing manifest or the dependency not listed in the manifest, but the lock file contains it (i.e. mismatched lock file in both cases). |
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.
Would it not be cleaner to return an early Err
from the run
function of the parents
subcommand, instead of inserting dummy entries as in this implementation?
I agree the dummy entries are not the cleanest solution, however I would refrain from explicitly returning errors here as it would reduce the usability of the |
I understand and agree, thanks! |
Added an issue #74 to track this problem, thanks for the review! |
In case a dependency doesn't have a manifest, the parents command panicks as it cannot read the dependencies from the manifest. This fixes the issue, simply ignoring these dependencies.