Ever since Caddy brings its own _vendored_ dependencies, caddyserver/dnsproviders does not seem to work properly anymore.
We're trying to use the relatively new Rackspace DNS provider for our application, but our builds suddenly started failing recently:
../github.com/caddyserver/dnsproviders/rackspace/rackspace.go:14: cannot use NewDNSProvider (type func(...string) ("github.com/xenolf/lego/acme".ChallengeProvider, error)) as type caddytls.DNSProviderConstructor in argument to caddytls.RegisterDNSProvider
By the looks of it, Caddy seems to rely on its vendored github.com/xenolf/lego/acme dependency, while caddyserver/dnsproviders still pulls it directly from github, thus some sort of mismatch occurs.
Yeah, same here
Maybe you could make a PR to fix it here: https://github.com/caddyserver/dnsproviders ?
I'm not overfly familiar with the vendoring feature in Go just yet, but according to this post (which seems to talk about the exact, same problem):
... it's nothing I can easily fix with a PR... unless I remove the vendoring in Caddy again. But the only thing I can say for sure is: Right now the DNS providers cannot be used with Caddy and I'm not entirely sure how to fix it.
Oops, dang -- this is https://github.com/mattfarina/golang-broken-vendor in disguise.
I thought we were good on this, but the DNS providers are plugins. Built alone, Caddy compiles without error. But not so with plugins, apparently.
And unfortunately, we can't change the import path in the dnsproviders packages to github.com/mholt/caddy/vendor/github.com/xenolf/lego/acme for example, it says "use of vendored package not allowed".
We might have to do something (dumb) like type ChallengeProvider acme.ChallengeProvider in the caddytls package, and have all the DNS providers use caddytls.ChallengeProvider instead of acme.ChallengeProvider so that they no longer import the external acme package.
This would have to be done for all types from vendored dependencies that are exported.
Made a PR with your suggested changes and tested it locally in conjunction with the DNS providers. Seems to work just fine. I'll create a PR for the DNS providers shortly.
Great, this should be fixed. If anyone else notices any more import problems related to vendoring, please open an issue and reference this one. Thanks!
Most helpful comment
Yeah, same here