Remove environment

Signed-off-by: Joel Longtine <joel@dagger.io>
This commit is contained in:
Joel Longtine
2022-02-18 16:00:38 -07:00
parent c971077222
commit 034cd74ed0
10 changed files with 38 additions and 1735 deletions

View File

@@ -8,7 +8,6 @@ import (
"cuelang.org/go/cue"
"go.dagger.io/dagger/compiler"
"go.dagger.io/dagger/environment"
"go.dagger.io/dagger/pkg"
"go.dagger.io/dagger/plancontext"
"go.dagger.io/dagger/solver"
@@ -23,6 +22,16 @@ var (
cue.Hid("_name", pkg.DaggerPackage))
)
// State is the state of the task.
type State string
const (
StateComputing = State("computing")
StateCanceled = State("canceled")
StateFailed = State("failed")
StateCompleted = State("completed")
)
type NewFunc func() Task
type Task interface {
@@ -52,9 +61,9 @@ func New(typ string) Task {
func Lookup(v *compiler.Value) (Task, error) {
// FIXME: legacy pipelines
if environment.IsComponent(v) {
return New("#up"), nil
}
// if environment.IsComponent(v) {
// return New("#up"), nil
// }
if v.Kind() != cue.StructKind {
return nil, ErrNotTask