Open JetForMe opened 2 years ago
This feature is essential for projects with many internal dependencies, which should take the latest available version, but ignore public repository dependencies. Is this a bug or a missing feature?
cc @neonichu
Could one of you clarify if the other dependencies are also updated to newer versions/commits or if we're just visiting them and updating the cached repos coincidentally? I believe the later is expected behavior and --skip-update
might be the way to get the desired behavior.
I don't have time to try to set that up right now, and I'm not even sure how I would. You'd have to specify an "up to" style dependency, get one version of at least two repos, then publish new versions of each, and then run the update on a single dependency, and see if it updates both.
But I really don't want it to even visit the others and update caches, because it takes so much time. Just do the minimal amount of work to update the one I ask for. In fact, you might not even want to update sub-dependencies that don't need to be updated, but the option to have it do so might be useful. Then again, if you're updating to a new version of a dependency, it should have its own declaration of sub-dependencies suitably changed if it needs it.
Description
I frequently want to update a single dependency, using
swift package update <some package>
. However, when I do this, it seems to visit every dependency, which takes a lot of time.For example:
It would be nice if it just visited the one dependency (and any sub-dependencies).
Expected behavior
I would expect only the named packages to be checked and updated (along with any sub-dependencies).
Actual behavior
Seems like it ignores the specified package names.
Steps to reproduce
In a Swift project with multiple dependencies, try updating a single one.
Swift Package Manager version/commit hash
5.6.2
Swift & OS version (output of
swift --version && uname -a
)$ swift --version && uname -a Swift version 5.6.2 (swift-5.6.2-RELEASE) Target: aarch64-unknown-linux-gnu Linux furnace 5.10.103-v8+ #1530 SMP PREEMPT Tue Mar 8 13:06:35 GMT 2022 aarch64 GNU/Linux
Note that this is also the case on macOS.