1. 01 Mar, 2021 7 commits
    • Kirill Smelkov's avatar
      golang: Go modules support; Prepare to deprecate GOPATH · 0dc9308c
      Kirill Smelkov authored
      Add support for using Go modules to golang/gowork infrastructure:
      
      - Users can now request to install a module via gowork:install as. e.g.
        in the following example:
      
      	[gowork]
      	install =
      	    lab.nexedi.com/kirr/neo/go/...@v0.0.0-20210103165133-f3effa6c535f
      	    golang.org/x/tools/gopls@v0.4.3
      	    ${helloweb:location}/go:./...
      
        The first two request to install programs from an external module at particular
        revision/version. The latter requests to install programs from locally
        cloned/checked-out module source.
      
        The documentation now talks only about programs, because "package
        installation" became unnecessary long time ago as Go toolchain uses
        right packages and recompiles things as needed automatically since
        introduction of the Go build cache in go 1.10.
      
      - The change comes accompanied by corresponding helloweb change that
        reworks it to a) become a module itself, and b) to use other modules -
        that are not explicitly cloned by buildout - so that we can be sure
        that module way of fetching/building things actually works.
      
        helloweb@a7c788ae
      
      - Non-module way - e.g. build via GOPATH - is still supported (because
        e.g. software/gitlab still uses it), but not explicitly documented and
        scheduled to be deprecated and removed. The reason for this is that
        upstream Go is going to remove support for GOPATH and leave only
        module-based approach in Go1.17
      
        https://github.com/golang/go/issues/37755#issuecomment-771879911
      0dc9308c
    • Kirill Smelkov's avatar
      golang: Make gowork.install optional · 3e949836
      Kirill Smelkov authored
      Some software releases - e.g. wendelin.core - only use ${go:exe} and
      does not put anything into ${gowork:install}.
      3e949836
    • Kirill Smelkov's avatar
      golang: Rework [gowork] documentation a bit · 149252e0
      Kirill Smelkov authored
      Put emphasis on that gowork defines Go workspace and explain first
      settings that are related to that definition. Only after that say how to
      use gowork.install. The reason for this is that gowork.install will
      become optional in the next patch.
      149252e0
    • Kirill Smelkov's avatar
      helloweb: Drop gowork.cfg · c5021b7f
      Kirill Smelkov authored
      gowork.cfg idea is to specify a GOPATH snapshort with a list of
      repositories and their revisions. GOPATH way of building things is going
      to go away and we'll soon switch default mode to build go things to do
      so via Go modules.
      
      Refactor helloweb a bit before doing that as a preparatory step.
      c5021b7f
    • Kirill Smelkov's avatar
      golang: Break future gowork ⇄ go-git-package cycle · e11efc27
      Kirill Smelkov authored
      Consider a Go package that is defined via go-git-package, for example
      
          [helloweb]
          <= go-git-package
          go.importpath = lab.nexedi.com/nexedi/helloweb
          repository    = https://lab.nexedi.com/nexedi/helloweb.git
      
      Currently, since go-git-package references ${gowork:src}, it creates
      helloweb -> gowork dependency. gowork, in turn, depends on
      gowork.goinstall, which gets list of things to install from ${gowork:install}.
      
      Currently we put only plain strings into ${gowork.install}, e.g.
      
          [gowork]
          install =
             lab.nexedi.com/nexedi/helloweb/go/...
      
      but for Go modules support and for properly expressing what depends on what,
      we'll want in the next patch to be able to specify something like
      
          [gowork]
          install =
             ${helloweb:location}/go:./...
      
      which will create helloweb ⇄ gowork cycle.
      
      Unfortunately buildout does not detect nor report an error for such cycles, and
      simply processes parts in an order, which leads to situation where e.g.
      helloweb was not yet cloned, but gowork.goinstall tries to `go install` it and
      complains "no such helloweb directory".
      
      -> Fix it by leaving gowork to use by component/golang/ users, and putting
      settings about where gowork directories is into underlying gowork.dir section.
      e11efc27
    • Vincent Pelletier's avatar
      software/html5as: Fix md5sum. · db640aa7
      Vincent Pelletier authored
      Not sure which commit broke it, but this diff is now polluting my commits.
      db640aa7
    • Kirill Smelkov's avatar
      golang: Prepare for future GOPATH removal · 8eac67a5
      Kirill Smelkov authored
      GOPATH is going to be removed in Go1.17 (see e.g. https://github.com/golang/go/issues/37755#issuecomment-771879911).
      
      -> Prevent programs suddenly become installed into $HOME/go/bin instead of
      gowork/bin, and mod cache to become something like $HOME/go/... instead of
      being kept under gowork/
      
      No change in behaviour for Go ≤ 1.16
      8eac67a5
  2. 26 Feb, 2021 8 commits
  3. 25 Feb, 2021 8 commits
  4. 24 Feb, 2021 4 commits
  5. 22 Feb, 2021 13 commits