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

SwiftPM: Support dependency entries with a branch name #8168

Closed
wants to merge 3 commits into from

Conversation

fviernau
Copy link
Member

See individual commits.

Fixes #8167.

@fviernau fviernau requested a review from a team as a code owner January 24, 2024 15:57
This case wasn't covered by any test.

Note: The specifying the branch name has been introduced in
`PackageDescription` version 5.5, which is why the value for
`swift-tools-version` is bumped. The `lockfile` has been updated by
re-creating it from scratch.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Prepare for an upcoming change.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
@fviernau fviernau force-pushed the support-dependencies-with-branch-names branch 2 times, most recently from 7788c7b to cdf4f2b Compare January 24, 2024 16:04
@fviernau fviernau marked this pull request as draft January 24, 2024 20:47
@fviernau
Copy link
Member Author

Converted to draft as it needs some further re-work.

When analyzing a `Package.swift` file, a lockfile either already exists
or gets created during execution of [1]. So, a lockfile is always
present.

Even though an analysis without a lockfile via [1] involves resolving
revisions, the output of [1] does not contain the resolved revisions.
In particular, the output of [1] has "unspecified" as version string for
any dependency whose `Package.swift` entry has a branch name, not a
version.

Always use the resolved revisions as `VcsInfo.revision` in order to
eliminate the "unspecified" version strings and to reflect the result
of the resolution. This aligns with the results produced by `GoMod`
which also performs a resolution during the analysis.

[1] `swift package show-dependencies --fromat json`

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
@fviernau fviernau force-pushed the support-dependencies-with-branch-names branch from cdf4f2b to ec47a8d Compare January 24, 2024 20:49
@fviernau
Copy link
Member Author

I've split out two commits to #8169.

Copy link

codecov bot commented Jan 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d895de6) 67.16% compared to head (ec47a8d) 67.16%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8168   +/-   ##
=========================================
  Coverage     67.16%   67.16%           
  Complexity     2052     2052           
=========================================
  Files           358      358           
  Lines         17166    17166           
  Branches       2462     2462           
=========================================
  Hits          11530    11530           
  Misses         4613     4613           
  Partials       1023     1023           
Flag Coverage Δ
funTest-docker 66.25% <ø> (ø)
funTest-non-docker 33.96% <ø> (ø)
test 37.01% <ø> (ø)

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.

@fviernau fviernau closed this Feb 13, 2024
@fviernau fviernau deleted the support-dependencies-with-branch-names branch February 13, 2024 09:41
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.

SwiftPM: Support remoteSourceControl dependencies which specify the branch (not version)
1 participant