Giter Club home page Giter Club logo

Comments (8)

haya14busa avatar haya14busa commented on May 21, 2024 1

No. It's reproducible without -u.

e.g.

GO111MODULE=auto go get github.com/haya14busa/go-get-non-latest-dep-test

from reviewdog.

haya14busa avatar haya14busa commented on May 21, 2024

Probably because go-github v25 was released, but i'm not sure.
https://github.com/google/go-github/releases/tag/v25.0.0

It might be the bug of go-get and it's not the problem of reviewdog.

Please use GO111MODULE=on, install reviewdog binary (https://github.com/reviewdog/reviewdog#installation), or report the bug to go project.

from reviewdog.

haya14busa avatar haya14busa commented on May 21, 2024

I updated dependencies and confirmed go get worked.
Still not sure whether or not it's bug of go.

from reviewdog.

aimof avatar aimof commented on May 21, 2024

It seems to be caused by -u option.

Usage of go get -u

A common mistake is thinking go get -u foo solely gets the latest version of foo. In actuality, the -u in go get -u foo or go get -u foo@latest means to also get the latest versions for all of the direct and indirect dependencies of foo. A common starting point when upgrading foo is instead to do go get foo or go get foo@latest without a -u (and after things are working, consider go get -u=patch foo, go get -u=patch, go get -u foo, or go get -u).

-u option cannot solve the dependencies but get latest of all repositories it depends on.

Thank you.

from reviewdog.

haya14busa avatar haya14busa commented on May 21, 2024

ref: https://github.com/golang/go/blob/a16dcc00526dbb5ff411004c987a4182a8d68e7c/src/cmd/go/internal/load/pkg.go#L1011-L1019
https://golang.org/issue/25069

from reviewdog.

aimof avatar aimof commented on May 21, 2024

It's my mistake about -u.
I saw your go-get-non-latest-dep-test repo and run.

distro: Ubuntu 18.04
go: 1.12.4

then

$ GO111MODULE=auto go get github.com/haya14busa/go-get-non-latest-dep-test
go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src;
	ignoring go.mod;
	see 'go help modules'
  • If GO111MODULE=auto and workdir is under $GOPATH/src, GO111MODULE is off. resource So, go-github is got without version info.
  • However, go-get-non-latest-dep-test repo imports github.com/google/go-github/v24 but v24 depends on go mod.
  • So we must GO111MODULE=on when go get.

from reviewdog.

aimof avatar aimof commented on May 21, 2024

Sry, I wrong.
I can import latest(v25) when GO111MODULE=off

aimof/go-get-non-latest-dep-test@c07a1c5

from reviewdog.

hamakn avatar hamakn commented on May 21, 2024

Last Thursday I used wget command in README instead of go get to repair our problem.

@haya14busa
Thank you for your research and quick temporary fix, even though it was not caused by reviewdog.

from reviewdog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.