Skip to content
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

subcommand update updates from cache list and so still updated deleted dependencies #317

Open
urbanjost opened this issue Dec 19, 2020 · 4 comments
Labels
bug Something isn't working easy Difficulty level is easy and good for starting into this project

Comments

@urbanjost
Copy link
Contributor

A small issue, but starting with a program with a dozen external dependencies and working on it mostly being self-contained
I was down to three external dependencies but an update still continued to refresh all the dependencies I started with, requiring me to either delete the build/ directory or edit the cache list in build/. Relatively easy to work around if you know it has a cache,
and maybe not a typical use case but it would be nice if only currently active dependencies are updated/built/listed .... If an update rebuilt the cache list I think that would be sufficient -- low priority but would be nice if that were "clean" in this respect. Probably not necessary to actually delete the unused dependencies files, that might even be undesirable.

@awvwgk
Copy link
Member

awvwgk commented Dec 20, 2020

There is fpm update --clean for this purpose, this will discard the cache and start from scratch.

@awvwgk awvwgk added the documentation Improvements or additions to documentation label Dec 20, 2020
@urbanjost
Copy link
Contributor Author

Yes; that works great; just considering whether the currently listed dependencies should be referenced instead of the cache.
The behavior of fpm has changed with the cache being added. It stil appears to check the fpm.toml file if a completely new dependency is added but then does not automatically quit building ones no longer referenced. Seemed like the user-facing file (the fpm.toml manifest) should drive what is built and run automatically. If I add something to the fpm.toml file it starts building it; so if I remove something from the fpm.toml file it would be nice if it quit building it. Seems more consistent.

Deleting dependenciesis probably far less frequent than adding them will be but in this case taking a dozen out of the fpm.toml
file and still seeing them build when I tried a few other compilers or a --release build felt surprising and seemed like it might be
some low hanging fruit to improve. update has been working great otherwise. Nice to not have to wipe the build/ directory every time something goes awry or needs updated.

@awvwgk
Copy link
Member

awvwgk commented Dec 20, 2020

Thanks for the feedback, the cache was meant as prototype for the dependency lock file. Since we are automatically adding dependencies we should have the same feature for the deletion of dependencies as well.

@awvwgk awvwgk added bug Something isn't working easy Difficulty level is easy and good for starting into this project and removed documentation Improvements or additions to documentation labels Feb 12, 2021
@awvwgk
Copy link
Member

awvwgk commented Feb 12, 2021

Somewhat related to #355, I'm flattening the dependency tree structure while constructing it, but it should retain the relations between the packages by some means. With a simple sweep one could find disconnected dependencies and delete them from the cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working easy Difficulty level is easy and good for starting into this project
Projects
None yet
Development

No branches or pull requests

2 participants