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

Have an option to determine recursive package dependencies. #89

Open
rajudev opened this issue Feb 4, 2018 · 11 comments

Comments

Projects
None yet
3 participants
@rajudev
Copy link
Contributor

commented Feb 4, 2018

While running dh-make-golang <package-name> , we get a list of dependencies which are still not in Debian.
Then we have to do the same thing for all the dependencies and there sub-dependencies on multiple hierarchies manually.

It would be great if dh-make-golang has an optional flag, may be -r or something like --recursive-dependencies so that it can generate the whole dependency tree.

A simple text hierarchical output of the dependency tree is fine as well. The functionality can be further enhanced to provide an image file of the dependency tree, some thing like this

@stapelberg stapelberg self-assigned this Feb 15, 2018

stapelberg added a commit that referenced this issue Feb 15, 2018

@stapelberg

This comment has been minimized.

Copy link
Contributor

commented Feb 15, 2018

Implemented the estimate command, which should do the trick. Leaving this issue open until -git_revision is supported. Issue #88 is a somewhat related usability improvement.

@rajudev

This comment has been minimized.

Copy link
Contributor Author

commented Feb 16, 2018

Like, already. I was planning to start working on this.

Anyways, it would have taken me ages. Glad you implemented it.
Will test the functionality in sometime.

@stapelberg

This comment has been minimized.

Copy link
Contributor

commented Feb 18, 2018

dh-make-golang estimate github.com/jinzhu/gorm doesn’t list the test-only dependency github.com/erikstmartin/go-testdb (packaged in golang-github-erikstmartin-go-testdb-dev).

I think we’ll need to add TestImports and XTestImports to the go list template.

stapelberg added a commit that referenced this issue Mar 1, 2018

@rajudev

This comment has been minimized.

Copy link
Contributor Author

commented Apr 5, 2018

Is the go estimate <package-name> reliable for use now?
Also while estimating dependencies for a package.
I just got a list of packaged and un-packaged dependencies, instead of the tree graph that we planned.
A list just gets which packages are not yet done, without letting me know which package depends on what.
Am I missing something, or that is yet to be implemented.

@stapelberg

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2018

The estimate command is ready to use.

Which package are you running this on that a tree is required instead of a list?

@rajudev

This comment has been minimized.

Copy link
Contributor Author

commented Apr 5, 2018

Well running it for http://github.com/zyedidia/micro
It has dependencies and dependencies has there own dependencies .
I have already determined the dependency tree manually. It is just that I am testing the estimate option if it could have saved me the manual work.

@rajudev

This comment has been minimized.

Copy link
Contributor Author

commented Apr 6, 2018

Using the estimate command complains for the digraph tool not being present.
May be we should add golang-golang-x-tools as a dependency for dh-make-golang in control.

rajudev@5658cb08429d:~/dev/salsa.debian.org$ dh-make-golang estimate github.com/Debian/dh-make-golang
/bin/sh: 1: digraph: not found
2018/04/06 05:27:50 [/bin/sh -c go list -f '{{.ImportPath}}{{.Imports}}{{.TestImports}}{{.XTestImports}}' ... | tr '[]' ' ' | digraph forward $(go list github.com/Debian/dh-make-golang/...)]: exit status 127

@stapelberg

This comment has been minimized.

Copy link
Contributor

commented May 14, 2018

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898396 is another example for a rather complicated dependency tree. We should likely display the tree as an indented list at least.

stapelberg added a commit that referenced this issue Jun 24, 2018

estimate: print indented tree using the importgraph package
This removes the runtime dependency on digraph(1).

related to #89
@stapelberg

This comment has been minimized.

Copy link
Contributor

commented Jun 24, 2018

Commit 55a1fa2 implements printing an indented tree. Hope that helps.

@rajudev

This comment has been minimized.

Copy link
Contributor Author

commented Jun 26, 2018

@stapelberg thanks a lot for all the work you have done for enabling this feature.
The indented lists is fine and it works nicely. I'll work on it in future to add support for tree style outputs.

@ramantehlan

This comment has been minimized.

Copy link

commented Apr 22, 2019

@rajudev @stapelberg
Hey, I just created this tool GoCheckDeb and golang package github.com/ramantehlan/GoCheckDeb/pkg/gocheckdeb/gocheckdeb.go to address this issue.

This package can return, Graph, Tree and List of Go project dependencies, with tags of whether it is packaged in Debian or not. It also has some other minor features which some people might like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.