2

I am trying to use the following package in a project:

https://github.com/richardtop/CalendarKit.git

When I try adding the package via the Swift Package Manager, I get an error about toolchain versions (please see the pic below). I am using XCode 12.4, and my computer is too old to install 12.5.

I tried installing the latest toolchain, but it did not resolve the problem:

Old toolchain error next to new toolchain

Does anyone know if I can get the package to recognize the v5 toolchain I installed?

Richard Topchii
  • 7,075
  • 8
  • 48
  • 115
spheroidic
  • 199
  • 7

2 Answers2

1

Yes!

In this case, repo tags can be your friend.

One of my own computers is also (hopefully only temporarily) stuck at Catalina and XCode 12.4, so I was able to add this package to a repo by specifying a (slightly) older version from the list of tagged versions:

Enter In GitHub Repo URL

Enter Tag in here

I entered in version 1.0.8 into the "Rules" section, but SPM picked up version 1.0.9, which is likely to be the last version that works with Xcode 12.4.

And here it is, ready to go!

Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
  • 1
    Hi Michael - thanks for the answer! I will give this a shot. I did consider using an older version of the package. I was hoping to use the latest release. For example I noticed that a recent commit fixed a memory leak. Do you know if it's possible to get the package to recognize the new toolchain I installed? I think this is really what I've been wondering, I'll edit my question to reflect this! – spheroidic Sep 14 '21 at 14:41
  • Welp, there's a risk that something built targeting Swift 5.5 or Swift 6 just simply will refuse to compile with an older compiler. – Michael Dautermann Sep 14 '21 at 16:55
  • Dang too bad. I guess it may be time to start saving for a new computer. – spheroidic Sep 14 '21 at 21:09
  • Yeah, I'm waiting for an appropriate M1-chipped desktop before I upgrade (just like you are). :-) – Michael Dautermann Sep 14 '21 at 21:10
0

I've updated the toolchain to 5.3, so now there should be no problems of installing CalendarKit with that Swift Toolchain version.

Richard Topchii
  • 7,075
  • 8
  • 48
  • 115
  • 1
    Hi Richard - thanks for the answer! I did as you suggested and was able to add the package. I will submit a pull request as well. – spheroidic Sep 14 '21 at 21:08
  • OK, please submit the PR, feel free to mark this answer as accepted, since the library will be now supporting Swift Tools 5.3 – Richard Topchii Sep 14 '21 at 21:37