SlackKit icon indicating copy to clipboard operation
SlackKit copied to clipboard

Dependency resolution in a new Vapor App

Open iainsmith opened this issue 3 years ago • 0 comments

Hey, sorry this is a bit rushed. Thanks for the great package. I hit a dependency resolution issue when trying to use this in a new Vapor Project (on 4.55.0).


Steps to reproduce

  • vapor new TestProject
  • Add SlackKit
  • see error below

I think the issue is in the dependency on an older version of WebSocket, which now has a 2.0.0 that's incompatible with the latest vapor.

One option that might be nice could be to have 2 packages that people could depend on

  • SlackAPI - No dependencies
  • SlackKit - Dependencies on Swifter, StarScream, etc

That would avoid the dependency hassle for consumers who want to just hit the Slack API, but would probably be a bit more work to maintain.

Workaround

I've published a 5.0.0 workaround tag over on my fork that removes the libraries/targets I didn't need. Posted in case anyone else hits this issue.

  Dependencies could not be resolved because root depends on 'fluent' 4.0.0..<5.0.0 and root depends on 'SlackKit' 4.8.1..<4.9.0.
  'SlackKit' is incompatible with 'fluent' because 'SlackKit' >= 4.8.1 practically depends on 'swift-nio' 1.9.5..<2.0.0 (1).
  'fluent' >= 4.0.0 practically depends on 'swift-nio' 2.0.0..<3.0.0 because 'fluent' 4.4.0 depends on 'fluent-kit' 1.16.0..<2.0.0 and 'fluent-kit' >= 1.16.0 depends on 'swift-nio' 2.33.0..<3.0.0.
  'fluent' {4.0.0..<4.4.0, 4.4.1..<5.0.0} practically depends on 'swift-nio' 2.0.0..<3.0.0 because 'fluent-kit' >= 1.0.0-rc.2.2 depends on 'sql-kit' 3.1.0..<4.0.0 and 'sql-kit' >= 3.0.0-beta.1 depends on 'swift-nio' 2.0.0..<3.0.0.
  'fluent' {4.0.0..<4.4.0, 4.4.1..<5.0.0} practically depends on 'fluent-kit' 1.0.0..<2.0.0 because 'fluent' 4.3.0..<4.4.0 depends on 'fluent-kit' 1.12.0..<2.0.0.
  'fluent' {4.0.0..<4.3.0, 4.4.1..<5.0.0} practically depends on 'fluent-kit' 1.0.0..<2.0.0 because 'fluent' 4.0.0..<4.3.0 depends on 'fluent-kit' 1.0.0..<2.0.0 and no versions of 'fluent' match the requirement 4.4.1..<5.0.0.
  'websocket' 1.1.0..<2.0.0 practically depends on 'swift-nio' 1.9.5..<2.0.0 because 'websocket' 1.1.0..<2.0.0-beta.1 depends on 'swift-nio' 1.9.5..<2.0.0 and no versions of 'websocket' match the requirement 2.0.0-beta.1..<2.0.0.
     (1) As a result, 'SlackKit' >= 4.8.1 practically depends on 'swift-nio' 1.9.5..<2.0.0 because 'SlackKit' >= 4.8.1 depends on 'websocket' 1.1.2..<2.0.0.

iainsmith avatar Feb 03 '22 14:02 iainsmith