diff --git a/plan/task/task.go b/plan/task/task.go index 53dc1ecc..a840fdd6 100644 --- a/plan/task/task.go +++ b/plan/task/task.go @@ -17,7 +17,10 @@ import ( var ( ErrNotTask = errors.New("not a task") tasks sync.Map - typePath = cue.MakePath(cue.Hid("_type", stdlib.EnginePackage)) + typePath = cue.MakePath( + cue.Str("$dagger"), + cue.Str("task"), + cue.Hid("_name", stdlib.EnginePackage)) ) type NewFunc func() Task diff --git a/stdlib/europa/dagger/engine/exec.cue b/stdlib/europa/dagger/engine/exec.cue index afde7292..868317b7 100644 --- a/stdlib/europa/dagger/engine/exec.cue +++ b/stdlib/europa/dagger/engine/exec.cue @@ -2,7 +2,6 @@ package engine // Execute a command in a container #Exec: { - _type: "Exec" $dagger: task: _name: "Exec" // Container filesystem diff --git a/stdlib/europa/dagger/engine/fs.cue b/stdlib/europa/dagger/engine/fs.cue index a16c7d1a..0b68d09d 100644 --- a/stdlib/europa/dagger/engine/fs.cue +++ b/stdlib/europa/dagger/engine/fs.cue @@ -2,7 +2,6 @@ package engine // Read a file from a filesystem tree #ReadFile: { - _type: "ReadFile" $dagger: task: _name: "ReadFile" // Filesystem tree holding the file @@ -18,7 +17,6 @@ package engine // Write a file to a filesystem tree, creating it if needed #WriteFile: { - _type: "WriteFile" $dagger: task: _name: "WriteFile" // Input filesystem tree diff --git a/stdlib/europa/dagger/engine/image.cue b/stdlib/europa/dagger/engine/image.cue index 2d6ac907..554b4cc9 100644 --- a/stdlib/europa/dagger/engine/image.cue +++ b/stdlib/europa/dagger/engine/image.cue @@ -47,7 +47,6 @@ package engine // Download a container image from a remote repository #Pull: { - _type: "Pull" $dagger: task: _name: "Pull" // Repository source ref diff --git a/stdlib/europa/dagger/engine/plan.cue b/stdlib/europa/dagger/engine/plan.cue index 923614bf..79b0294b 100644 --- a/stdlib/europa/dagger/engine/plan.cue +++ b/stdlib/europa/dagger/engine/plan.cue @@ -35,7 +35,7 @@ package engine _#inputDirectory: { // FIXME: rename to "InputDirectory" for consistency - _type: "LocalDirectory" + $dagger: task: _name: "LocalDirectory" // Import from this path ON THE CLIENT MACHINE // Example: "/Users/Alice/dev/todoapp/src" @@ -72,11 +72,11 @@ _#inputSecret: { interactive: true | *false } | { // Read secret from a file ON THE CLIENT MACHINE - _type: "SecretFile" - path: string + $dagger: task: _name: "SecretFile" + path: string } | { // Read secret from an environment variable ON THE CLIENT MACHINE - _type: "SecretEnv" + $dagger: task: _name: "SecretEnv" envvar: string } } @@ -96,7 +96,7 @@ _#outputDirectory: { _#proxyEndpoint: { // Service endpoint can be proxied to action containers as unix sockets // FIXME: should #Service be renamed to #ServiceEndpoint or #Endpoint? Naming things is hard... - _type: "Service" + $dagger: task: _name: "Service" // FIXME: should be endpoint service: #Service endpoint: service