Skip to content

list-available gives results that are not available to install #306

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

Open
patricktcoakley opened this issue Apr 6, 2025 · 5 comments
Open

Comments

@patricktcoakley
Copy link
Contributor

patricktcoakley commented Apr 6, 2025

I haven't checked every version, but if I do swiftly list-available 2 I get

Available Swift 2 release toolchains
------------------------------------
Swift 2.2.1
Swift 2.2.0

but when I run swiftly install 2.2.1 I get

Installing Swift 2.2.1
Error: Swift 2.2.1 does not exist at URL /swift-2.2.1-release/xcode/swift-2.2.1-RELEASE/swift-2.2.1-RELEASE-osx.pkg, exiting

It would also be nice if the error posted the full URL of the release it's failing on.

@cmcgee1024
Copy link
Member

@patricktcoakley swiftly relying entirely on the swift.org API for this. If there's a discrepancy in the API then I think that this issue belongs on the swift-org-website repository.

@patricktcoakley
Copy link
Contributor Author

Ok, feel free to close and I'll make an issue there.

@patricktcoakley
Copy link
Contributor Author

patricktcoakley commented Apr 7, 2025

I will say though that the Swift API seems to give us:

 {
    "name": "2.2.1",
    "tag": "swift-2.2.1-RELEASE",
    "xcode": "Xcode 7.3.1",
    "xcode_release": true,
    "xcode_toolchain": false,
    "date": "2016-05-03",
    "platforms": [
      {
        "name": "Ubuntu 14.04",
        "platform": "Linux",
        "archs": [
          "x86_64"
        ]
      },
      {
        "name": "Ubuntu 15.10",
        "platform": "Linux",
        "archs": [
          "x86_64"
        ]
      }
    ]
  }

which to me indicates that Swiftly is not taking into account the architecture/platforms when displaying the available toolchains and would argue that it is more on the Swifty side than the Swift website since it may very well be that those releases do have downloads, just not for the platform I was running at the time.

@cmcgee1024
Copy link
Member

@patricktcoakley when you ran the above list-available command, I'm assuming that you were on macOS at the time? This JSON does seem to indicate that there is a macOS toolchain from 2016 available, it's just that the download URL couldn't be figured out for it, for possibly historical reasons. As a default, all swift releases have a macOS toolchain, so there's no need for swiftly to inspect the platforms list when running on macOS.

@patricktcoakley
Copy link
Contributor Author

Now I see what you mean now, thanks. Yeah I used the Swift OpenAPI docs to get the releases JSON, but I didn't notice the Xcode property that determines it, but I can go ahead and log an issue on the site repo, just wanted to make sure I didn't miss something.

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

No branches or pull requests

2 participants