-
Notifications
You must be signed in to change notification settings - Fork 42
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
go-kivik import order causes initialisation failure #372
Comments
For the 1.x series of kivik, you must use |
I've updated the documentation to hopefully be a bit more clear. Please let me know if further clarification or problems persist, and I'll do my best to address them. |
When should we switch to use |
I hope to have the API stabilized within a month or two, but it largely depends on how much free time I have over the summer. |
Okay, no pressure, just asking because when I import
Then it says that I replace it with |
That means you've somehow downloaded version 1.x, using the 2.x import path. How did you download kivik? With |
Tried both |
That should fetch the development version, which should not give you the error above. I suggest deleting kivik:
Then re-installing it. Please let me know if that helps. |
It's still the same but is it ok to use |
Here's some test code in a gist. |
Yes, it's okay to use |
Bug Report Checklist (remove this template if submitting a feature request)
Which version of Kivik are you using?
1.8.1
Which version of Go are you using?
go version go1.12.4 linux/amd64
What did you do? (Include your code if possible)
What did you expect to see?
Nothing
What did you see instead?
Problems: unknown driver "couch" (forgotten import?)
My linter forces alphabetic package ordering, putting
go-kivik/couchdb
at the top. If I useflimzy/kivik
, the ordering changes (flimzy < go-kivik). And the problem disappears.Initially I thought using
init()
in go-kivik might do the trick, since golang forces imported packages initialisation functions to run before its owninit()
.Looking at
go-kivik/couchdb
I realise that it importsflimzy/kivik
instead ofgo-kivik/kivik
- perhaps this is why the initialisation isn't working the way it should.What an odd quirk of having dev/stable in separate repositories!
The text was updated successfully, but these errors were encountered: