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

gobco doesn't work well with nested packages #12

Open
anmolbabu opened this issue Dec 31, 2019 · 3 comments
Open

gobco doesn't work well with nested packages #12

anmolbabu opened this issue Dec 31, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@anmolbabu
Copy link

when individual package paths are passed, gobco works like a charm
However, when gobco is run at a higher levels, composed of multiple nested packages, it errors out saying no Go files....

ababu17$ gobco pkg/
can't load package: package ........./pkg: no Go files in /var/folders/dc/ffvyv57j5dzf20lp3tlqfpqw0000gn/T/gobco-f9cfa878-befb-4140-861e-56900a45e25b/src/.........../pkg
exit status 1
open /var/folders/dc/ffvyv57j5dzf20lp3tlqfpqw0000gn/T/gobco-f9cfa878-befb-4140-861e-56900a45e25b/gobco-counts.json: no such file or directory


ababu17$ ls
Makefile	README.md	coverage.out	go.mod		go.sum		pkg		vendor


ababu17$ ls pkg/
cover.sh	env		logging		messaging	models		test.sh		utils


ababu17$ ls pkg/models/
constants.go	defs.go		defs_test.go	interface.go	job.go		job_test.go	mocks


ababu17$ ls pkg/utils/
file.go			file_test.go		object.go		object_test.go		schedule.go		schedule_test.go	str.go			str_test.go
@rillig rillig added the enhancement New feature or request label Dec 31, 2019
@rillig rillig self-assigned this Dec 31, 2019
@rillig
Copy link
Owner

rillig commented Dec 31, 2019

My idea to implement this is to do the same that the Go compiler does when it interprets the ./... special argument. I already had a look at the code that implements this in the Go standard library, but unfortunately that code cannot be reused easily since it is in cmd/go/internal/modload/load.go, function ImportPathsQuiet, keyword "...".

Do you have an idea how this could be implemented without copying and duplicating all that code?

@rillig rillig added the help wanted Extra attention is needed label Dec 31, 2019
@anmolbabu
Copy link
Author

Will take a look at this sometime this weekend

@KantarBruceAdams
Copy link

I think I may have the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants