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

Build on MacOS 12 / Swift tools 5.7.1 #137

Open
lynaghk opened this issue Oct 20, 2024 · 2 comments
Open

Build on MacOS 12 / Swift tools 5.7.1 #137

lynaghk opened this issue Oct 20, 2024 · 2 comments

Comments

@lynaghk
Copy link

lynaghk commented Oct 20, 2024

First, let me say that I'm really thrilled about this app --- it's nice and small, efficient, and has some great features. Thank you for making it!

I wanted to try and fix a bug, but ran into trouble building the app (e2a38b7) on MacOS 12.7.6 --- the latest supported version of XCode on MacOS 12 is XCode 14.2 and I've run into two problems trying to build (details below).

I love that the app supports MacOS 12 and it'd be great if we could build the app there too so that those of us who cannot upgrade our OS can still contribute to the app.

I'm not super experienced in MacOS / Swift development, but if you are open to a PR on this please let me know and I can try and figure it out.

xcodebuild: error: Could not resolve package dependencies:
  Package.resolved file is corrupted or malformed; fix or delete the file to continue: unknown 'PinsStorage' version '3' at '/Users/dev/software/QuickRecorder/QuickRecorder.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved'.

if I delete the Package.resolved, then I run into

xcodebuild -resolvePackageDependencies                                                                                
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Resolve Package Graph

Updating from https://github.com/lihaoyun6/MatrixColorSelector.git

2024-10-20 22:24:18.076 xcodebuild[68011:1300649] Writing error result bundle to /var/folders/95/qw48nmb936d_dh4b3vnblqyc0000gn/T/ResultBundle_2024-20-10_22-24-0018.xcresult
package 'matrixcolorselector' @ 941dcf7e3f9f3e93db5eb4889b4645fb1f0941f6 is using Swift tools version 5.9.0 but the installed version is 5.7.1 in https://github.com/lihaoyun6/MatrixColorSelector.gitxcodebuild: error: Could not resolve package dependencies:
  package 'matrixcolorselector' @ 941dcf7e3f9f3e93db5eb4889b4645fb1f0941f6 is using Swift tools version 5.9.0 but the installed version is 5.7.1 in https://github.com/lihaoyun6/MatrixColorSelector.git
@lihaoyun6
Copy link
Owner

I tried to fix the compatibility of QuickRecorder with lower versions of Swift package managers and compilers. You can pull the latest code and try to compile again.

@lynaghk
Copy link
Author

lynaghk commented Oct 21, 2024

Thanks for the quick reply @lihaoyun6!

I just pulled and tried the latest (cd352bd) but there's still the unknown 'PinsStorage' version '3' error from the Package.resolved file being too new.

If I delete that, I run into

package 'swiftlame' @ e8256a8151594f47f103c742f684253c6c44871d is using Swift tools version 5.9.0 but the installed version is 5.7.1 in https://github.com/hidden-spectrum/SwiftLAME.git

I tried forking this and the KeyboardShortcuts package to change their swift-tools version to be older, but wasn't able to get them to compile. E.g., I get this error trying to run SwiftLAME, which I assume must be some kind of swift language version difference?

image

Since these dependencies are pretty small, my hope is that it should be pretty easy for someone who actually knows Swift to get them building on MacOS 12.

Those changes would need to be either merged upstream or QuickRecorder updated to depend on forks instead.

This forum thread suggests that XCode / Swift package manager doesn't make it easy to support older versions. So if it were my project I'd probably either:

  • include the dependency code directly in my project (i.e., copy/paste what I need)
  • lock the dependencies with git submodules

To make sure it actually works, I'd also set up CI with MacOS 12 + XCode 14.2 (supported by Github Actions).

I know this is a bunch of (very boring) work and I totally understand if you feel it's not in scope for the project.
But if you think it is useful to have in your project for everyone, and you (or another contributor) is willing to put in the work, I'm happy to pay for the Github Actions or another CI service.

Please let me know what you think. And no worries if not, I can always fork and hack something together for me and the six other people still living in 2021 =D

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