qvest-digital / loginsrv

JWT login microservice with plugable backends such as OAuth2, Google, Github, htpasswd, osiam, ..

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Caddy's import path has changed

mholt opened this issue · comments

Caddy's import path (and Go module name) has changed from

github.com/mholt/caddy

to

github.com/caddyserver/caddy

Unfortunately, Go modules are not yet mature enough to handle a change like this (see https://golang.org/issue/26904 - "haven't implemented that part yet" but high on priority list for Go 1.14) which caught me off-guard. Using Go module's replace feature didn't act the way I expected, either. Caddy now fails to build with plugins until they update their import paths.

I've hacked a fix into the build server, so downloading Caddy with your plugin from our website should continue working without any changes on your part, for now. However, please take a moment and update your import paths, and do a new deploy on the website, because the workaround involves ignoring module checksums and performing a delicate recursive search-and-replace.

I'm terribly sorry about this. I did a number of tests and dry-runs to ensure the change would be smooth, but apparently some unknown combination of GOPATH, Go modules' lack of maturity, and other hidden variables in the system or environment must have covered up something I missed.

This bash script should make it easy (run it from your project's top-level directory):

find . -name '*.go' | while read -r f; do
	sed -i.bak 's/\/mholt\/caddy/\/caddyserver\/caddy/g' $f && rm $f.bak
done

We use this script in the build server as part of the temporary workaround.

Let me know if you have any questions! Sorry again for the inconvenience.

@mholt No big thing, I'll do it soon (i guess at the weekend)

@smancke Could you please fix this? I'm getting an error trying to install using this Archlinux package and I think this is why. https://aur.archlinux.org/packages/caddy/

@smancke I tried to create a pull request, but I couldn't figure out the go modules. Would greatly appreciate a fix.

@smancke #136
I changed the import paths and tidied up the go.mod and go.sum files... just needs an approval. 😄

PR was merged, this issue can probably be closed now.

@bamling Thanks for doing this!
@smancke So I think a new release has to be made now, is that correct?

thx @bamling !
I have created the release for the caddy deployment.