Skip to content

Conversation

@fviernau
Copy link
Member

Unify code paths to simplify and to obtain additional data.

@fviernau fviernau requested a review from a team as a code owner November 18, 2025 10:58
@fviernau fviernau enabled auto-merge (rebase) November 18, 2025 10:58
@fviernau fviernau force-pushed the cocoapods-checkout-options-handling branch from 3f28bb6 to 92261fc Compare November 18, 2025 11:09
val podspec = getPodspec(dependency.name, dependency.version)

val vcs = podspec?.toVcsInfo().orEmpty()
val vcs = checkoutOption?.toVcsInfo() ?: podspec?.toVcsInfo().orEmpty()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gets additional data, such as declared licenses and the source artifact url.

I would have expected adjustments to expected test results because of that, but I guess there's no coverage. Can you confirm this?

Copy link
Member Author

@fviernau fviernau Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just wait for the tests to finish, for the confirmation.
I have not looked into enhancing the tests.

From reading the code a couple of days before, the handling raised question marks which I tried to address here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and gets additional data

I still feel a bit uneasy about that statement, as we cannot prove it via enriched expected results. While theoretically it should be possible to get additional data this way, I would feel better if we could soften the wording here a bit and say e.g. "and might get additional data".

Comment on lines +188 to +187
val revision = commit ?: tag ?: branch ?: return null
val url = git ?: return null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here, just to note that this does not seem to improve any current test data.

@fviernau fviernau force-pushed the cocoapods-checkout-options-handling branch from 92261fc to 52b3bfe Compare November 18, 2025 11:24
@fviernau fviernau requested a review from sschuberth November 18, 2025 11:26
@fviernau fviernau changed the title Cocoapods: Improve the handling for dependencies with checkout options Cocoapods: Improve the handling for dependencies with checkout option Nov 18, 2025
sschuberth
sschuberth previously approved these changes Nov 18, 2025
@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.38%. Comparing base (be610e3) to head (806377a).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #11100   +/-   ##
=========================================
  Coverage     57.38%   57.38%           
  Complexity     1703     1703           
=========================================
  Files           346      346           
  Lines         12825    12825           
  Branches       1214     1214           
=========================================
  Hits           7360     7360           
  Misses         4997     4997           
  Partials        468      468           
Flag Coverage Δ
funTest-no-external-tools 31.17% <ø> (ø)
test-ubuntu-24.04 42.45% <ø> (ø)
test-windows-2025 42.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Improve readability and prepare for an upcoming change.

Signed-off-by: Frank Viernau <frank.viernau@gmail.com>
Prepare for an upcoming change.

Signed-off-by: Frank Viernau <frank.viernau@gmail.com>
Prepare for an upcoming change.

Signed-off-by: Frank Viernau <frank.viernau@gmail.com>
val podspec = getPodspec(dependency.name, dependency.version)

val vcs = podspec?.toVcsInfo().orEmpty()
val vcs = checkoutOption?.toVcsInfo() ?: podspec?.toVcsInfo().orEmpty()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and gets additional data

I still feel a bit uneasy about that statement, as we cannot prove it via enriched expected results. While theoretically it should be possible to get additional data this way, I would feel better if we could soften the wording here a bit and say e.g. "and might get additional data".

The information of podspecs corresponding to dependencies which have a
checkout option has been ignored so far. Unify the code paths, so that
the information from podspecs is always used. This simplifies the code
and might get additional data, such as declared licenses and the source
artifact url. Furthermore, the VCS URL from the checkout option is no
more used as `homepageUrl`, but instead always set to the dedicated
`homepage` field of the podspec. This is more consistent with
integration of other package managers.

Signed-off-by: Frank Viernau <frank.viernau@gmail.com>
Signed-off-by: Frank Viernau <frank.viernau@gmail.com>
If the VCS info in checkout options is incomplete, fallback to the VCS
info from the podspec instead of using a (partially) empty VCS info.

Signed-off-by: Frank Viernau <frank.viernau@gmail.com>
@fviernau fviernau force-pushed the cocoapods-checkout-options-handling branch from c0013c0 to 806377a Compare November 19, 2025 14:34
@fviernau fviernau requested a review from sschuberth November 19, 2025 14:34
@sschuberth sschuberth disabled auto-merge November 19, 2025 15:17
@sschuberth
Copy link
Member

Merging despite the unrelated test failure(s).

@sschuberth sschuberth merged commit 0288b8f into main Nov 19, 2025
25 of 27 checks passed
@sschuberth sschuberth deleted the cocoapods-checkout-options-handling branch November 19, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants