realm / SwiftLint

A tool to enforce Swift style and conventions.
https://realm.github.io/SwiftLint
MIT License
18.45k stars 2.2k forks source link

Conflict between Swift Testing and Swift Lint #5642

Closed mikeshappell closed 1 week ago

mikeshappell commented 1 week ago

New Issue Checklist

Describe the bug

When attempting to add Swift Lint to a Swift package, which uses Swift Testing (0.10.0), I encountered a conflict between the two packages. The complete message was:

Failed to resolve dependencies Dependencies could not be resolved because root depends on 'swift-testing' 0.10.0..<1.0.0 and root depends on 'swiftlint' 0.55.1..<1.0.0. 'swiftlint' is incompatible with 'swift-testing' because 'swift-testing' 0.10.0 depends on 'swift-syntax' 600.0.0-latest..<601.0.0 and no versions of 'swift-testing' match the requirement 0.10.1..<1.0.0. 'swiftlint' >= 0.55.1 practically depends on 'swift-syntax' 510.0.2..<511.0.0 because no versions of 'swiftlint' match the requirement 0.55.2..<1.0.0 and 'swiftlint' 0.55.1 depends on 'swift-syntax' 510.0.2..<511.0.0.

Therefore, until there is a Swift Lint that works with Swift 6.0, it does not appear that we're able to use Swift Lint as a package plugin.

SimplyDanny commented 1 week ago

Please consume the plugin from this dedicated repository. It comes without any dependencies and so doesn't cause such issues.

mikeshappell commented 1 week ago

Wow! That works perfectly. Thanks for the quick response and pointer!