Skip to content

Installing Go SDK is not intuitive #3391

Closed

Description

@sipsma

Problem

To install the Dagger Go SDK, one has to run the following commands:

go get go.dagger.io/dagger@<version if needed>
go mod edit -replace=github.com/docker/docker=github.com/docker/[email protected]+incompatible
go mod tidy

This is 1) verbose, and 2) unusual for Go developers. Therefore it will result in a bad DX. We should boil this down to just go get.

Solution

The solution unfortunately is complex, because it is caused by a conflict between the Moby/Docker and Go projects, respectively. There are four ways we can solve this:

  1. Convince Go to revert their decision to break the established tagging convention for go projects. Estimate: impossible.
  2. Convince Docker to change their tagging convention to match Go's new tagging mandate. Estimate: unlikely.
  3. Convince Go and Docker to find a middle ground. Estimate: unlikely.
  4. Solve the problem downstream with a private fork + custom tooling. Estimate: annoying but doable.

Related: #3367 (comment)
Related: #3368

Activity

  1. added this to the 0.3.0-alpha.1 milestone on Oct 17, 2022
  2. changed the title [-]Investigate possible fixes to need for go mod replace when using go sdk[/-] [+]Installing Go SDK is not intuitive[/+] on Oct 17, 2022
  3. vito commented on Oct 27, 2022

    @vito
    Contributor

    Convince Docker to change their tagging convention to match Go's new tagging mandate. Estimate: unlikely.

    Update from today's community call: it sounds like they're doing this after all by switching to regular semver!

    However we'd still need to wait for a new release of moby/buildkit to be tagged. Maybe that won't be too much trouble.

    We can't easily bump to an untagged moby/buildkit either; I tried this and ended up needing to add a replace line to stop the Go CLI from "bumping" (really rewinding) the dependency, which brings us back to square one. Context: #3560 (comment)

    The long-term fix, to me, is to bite the bullet and switch to an external engine so the SDK doesn't depend on any of this at all.

  4. MDr164 commented on Nov 24, 2022

    @MDr164
  5. vito commented on Nov 24, 2022

    @vito
    Contributor

    Yep - closing, thanks for checking in!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions