Comments (9)
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.
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.
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.
@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.
@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.
@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.
Ok, created PR 215: #215
When it passes CI, I'll tag a new release.
from bluesocket.
@pitfield Please try BlueSocket 2.0.3
from bluesocket.
Works in v2.0.3. Thank you!
from bluesocket.
Related Issues (20)
- Socket listen failed on iOS 14.0.1 HOT 7
- Is it possible observe connection with client? HOT 1
- Error code: -9980(0x-26FC), No route to host HOT 12
- 'listen' function unable to bind address HOT 2
- Download multiple files HOT 2
- Swift bluesocket Can't get long data ? HOT 18
- Warnings in Xcode 13 HOT 10
- Cannot connect to listening UNIX socket HOT 6
- Error code: -9993(0x-2709), Invalid argument HOT 6
- Get local IP address HOT 1
- Echoserver and JavaScript HOT 3
- Can not receive tcp packets in hotspot HOT 1
- Tcp Incomplete receiving data HOT 1
- Unable to detect closed socket HOT 3
- is there any other
- Reading Less than SOCKET_MINIMUM_READ_BUFFER_SIZE? HOT 1
- A shell task failed with exit code 72 HOT 1
- Task failed with exit code 70
- Postman can not connect to the Example EchoServer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bluesocket.