-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
On Forc.toml change, forc should try to update only package nodes that appear in the lock::Diff #1686
Conversation
There are still some unnecessary calls to functions and duplicate code pieces, will be cleaning up and marking this as ready to review 🎉 |
Realized a bug while removing the packages. The |
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.
Great work @kayagokalp! I've left a few comments but for the most part I think this is on the right track.
As a side-note: looks like there's a lot of duplicated code between BuildPlan::validate
and BuildPlan::get_difference_with_manifest
🤔 Seeing as the only role of validate
was originally to check if the package sets match, perhaps we can just rename validate
to diff_manifest
and alter it to return the difference in packages?
@mitchmindtree I did the clean-up you asked for and I think currently it looks a lot better, thanks for the great review! Merging this will also close #1778, if the solution applied is acceptable. |
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.
Definitely much closer! I've added a few more things that should be addressed first
…ge removal will triger complete fetch
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.
Looking great to me! Awesome work @kayagokalp :)
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.
Yeah this is really great @kayagokalp, nice work
I will be simplifying and refactoring the code a little bit more so leaving this as a draft for now.closes #900.
About the PR
Before this PR, forc was re-fetching all the dependencies once there is a mismatch between the lock file and the manifest.
For more context about the implementation please take a look into the discussion at the #900 and particularly this comment.
Basic Overview of What is Happening
To test:
forc init --library child
forc init parent
forc build
in the parent directory to build it before depending on the child.forc build
in the "parent" directoryThis test procedure will be resulting in the following dependency graph: