-
-
Notifications
You must be signed in to change notification settings - Fork 667
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
Ginkgo panics when using the Table extension #234
Comments
This reverts commit 95ee3d3. - It panics locally and in CI. See onsi/ginkgo#234
very weird... i can't get this to reproduce locally with a minimal example. maybe we can poke at it a bit tomorrow, @robdimsdale ? |
I ran this with go 1.5.3 and it worked - https://sunrise.ci.cf-app.com/builds/855 is a one-off build demonstrating this behavior (you can't see the SHA but it's the same commit that fails in golang 1.6). |
pivotal-cf/pivnet-resource@95ee3d3 is the offending commit |
Stepping away from the specifics of the test for that project and using a minimal example, I can reproduce locally this with the table-driven-testing example given at http://onsi.github.io/ginkgo/#table-driven-tests with the following set of files: foo.go
foo_suite_test.go
foo_test.go
and I get the following output:
|
I understand that others have seen this error without using the From Slack
|
bizzare. i took your example and tried it on my machine running go 1.6 (brew installed) and it works for me... have you cleared your $GOPATH/pkg? |
go version go1.5.3 darwin/amd64
As Rob mentioned, I did get an error: flag redefined: ginkgo.seed. I originally got the error when adding a test when working on a routing story... another pair finished the story, however I seemed to be able to narrow down and recreate the problem, If I modify the test as follows: cloudfoundry/cf-acceptance-tests@108bbc5 Obviously this code is incomplete and not valid... but it should still run... But I get the error: flag redefined: ginkgo.seed Might be related but something Rob and I discussed.
|
@onsi yes I removed However, I have solved my issue. In my case the issue I was seeing was that I had not added I'm not sure why this manifested itself in the error that I saw, as missing a dependency should be a compile-time error, not a runtime panic due to the same arg being provided twice. It also doesn't exactly solve the issue @markstgodard was seeing, though I suspect they're related. I wonder if they was missing a vendored copy of the @markstgodard if you want to dig deeper, I would start by checking that you have the correct version of your dependencies vendored. If you're satisfied, however, we can close this issue. |
@robdimsdale I'll check, thx |
@robdimsdale I nuked $GOPATH/bin and $GOPATH/pkg and also made sure I did a godep restore from cf-acceptance-tests, however problem still persists for me. If you wanted to Close, it could be something off in my env, but I'll look deeper. Cheers |
Sigh.. Go. The hackery that went into the vendor experiment continues to blindside people (also OK this makes sense @robdimsdale - if But go will pull in the The two |
@onsi makes total sense, thanks for the excellent explanation. @markstgodard you're using go 1.5.3, correct? Are you setting the |
Note that this problem continues to occur with the official Go vendoring support, e.g. in 1.7.4. The solution is the same: vendor |
@onsi @georgeharley (who I was pairing with when we hit this issue) suggested adding a brief note to the docs for tables to make sure people remember to vendor in the extra package. Might be worth it if this is a common problem. |
That sounds fine Glyn. Would either of you be up for submitting a PR to the `gh-pages` branch? Or even the main README if you think it warrants that degree of visibility.
… On Feb 15, 2017, at 1:18 AM, Glyn Normington ***@***.***> wrote:
@onsi @georgeharley (who I was pairing with when we hit this issue) suggested adding a brief note to the docs for tables to make sure people remember to vendor in the extra package. Might be worth it if this is a common problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
We just encountered this problem after we began using To be clear, adding lager to our |
I have a slightly different problem, where adding to my vendor directory does not help. My project (
In this case, both copies of
I'm rather new to golang, and the only solution I can come up with is:
This of course seems far from elegant. Does anyone have any better ideas? Is there perhaps anything that can be done to ginkgo to just issue a warning and not crash in this scenario? |
I am seeing a version of this as well, related to the way that Go mis-handles vendored packages generally (hopefully fixed with module support in 1.11), as illustrated in https://github.com/carldunham/go-dep-test. It would be helpful if we could set the |
I submitted a PR to suggest one way of addressing this: #502 |
I'm working through the backlog of old Ginkgo issues - apologies as this issue is probably stale now. |
see https://sunrise.ci.cf-app.com/pipelines/pivnet-resource/jobs/test/builds/135
I see the same thing when locally when not running in parallel.
This is running golang 1.6 and I believe the behavior is not observed on golang 1.5 as I have used the
Table
extension in other projects on golang 1.5 without issue.The text was updated successfully, but these errors were encountered: