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.
Fixes #837 #799 (also targeting #838).
tl;dr fpm does never update a project's cached dependencies unless forced to do so via
fpm update
.This is wrong as dependencies may change in the manifest and the user should not have to manually do it every time.
With the current PR:
The ability to update dependencies is propagated to
fpm build
:https://github.com/perazz/fpm/blob/063148259fc4745f60c8e3d253c803b3e09ace38/src/fpm.f90#L63-L70
When
cache.toml
is present, the old dependency tree was only loaded from it. New dependencies would be added from scratch (id==0), but cached dependencies (id>0) would be left as-is. Now, instead of just finding the ID of a cached dependency, fpm will check if it has changed, and request an update if sohttps://github.com/perazz/fpm/blob/063148259fc4745f60c8e3d253c803b3e09ace38/src/fpm/dependency.f90#L373-L389
This resolves changes in
fpm.toml
automatically and should be easily integrated with the local registry cache (#817 @minhqdao). @certik please let me know about the module contents problems (#838), I'm happy to help.