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-6277] swift package dump-package emits invalid JSON #4930

Closed
swift-ci opened this issue Nov 1, 2017 · 5 comments
Closed

[SR-6277] swift package dump-package emits invalid JSON #4930

swift-ci opened this issue Nov 1, 2017 · 5 comments
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Nov 1, 2017

Previous ID SR-6277
Radar rdar://problem/40205213
Original Reporter helge (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

Apple Swift version 4.0.2 (swiftlang-900.0.69.2 clang-900.0.38)
Target: x86_64-apple-macosx10.9
Xcode 9.1

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

md5: 9bf8ec49d242b66180ab70393b64cc88

Issue Description:

When a package never has been fetched, swift package dump-package doesn't emit proper JSON, but prefixes the output with the fetch/resolve/clone logging of GIT. I suppose that should go to stderr or something?
Anywayz, it defeats the purpose of the tool.

Sample:

helge@ZeeMBP TestApex2 $ swift package --package-path "${SRCROOT}/${PRODUCT_NAME}" dump-package
Fetching git@github.com:helje5/ApacheExpress.git
Fetching git@github.com:helje5/ZeeQLExpress3.git
...
Resolving https://github.com/ZeeQL/ZeeQL3Freddy.git at 0.5.1
{
  "dependencies": [
    {
      "url": "git@github.com:helje5/ApacheExpress.git",
...
@ankitspd
Copy link
Member

ankitspd commented Nov 1, 2017

Yeah I guess that should be fine. Another option is adding an --output-file flag.

@swift-ci
Copy link
Contributor Author

swift-ci commented Nov 1, 2017

Comment by Helge Heß (JIRA)

Not sure I understand, outputting the JSON is the whole purpose of the thing right now?

Maybe the other way around, add a way to dump a presentation for user consumption. Or do that by default and add a -json or sth.
But in no case mix the two ;-)

@ankitspd
Copy link
Member

ankitspd commented Nov 1, 2017

I meant your suggestion sounds fine i.e. outputting git log on stderr and the json on stdout.

@ankitspd
Copy link
Member

@swift-ci create

@ankitspd
Copy link
Member

#1599

@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
This issue was closed.
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