1. 5
  1.  

  2. 3

    I wish go devs would get this sorted out so everyone can just start using it for all new development, whatever it is. The whole situation is a giant distraction. Also a lesson for any new language; package management really needs to be a fundamental concern for widespread adoption.

    1. 5

      I think this is a good example of the “why don’t you just …” pattern. If things were that easy, they would “just” do it.

      The original GOPATH scheme worked very well for the use cases it was designed for. It still works very well for that, but in the last ten years the use cases have changed. Migrating away from GOPATH is a major change and requires updating of a lot of tools (not just the language itself, also language tooling from the community, IDE integration, etc.) Of course it’s going to take some time.

      The original package management experiment (dep) was dropped. There was some hubhub about it in the community (especially in how it was communicated by the core team), but I think it was the right choice. A lot of smart people worked very hard on it, and it did work, but never quite right. It’s slow, certain workflows are hard, and it can be very hard to debug if unexpected stuff happens. I guess the Go team could have stuck with it just to “get this sorted out”, but then we’d be in the JavaScript situation, where a lot of people agree that, in hindsight, npm probably isn’t a great idea, and now it’s hard to fix as there’s an entire ecosystem already.

      At any rate, is it a distraction? Sure, I don’t disagree. But as I see it, the alternative to this slow migration process and “get this sorted out” is to make a hard break with existing tools and people’s workflow. That’s significantly worse. If you’ve got a better idea, then I’m sure the Go team is more than willing to listen!

      package management really needs to be a fundamental concern for widespread adoption.

      Well, apparently not, as Go adoption is fairly reasonable without a centralized package management.

      1. 2

        Quick fixes are generally worse than careful ones.

      2. 1

        3rd option is to use a “proxy server” like Athens. This lets you use your regular fetch / distfile mechanisms.

        No word on if there will be an “Official” proxy server.. but I can’t imagine there not being one.

        1. 1

          No word on if there will be an “Official” proxy server.. but I can’t imagine there not being one.

          The recent weblog post mentioned it:

          We are aiming to have the Google-run module mirror ready to be used by default in the go command starting in Go 1.13 [August 2019]. Using an alternate mirror, or no mirror at all, will be trivial to configure.

          But I don’t think work started on it, or if it’ll use Athens or something else.

          1. 1

            Oh sweet, thanks for the update!