Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 129
    • Merge requests 129
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • slaposslapos
  • Merge requests
  • !1169

golang: Clean internal build cache after part is compiled/tested

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Kirill Smelkov requested to merge kirr/slapos:y/go-clean-own-buildcache into master May 11, 2022
  • Overview 5
  • Commits 1
  • Pipelines 0
  • Changes 1

@tomo reports that parts/golang1.17/pkg/obj/go-build takes ~ 1GB which makes it wasteful if we want to upload result of compilation to shacache.

It turns out we can drop that particular build cache completely, because it is used only during the build and test of Go itself and its standard library. And when Go is installed it will be another - "user" build cache - that will be used to maintain and reuse build artifacts. For the reference: in SlapOS that latter "user" build cache is located inside go.work/

-> Purge internal build cache after compilation is over.

Size of parts/golang1.17 before and after hereby patch:

before: 1.6G after: 447M

See also related discussion in https://lab.nexedi.com/nexedi/slapos/merge_requests/929#note_128379

/cc @jerome

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: y/go-clean-own-buildcache
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7