Open jeromer opened 7 years ago
I found why.
There was a bad import in one of my go files which for some unknown reason was not reported by gb
.
This import ultimately triggers this error which is not displayed.
Do you think you could at leat display the error ?
Sadly no, because no go error also happens when there are no go files at all, or no go files that match the current build tags. It's an error that is not an error.
Could you please include a sample project that demonstrates the issue and I'll try to work something out.
On Fri, 31 Mar 2017, 03:33 Jérôme Renard notifications@github.com wrote:
I found why.
There was a bad import in one of my go files which for some unknown reason was not reported by gb.
This import ultimately triggers this error https://github.com/constabulary/gb/blob/master/cmd/gb/build.go#L142 which is not displayed.
Do you think you could at leat display the error ?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/constabulary/gb/issues/702#issuecomment-290467210, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAcAwfbXumRkqWO2G7Le3PD3RY-G4Twks5rq9lvgaJpZM4MukPT .
Just run run gb test api
you should get an error message.
If you run gb test
you will see that the api
package is silently ignored because of a bad import in src/api/handler_test.go
(the testhelpers
package does not exists).
This bug is quite a nasty one.
This is what I get
deadwood(~/devel/issue720) % gb build FATAL: command "build" failed: failed to resolve import path "testhelpers/db": import "github.com/jeromer/pgx": not found: stat /home/dfc/devel/issue720/src/github.com/jeromer/pgx: no such file or directory
On Fri, Mar 31, 2017 at 8:31 AM, Jérôme Renard notifications@github.com wrote:
issue720.tar.gz https://github.com/constabulary/gb/files/883841/issue720.tar.gz
Just run run gb test api you should get an error message.
If you run gb test you will see that the api package is silently ignored because of a bad import in src/api/handler_test.go (the testhelpers package does not exists).
This bug is quite a nasty one.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/constabulary/gb/issues/702#issuecomment-290550984, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAcA_vAQdG-Odkg9dXdcmptPkCYvtvTks5rrB8vgaJpZM4MukPT .
My project looks like this:
Even though there are tests in
src/api/
gb seems to completely ignore themI use gb d4ba64b0b29760e90322851fb793b04665b0c3c9