Skip to content

Finalize reference universe packages #1359

Closed

Description

@aluzzardi

Before porting all universe packages (#1358), we should finalize at least 2 reference packages.

Basically, those should be using the best practices, conventions, and tests we want all other packages to follow.

/cc @shykes

Activity

  1. added this to the next milestone on Jan 7, 2022
  2. aluzzardi commented on Jan 7, 2022

    @aluzzardi
    ContributorAuthor

    Depends on coding style: #1360

  3. TomChv commented on Jan 7, 2022

    @TomChv
    Member

    I have questions about coding style and convention but I think it's relative to #1360.

    Indeed, I saw several difference between yarn and netlify, which one should we follow?

    There are also similarities, so is it relevant to create a generic definition for all components?

    For example

    #FS: {
    	$dagger: fs: _id: string
    }
    
    Component: {
        input: #FS
        
        command: _ //... I don't know if it's relevant
        
        output: #FS
    }
    
    // A universe pkg
    #Deploy: {
        args: [...string]
    
        command: // ... do stuff
    } & Component

    As well, what about private field? I thought it wasn't working but I still see some in netlify package

  4. talentedmrjones commented on Jan 7, 2022

    @talentedmrjones

    I suggest taking a cue from Go (sorry couldn't resist):

    • uppercase names for "public" definitions used outside the package (engine.#Build)
    • lowercase for "private" fields used only inside the package (_#inputSecret)
    • definitions # for schemas (may include concrete defaults)
    • fields (hidden or visible) for concrete implementation of schemas
    • aliases (let x) for immediate block scope
  5. shykes commented on Jan 10, 2022

    @shykes
    Contributor

    @TomChv @talentedmrjones can you contribute ideas on coding style to #1360 so we don’t lose track of them please?

  6. talentedmrjones commented on Jan 14, 2022

    @talentedmrjones

    Looking at package yarn I see it imports universe.dagger.io/alpine, which is also needed for universe/aws and I imagine many others. So it seems to reason that universe/alpine should probably also be a reference package and be ported

  7. aluzzardi commented on Jan 25, 2022

    @aluzzardi
    ContributorAuthor

    We now have:

    • yarn, simple package with inlined script
    • netlify, with code embedding
    • alpine, which is nestable inside docker.#Build

    Pretty good set of reference packages.

    I'm in favor of closing this issue.

    @shykes @talentedmrjones @samalba agreed?

  8. self-assigned this
    on Jan 25, 2022
  9. talentedmrjones commented on Jan 25, 2022

    @talentedmrjones

    Agreed. And we'll soon have aws as well

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