Skip to content

Entrypoints should never be ignored#59

Open
jbreckmckye wants to merge 1 commit intokisielk:masterfrom
jbreckmckye:jbmk-entrypoints-unignore
Open

Entrypoints should never be ignored#59
jbreckmckye wants to merge 1 commit intokisielk:masterfrom
jbreckmckye:jbmk-entrypoints-unignore

Conversation

@jbreckmckye
Copy link
Copy Markdown
Contributor

There is a bug (issue #50) where, if the starting point is a file path(s), it doesn't play nicely with ignore rules like -o / --onlyprefixes. It returns nothing unless you know you have to pass the magic string command-line-arguments:

# Assuming the project entrypoint is ./cmd/main.go
godepgraph -s -o github.com/my/project,command-line-arguments cmd/main.go

This happens because Go's build.Import returns "command-line-arguments" as the ImportPath.

I think the best fix for this is, simply don't ignore packages that are entrypoints. It doesn't make sense to specify a package to traverse and then also ignore it.

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 this pull request may close these issues.

1 participant