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

Alternative interoperable output format to stack dot #4837

Closed
mboes opened this issue May 24, 2019 · 3 comments · Fixed by #4994
Closed

Alternative interoperable output format to stack dot #4837

mboes opened this issue May 24, 2019 · 3 comments · Fixed by #4994

Comments

@mboes
Copy link
Contributor

mboes commented May 24, 2019

Stack can tell you what the dependency graph for the transitive closure of all your packages looks like, using the stack dot command, but only in GraphViz format. That's fine for the purposes of visualization by the end user, but brittle for other machines to parse.

We could have say stack ls dependencies --graph, that lists the dependencies together with their direct dependencies, i.e. an adjacency list. Either something like

conduit: base bytestring directory exceptions ...
primitive: base ghc-prim transformers

or as JSON output:

{ "conduit": ["base", "bytestring", "directory", "exceptions", ...], "primitive": [...]}

cc @aherrmann

@qrilka
Copy link
Contributor

qrilka commented May 26, 2019

@mboes I suppose #4424 won't solve this issue as it's supposed to output flat dependency list?

@mboes
Copy link
Contributor Author

mboes commented May 26, 2019

If #4424 ends up including the dependencies of each item in the list, then that should work fine yeah.

@akshaymankar
Copy link
Contributor

Hi, I was almost done with #4424, when I saw this so I decided not to add more things in it.

I think this should be trivial to add to ls dependencies json. I'd be happy to implement this.

I propose adding dependencies field to each package listed in the JSON. This field will have an array with just the names of all dependencies of the package as the issue specifies. Let me know if this works or if there are better ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants