-
Notifications
You must be signed in to change notification settings - Fork 255
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
Incorrect project structure gives an unhelpful error message #383
Comments
This just happened to me as well. I think checking for the right project structure and giving a better error message will save many people plenty of time. |
This is to help reproduce cucumber#383
Yesterday @ALCooper12 and I paired on this problem. We've made a bit of a start on it by adding an example in the I'm new to Go so this is fun! We're meeting up again next week, when we'll see if we can work out where we'd introduce a change into the code to give a better error message. If anyone has any pointers, we'd love to hear them. I've never worked in this codebase before. |
I think I've got a failing test here: e5b2693 |
* Add example about incorrect project structure This is to help reproduce #383 * Added some debugging statements * Update go.sum for example project * Made a cmd_run_test.go file in order to test and run the builderAndRunGodog function in order to see it fail * added new assertion test * Matt and I added debugging Co-authored-by: Matt Wynne <[email protected]> * Matt and I tried to logging through the cobra command by using cmd.OutOrStdout( ) * Improved some debugging * Add a failing test for Builder that reproduces #383 * added new test for IncorrectProjectStructure #383 * Revert "Add a failing test for Builder that reproduces #383" This reverts commit e5b2693. * ignored vscode files Co-authored-by: Matt Wynne <[email protected]> * undid debugging changes * undid debugging changes * removed redundant test * added check for incorrect project structure we examined the output from running `go test` which tells us if we didn't find any test files. we tweaked the error message to follow the capitalization rules Co-authored-by: Matt Wynne <[email protected]> * Update internal/builder/builder_test.go Co-authored-by: Matt Wynne <[email protected]> Co-authored-by: Matt Wynne <[email protected]> Co-authored-by: Viacheslav Poturaev <[email protected]>
Please answer these questions before submitting a bug report.
What version of godog are you using?
What version of Go are you using?
What did you do?
Created a new project with the following structure,
My
main.go
,I wanted to confirm that my
Dockerfile
was correctly working and running this minimal example withgodog
. But it failed, I then tried running it with my local copy ofgodog
, but that failed as well.After doing the following change it worked,
What did you expect to see?
A more informative error message on why
godog
failed with my minimal example.What did you see instead?
$ godog failed to compile testmain package: exit status 1 - output: compile: -importcfg: open /tmp/go-build1250231118/b001/importcfg.link: no such file or directory
The text was updated successfully, but these errors were encountered: