-
Notifications
You must be signed in to change notification settings - Fork 108
Dependency management #251
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
Conversation
Thanks @awvwgk, implementation looks nicely done. Apologies I'm not very familiar with
|
Thanks for testing, I'm still experimenting with a useful lock file format and possible update procedure. Right now the lock file is only descriptive to see how reusing information between two separate runs can work and acts more like a hash table to avoid having several versions of the same dependency around. Getting the actual commit after fetching a git dependency is still something to do. Finding a good fpm package to test is also quite a challenge, I use |
- fpm-update will fetch all dependencies when called - to force an update the `--all` flag can be used - dependencies are stored in build/cache.toml
I think I found a stable way to actually handle the dependency update for now. I renamed the The update command supports three modes now:
The more difficult part will be the creation of unit tests for this, without actually requiring to fetch some git repositories. |
There are two ways to design such code to make it unit testable. In a functional style, the code returns the commands/actions it would like to be executed, and some other code further up the call chain is responsible for actually executing them. In this way the unit tests can check that the code is returning the correct actions. In an object oriented style, the code makes use of an abstract derived type to execute the necessary commands/actions. In the "production" code the caller supplies a version which just executes the actions, but in the test code a version is provided which only records the actions without executing them so that the test can check them. |
I'll give this another try. I'll keep the command-line interface but use an iterative implementation rather than a recursive one. |
Opening this for discussion and feedback.
For a detailed documentation have a look at
src/fpm/dependency.f90
--all
flag can be usedbuild/cache.toml
, internal file for now, not part of the user APIRequires #247
Related #121