Git Product home page Git Product logo

Comments (8)

zombiezen avatar zombiezen commented on May 3, 2024

I'm assigning this to myself for now to make sure the right people are discussing this. I'll post back once a decision is made.

from go-cloud.

zombiezen avatar zombiezen commented on May 3, 2024

@vsekhar FYI: this feedback came from the tools team in the summit last week.

from go-cloud.

zombiezen avatar zombiezen commented on May 3, 2024

@enocom @jadekler @tbpg @jba What do you all think?

For someone starting out, is it more helpful to have:

type app struct {
  srv *server.Server
  db *sql.DB
}

func setup(ctx context.Context) (*app, error) {
  panic(goose.Build(
    app{},
    gcpcloud.GCP,
    // ...
  ))
}

or...

type app struct {
  srv *server.Server
  db *sql.DB
}

func setup(ctx context.Context) (*app, error) {
  panic(goose.Build(
    app{},
    sdserver.Set,
    cloudmysql.Set,
    // ...
  ))
}

The former is more magical at first, but lets the user get started more quickly. Once they learn more, they'll probably drop in to using the latter anyway.

from go-cloud.

jba avatar jba commented on May 3, 2024

I see why the former is tempting, but unless there's going to be a way to override, I think it will just give people false hope. As you say, there probably isn't going to be a real program that can get away with a single provider set for all GCP.

I could also see the argument go the other way, however: it is compelling to see that you can configure everything with one provider set.

So I guess I don't have a strong argument either way.

from go-cloud.

jeanbza avatar jeanbza commented on May 3, 2024

from go-cloud.

vsekhar avatar vsekhar commented on May 3, 2024

+1 for the superset providers. It also makes example apps and demos easier to read.

Simple but bypass-able shortcuts are in line with our design approach.

from go-cloud.

tbpg avatar tbpg commented on May 3, 2024

+1 for the first one, but being clear about how to customize it. Is it possible to have something like:

func setup(ctx context.Context) (*app, error) {
  panic(goose.Build(
    app{},
    gcpcloud.GCP,
    cloudmysql.Set,
    // ...
  ))
}

? My expectation for this would be to take everything from gcpcloud.GCP, but override with cloudmysql.Set.

from go-cloud.

zombiezen avatar zombiezen commented on May 3, 2024

gcpcloud.GCP already includes cloudmysql.Set. Overrides do not work in Goose, as it makes things harder to reason about. I've opened #51 for an idea I've been tossing around for a little bit.

Seems like consensus here is to keep the sets as they are (and I agree). Closing, but feel free to re-open if there's more discussion to be had.

from go-cloud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.