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
Include incompatible dependencies in outdated
output
#2254
Conversation
Replaced map() + flatten() with flatMap().
d463047
to
2367642
Compare
Hi, I'm having a few questions: Regarding the points raised by @mdiep in #1369 (comment)
If i'm understanding correctly, the same does not work even before this PR. Carthage throws an error (
E.g.
Regarding testingAny hints how I would mock a Cartfile, Carfile.resolved and Latest Versions with specific Versions for a testcase? |
If it's broken before, then I guess fixing it isn't a prerequisite here. But it'd be nice. 😉
Ideally, it would fetch the branch and show you only if the branch resolves to a different SHA now. But failing that, I think it could just be omitted.
Maybe look at |
When this is ready to be reviewed, please leave a comment saying so. |
|
||
|
||
// swiftlint:enable identifier_name | ||
private struct DB { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This DB struct is copied 1:1 from ResolverSpec
. Should it rather be extracted into a separate file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please extract it and the github1
, github2
, etc. 👍
@mdiep yup, will do! I still have to fix at least the issue with branches (the second note). |
…ositive outdated output
outdated
outputoutdated
output
@mdiep this is now ready for review! 🎉 |
@mdiep 🏓 |
|
||
|
||
// swiftlint:enable identifier_name | ||
private struct DB { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please extract it and the github1
, github2
, etc. 👍
Sorry for the delay! This is looking good. Just need to extract the |
carthage outdated
now lists all dependencies, even those that will not be updated because of the specified version in the Cartfile.The output shows the current version, the latest compatible version to which the dependency will be updated when running
carthage update
as well as the latest available version.Showing incompatible updates is very helpful to get a complete overview about a projects dependency. This is also the same behaviour as all the other dependency managers that I know of (E.g. Cocoapods, npm, yarn, bundler, ...).
In a follow-up PR (#2257) I will also add colors to the output to make it easier to read (which is also the behaviour of other existing dependency managers).
This PR is a continuation of #1369 (resolving #1260) which has not seen progress since more than a year.
I resumed the work from @mattprowse's branch to keep his commits, but in the meantime the codebase has changed considerably so I had to redo the most part. Actually, once I discovered that
Resolver
already does everything necessary, thelatestDependencies
all of a sudden was only 3 lines long 😌Breaking Change
I had to change the signature of
Project.updatedResolvedCartfile
which is a public function in CarthageKit. In Carthage/CarthageKit it is not called from outsied ofProject
but since its public I don't know if it may be used somewhere else.Earlier Comments
The two comments by @mdiep mentioned in #1369 (comment) have been discussed further down in this PR:
Since this issue is not caused by this PR (it also happens before this PR), I will not try to fix it here.
This has been taken care of in 5279bce