sindresorhus / KeyboardShortcuts

⌨️ Add user-customizable global keyboard shortcuts (hotkeys) to your macOS app in minutes
https://swiftpackageindex.com/sindresorhus/KeyboardShortcuts/documentation/keyboardshortcuts/keyboardshortcuts
MIT License
1.94k stars 181 forks source link

Swift 6 Language Mode #180

Open dehlen opened 2 months ago

dehlen commented 2 months ago

First of all thanks for the library and the ongoing maintenance.

I am currently looking at the Swift 6 Language mode. I recognise there a ways to import this library without any issue even when using Swift 6 Language mode. However when building the package itself I found a few errors are thrown. Any plan to lift this packages language mode to 6 and to fix those errors?

Kind regards, David

sindresorhus commented 2 months ago

I just tried building the example app here with Swift 6 mode and I get no errors or warnings from the KeyboardShortcuts package.

I don't plan to look into full Swift 6 mode in this package at the earliest after Xcode 16 final is out (way too many concurrency bugs in Swift 6 at the moment). But you should be able to import this package fine in a Swift 6 project even though this package is not Swift 6.

dehlen commented 1 month ago

Yes as stated above the package works just fine even in a Swift 6 app which depends on this package. My point was rather when adding swiftLanguageVersions: [.version("6")] to the package manifest and building the package directly it encounters various compiler errors. Of course since one can use the package just fine and Xcode 16 isn't even officially released I recognise the fact that this has no priority. But I think it would be nice to have a look at those compiler warnings and fix/or silence them when appropriate once Xcode 16 is released. Feel free to either close due to the timeframe or keep it open as a reminder to have a look at this at a later point.