Skip to content

xcaddy does not download newly published module versions, even when specified #221

@infogulch

Description

@infogulch

I published a new version of my module by tagging it and pushing the tag to GH, and immediately tried to xcaddy build with it like xcaddy build --with github.com/infogulch/my-module@v0.0.2, but xcaddy continued to use the old module version. After I manually updated the go proxy service with go get github.com/infogulch/my-module@v0.0.2 then it pulled in the new version. (See https://proxy.golang.org/#faq-new-version)

Some issues:

  • I would expect xcaddy build --with module@version to download new module versions like go get module@version does.
  • I would expect xcaddy to complain and fail to build if it didn't find the version I specify, instead of just building with whatever other version it happens to find instead.

I expect this to reproduce with the following steps:

  1. Create a new module and publish a version
    1. Create new repo containing a caddy module
    2. Tag an initial version git tag -a v0.0.1; git push --tags
    3. Add it to the proxy go get my-module@v0.0.1
    4. Verify that it builds in caddy xcaddy build --with my-module@v0.0.1
  2. Publish a new version
    1. git commit ...; git tag -a v0.0.2; git push --tags
    2. Do not manually fetch it with go get
    3. Try to xcaddy build with the new version xcaddy build --with my-module@v0.0.2
    4. Observe in the build logs that it is still using v0.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions