#[zenith] New `source` field in dagger.js...

1 messages · Page 1 of 1 (latest)

jaunty seal
#

Hey Vincent, great to hear from you.

Yeah you are spot on, we are in a bit of a liminal space right now and there are some key things like this issue that make things a bit tricky if you are using both classic and new Dagger. https://github.com/dagger/dagger/issues/5993

and just relying on a module to build a project is too limited - at least for our use-case.

Could you tell us a bit more about why this is the case for you specifically?

I've been playing with a few things lately, I don't think there will be a simple way to import modules in classic dagger until we resolve #5993 but you can call dagger modules from a standard shell using go in the context of a classic dagger program.

A very basic example:

package main

import (
    "log"
    "os"
    "os/exec"
)

func main() {
    cmd := exec.Command("dagger", "call", "-m", "github.com/shykes/daggerverse/hello", "message")
    cmd.Stdout = os.Stdout
    cmd.Stderr = os.Stderr

    err := cmd.Run()

    if err != nil {
        log.Fatal(err)
    }
}
GitHub

Right now if you want to call a module the only reasonable ways are from another module or from the CLI. Otherwise you are on your own to load the module and construct graphql queries for it. We ca...