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

[Suggestion] Add a flag to show outdated packages #7354

Open
BrentMifsud opened this issue Feb 20, 2024 · 6 comments
Open

[Suggestion] Add a flag to show outdated packages #7354

BrentMifsud opened this issue Feb 20, 2024 · 6 comments

Comments

@BrentMifsud
Copy link

BrentMifsud commented Feb 20, 2024

Description

One of the most annoying things about SwiftPM is that there is no way to see which of my packages are outdated.

Using upToNextMajor auto update strategy alleviates this a bit, but this does not help when a package has a major version update.

It would be great if xcode and the swift package cli had a command to quickly list which packages have an update.

Expected behavior

add a new command:

swift package outdated // or whatever name makes the most sense

list all dependencies pulled in by the current project that have available version updates

Actual behavior

this feature does not exist today

Steps to reproduce

n/a

Swift Package Manager version/commit hash

n/a

Swift & OS version (output of swift --version && uname -a)

n/a

@MahdiBM
Copy link

MahdiBM commented Feb 21, 2024

I'm not against such a command but FYI GitHub's Dependabot does support Swift if you're just looking for a way to keep your packages up to date, and you also do use GitHub to host your code.
See this dependabot config as an example.

@BrentMifsud
Copy link
Author

Interesting. I was not aware that Dependabot supported swift.

Thats a good workaround in the meantime, but I do think the tooling itself should have support for this.

Do you know if Dependabot can be setup to work with Xcode projects? Or is it standalone swift packages only?

@MahdiBM
Copy link

MahdiBM commented Feb 22, 2024

Xcode projects are not properly supported yet, but you might be able to workaround that.
See this and a few comments after it: dependabot/dependabot-core#1245 (comment)

@MaxDesiatov
Copy link
Member

@BrentMifsud is there anything in swift package update --dry-run that doesn't satisfy your requirements?

@MaxDesiatov
Copy link
Member

As for Xcode, it's a closed-source product and issues with that should not be reported on this repository. For any Xcode-related issues you should use http://feedbackassistant.apple.com instead.

@BrentMifsud
Copy link
Author

BrentMifsud commented Feb 22, 2024

@BrentMifsud is there anything in swift package update --dry-run that doesn't satisfy your requirements?

So lets say I have a package that has firebase 9.0.0 as one of its dependencies.

The current latest version of firebase is 10.21.0, and the last version update before 10.0.0 is 9.6.0

if I were to run swift package update --dry-run this would be the result:

12 dependencies have changed:
+ googleappmeasurement 9.6.0
+ firebase-ios-sdk 9.6.0
+ abseil-cpp-swiftpm 0.20220203.2
+ boringssl-swiftpm 0.9.1
+ googledatatransport 9.3.0
+ promises 2.4.0
+ nanopb 2.30909.0
+ swift-protobuf 1.25.2
+ leveldb 1.22.3
+ googleutilities 7.12.1
+ gtm-session-fetcher 2.3.0
+ grpc-ios 1.44.3-grpc

from this output, I do not know if any of these dependencies have any further updates available. I only know that I am on the latest 9.x.x version. And if my version was set to exact: 9.0.0, I wouldn't even know if there were any minor updates.

For a large project with tons of dependencies, I would have to manually go through each one, and check the GitHub repo for each to see if there are any updates available.

This was one of the nice things about cocoapods pod outdated command. You could quickly at a glance see which of your dependencies have updates available, and whether those updates are major, minor, or patch updates.

Ideally, I would have liked to see something like this in the output of swift package update:

12 dependencies have changed:
+ googleappmeasurement 9.6.0
+ firebase-ios-sdk 9.6.0 (latest 10.21.0) <- something like this
+ abseil-cpp-swiftpm 0.20220203.2
+ boringssl-swiftpm 0.9.1
+ googledatatransport 9.3.0
+ promises 2.4.0
+ nanopb 2.30909.0
+ swift-protobuf 1.25.2
+ leveldb 1.22.3
+ googleutilities 7.12.1
+ gtm-session-fetcher 2.3.0
+ grpc-ios 1.44.3-grpc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants