Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos slapos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !924

You need to sign in or sign up before continuing.
Merged
Created Mar 01, 2021 by Kirill Smelkov@kirrOwner

golang: Go modules support; Prepare to deprecate GOPATH

  • Overview 6
  • Commits 5
  • Changes 3

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.

    kirr/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

/cc @jerome, @luke, @tomo, @alain.takoudjou

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: y/gomod
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7