Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-15461] SwiftPM show dependencies should not output irrelevant information #4377

Open
swift-ci opened this issue Nov 9, 2021 · 0 comments
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Nov 9, 2021

Previous ID SR-15461
Radar None
Original Reporter junyan (JIRA User)
Type Bug
Environment

macOS v11.6

swift-driver version: 1.26.9 Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)

Additional Detail from JIRA
Votes 1
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: 2fecb0601494f60ab552c4213216a627

Issue Description:

Running following command should output nothing other than the JSON result:

swift package show-dependencies --format json  

However it will print out info such as fetching external dependencies if cache does not exist. This makes parsing the command line output more difficult and less performant, thus create a lot of friction to develop tooling on top of SwiftPM.

Sample expected output:

{ 
   "name": "Views", 
   "url": "<url of the package>", 
   "version": "unspecified", 
   "path": "<path of the package>", 
   "dependencies": [...] 
}

Sample actual output:

Fetching https://github.com/apollographql/apollo-ios.git from cache Fetching https://github.com/stephencelis/SQLite.swift.git from cache Fetched https://github.com/stephencelis/SQLite.swift.git (1.20s) Fetched https://github.com/apollographql/apollo-ios.git (1.22s) Computing version for https://github.com/apollographql/apollo-ios.git Computed https://github.com/apollographql/apollo-ios.git at 0.49.1 (0.93s) Computing version for https://github.com/stephencelis/SQLite.swift.git Computed https://github.com/stephencelis/SQLite.swift.git at 0.12.2 (0.72s) Creating working copy for https://github.com/apollographql/apollo-ios.git Working copy of https://github.com/apollographql/apollo-ios.git resolved at 0.49.1 Creating working copy for https://github.com/stephencelis/SQLite.swift.git Working copy of https://github.com/stephencelis/SQLite.swift.git resolved at 0.12.2
{ 
    "name": "Views", 
    "url": "<url of the package>", 
    "version": "unspecified", 
    "path": "<path of the package>", 
    "dependencies": [...] 
}
@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants