Giter VIP home page Giter VIP logo

getgodependencyhierarchy's People

Contributors

izhakjakov avatar

Watchers

 avatar  avatar

getgodependencyhierarchy's Issues

Cannot trace non-module Go package

Go packages without a go.mod file are included as incompatible in a dependent's go.mod file but not traced by the script.

This was covered in the following issue:

grokify/go-aha#1

For example, when tracing github.com/miekg/dns from github.com/grokify/go-aha v0.2.3, we see the following:

https://github.com/grokify/go-aha/blob/v0.2.3/go.mod

〉ggdh 'github.com/miekg/dns'
                     github.com/grokify/go-aha
                                ⬇
                github.com/grokify/[email protected]
                                ⬇
               github.com/blend/[email protected]
                                ⬇
                   github.com/spf13/[email protected]
                                ⬇
                   github.com/spf13/[email protected]
                                ⬇
  github.com/bketelsen/[email protected]
                                ⬇
              github.com/hashicorp/consul/[email protected]
                                ⬇
                 github.com/hashicorp/[email protected]
                                ⬇
                 github.com/hashicorp/[email protected]
                                ⬇
                   github.com/miekg/[email protected]

Specifically, it calls out the following which happens to be incomplete because a non-module Go package is skipped.

                github.com/grokify/[email protected]
                                ⬇
               github.com/blend/[email protected]

The non-module Go package is github.com/wcharczuk/[email protected]+incompatible and the actual dependency tree looks like the following.

        github.com/grokify/[email protected]
                        ⬇
 github.com/wcharczuk/[email protected]+incompatible
                        ⬇
       github.com/blend/[email protected]

The github.com/grokify/[email protected] go.mod file looks like the following:

https://github.com/grokify/gocharts/blob/v1.16.3/go.mod

module github.com/grokify/gocharts

go 1.16

require (
	github.com/360EntSecGroup-Skylar/excelize v1.4.1
	github.com/blend/go-sdk v1.20211204.3 // indirect
	github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
	github.com/grokify/elastirad-go v0.1.4
	github.com/grokify/mogo v0.32.3
	github.com/jessevdk/go-flags v1.5.0
	github.com/mattn/go-runewidth v0.0.13 // indirect
	github.com/olekukonko/tablewriter v0.0.5
	github.com/pkg/errors v0.9.1
	github.com/valyala/quicktemplate v1.7.0
	github.com/wcharczuk/go-chart v2.0.1+incompatible
	golang.org/x/sys v0.0.0-20211210111614-af8b64212486 // indirect
	google.golang.org/protobuf v1.27.1 // indirect
)

Since github.com/wcharczuk/go-chart v2.0.1 doesn't have a go.mod file, it's necessary to get the code and scan it.

I pulled down the code with:

$ git clone --branch v2.0.1 https://github.com/wcharczuk/go-chart

and then in ran a quick grep command on blend to establish it is used, though a Go parser will want do do more.

Timeout support

Set $GGDH_TIMEOUT to be time limit in seconds for the script to run - default 16 seconds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.