Giter VIP home page Giter VIP logo

Comments (9)

dannys42 avatar dannys42 commented on June 1, 2024

Hi @pitfield , yes you are correct swift-argument-parser is being used by some test/sample CLI commands. But the dependency is clearly not in the library. It's kind of peculiar that SPM would consider it required for packages that depend on this.

from bluesocket.

dannys42 avatar dannys42 commented on June 1, 2024

I just tried building PostgresClientKit. I did not encounter any build issues or dependencies with Swift Argument Parser:

Fetching https://github.com/IBM-Swift/BlueSSLService
Fetching https://github.com/IBM-Swift/BlueSocket.git
Fetching https://github.com/apple/swift-argument-parser from cache
Fetched https://github.com/IBM-Swift/BlueSSLService (1.37s)
Fetched https://github.com/IBM-Swift/BlueSocket.git (1.37s)
Computing version for https://github.com/IBM-Swift/BlueSSLService
Fetched https://github.com/apple/swift-argument-parser (1.45s)
Computed https://github.com/IBM-Swift/BlueSSLService at 2.0.1 (0.43s)
Computing version for https://github.com/IBM-Swift/BlueSocket.git
Computed https://github.com/IBM-Swift/BlueSocket.git at 2.0.2 (0.46s)
Computing version for https://github.com/apple/swift-argument-parser
Computed https://github.com/apple/swift-argument-parser at 0.5.0 (0.49s)
Creating working copy for https://github.com/IBM-Swift/BlueSocket.git
Working copy of https://github.com/IBM-Swift/BlueSocket.git resolved at 2.0.2
Creating working copy for https://github.com/IBM-Swift/BlueSSLService
Working copy of https://github.com/IBM-Swift/BlueSSLService resolved at 2.0.1
Creating working copy for https://github.com/apple/swift-argument-parser
Working copy of https://github.com/apple/swift-argument-parser resolved at 0.5.0
warning: 'bluesslservice': 'bluesslservice' dependency on 'https://github.com/Kitura/BlueSocket.git' conflicts with dependency on 'https://github.com/IBM-Swift/BlueSocket.git' which has the same identity 'bluesocket'. this will be escalated to an error in future versions of SwiftPM.
Building for debugging...
[78/78] Compiling PostgresClientKit LogRecord.swift
Build complete! (9.00s)

I'm building with 5.7, though.

Unrelated note: "IBM-Swift" should now be replaced with "Kitura".

from bluesocket.

pitfield avatar pitfield commented on June 1, 2024

Thank you for taking a look at this.

I think I was unclear; my apologies. PostgresClientKit does not itself use swift-argument-parser. However its dependency on BlueSocket means PostgresClientKit cannot be used in any project already using swift-argument-parser version 1.0.0+.

I have created this repository with a standalone reproducible test case. This fails to build, both on Swift 5.5.2 (on MacOS) and Swift 5.6.2 (Ubuntu 20.04).

Here is the error I see:

% swift --version
swift-driver version: 1.26.21 Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
Target: x86_64-apple-macosx11.0
% swift package reset && swift build               
Fetching https://github.com/apple/swift-argument-parser from cache
Fetching https://github.com/IBM-Swift/BlueSocket from cache
Fetched https://github.com/IBM-Swift/BlueSocket (1.55s)
Fetched https://github.com/apple/swift-argument-parser (1.58s)
Computing version for https://github.com/apple/swift-argument-parser
Computed https://github.com/apple/swift-argument-parser at 1.1.3 (0.03s)
Computing version for https://github.com/IBM-Swift/BlueSocket
Computing version for https://github.com/IBM-Swift/BlueSocket
error: Dependencies could not be resolved because root depends on 'swift-argument-parser' 1.1.3..<2.0.0.
'swift-argument-parser' 0.4.1..<1.0.0 is required because 'BlueSocket' >= 2.0.0 depends on 'swift-argument-parser' 0.4.1..<1.0.0 and root depends on 'BlueSocket' 2.0.0..<3.0.0.

Thank you for the reminder about "IBM-Swift".

from bluesocket.

dannys42 avatar dannys42 commented on June 1, 2024

@pitfield Thanks for the clarification. I wonder if this is because BlueSocket is still using the Swift 5.0 package file format? I see that PostgresClientKit also has a minimum of Swift 5.0. Do you have any objection if I raise the minimum to Swift 5.2?

from bluesocket.

pitfield avatar pitfield commented on June 1, 2024

@dannys42 I forked BlueService, tried switching to the SPM 5.2 grammar, and changed the test case to be dependent on the fork. Unfortunately, I am still getting the same dependency resolution error. Does switching to SPM 5.2 work for you?

I am OK requiring Swift 5.2+ if there is no better option. But is it possible to make BlueService dependent on swift-argument-parser 1.0.0+?

Thanks!

from bluesocket.

dannys42 avatar dannys42 commented on June 1, 2024

@pitfield Thank you so much for testing that! This really seems like an SPM bug to me.

I don't mind bumping the version of Swift Argument Parser, but it is definitely wrong that this shows up as a dependency requirement for people just using the library. I think I will restructure the project so that the example programs have their own Package.swift file to alleviate this issue.

from bluesocket.

dannys42 avatar dannys42 commented on June 1, 2024

Ok, created PR 215: #215

When it passes CI, I'll tag a new release.

from bluesocket.

dannys42 avatar dannys42 commented on June 1, 2024

@pitfield Please try BlueSocket 2.0.3

from bluesocket.

pitfield avatar pitfield commented on June 1, 2024

Works in v2.0.3. Thank you!

from bluesocket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.