Xcode does not show latest version for packages tagged with 10 as a major version

Number:rdar://FB11991841 Date Originated:February 15, 2023
Status:Resolved Resolved:Yes – Xcode 15 Beta 1
Product:Xcode Product Version:14.2
Classification: Reproducible:Yes
This issue involves Xcode’s integration with Swift Package Manager. I had filed an issue on the open-source swift-package-manager repo but I think this issue is within Xcoderather than SPM itself. More context in https://github.com/apple/swift-package-manager/issues/6143

Xcode does not show the correct latest tag when the package being added has `10` as a major version. In my example, I have a package tagged with `9.0.0` and `10.0.0`. When adding it in a client project, one would expect `10.0.0` to show as the current major version to pin at, but Xcode keeps showing `9.0.0`.

### Reproducing the issue

1. Create a package and host it on a repo
2. Push a tag with a major version under `10` (e.g. `9.0.0`)
3. Push a tag with a major version of `10` (e.g. `10.0.0`)
4. In a client project, add the package via Xcode.
5. On the package preview page, selecting the _Up to Next Major Version_ dependency rule will pin 9.0.0 as the current major version. **This is unexpected as the latest version is 10.0.0.**

Here is a repro project with instructions: https://github.com/ncooke3/MyPackage. Try adding it as a package to see the unexpected tag behavior.


This now works as expected in Xcode 15 Beta 1.

I downloaded Xcode 15 Beta 1 and report that the issue appears to be fixed.

By nickcooke at June 6, 2023, 5:10 p.m. (reply...)

Feedback report has since been updated by someone from Apple:

"Potential fix identified – For a future OS update"

By nickcooke at May 25, 2023, 4:08 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!