dagger.#FS support
- Implement dagger.#FS support - Migrate `context.imports` to dagger.#FS - Backward compat: dagger.#FS can be passed in lieu of a dagger.#Artifact - For instance, an import (`dagger.#FS`) can be passed to the current `yarn.#Package` implementation Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
@@ -198,7 +198,7 @@ var computeCmd = &cobra.Command{
|
||||
lg.Fatal().Err(err).Msg("unable to create environment")
|
||||
}
|
||||
|
||||
err = cl.Do(ctx, env.Context(), env.Context().Directories.Paths(), func(ctx context.Context, s solver.Solver) error {
|
||||
err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error {
|
||||
// check that all inputs are set
|
||||
checkInputs(ctx, env)
|
||||
|
||||
|
@@ -83,7 +83,7 @@ var editCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
cl := common.NewClient(ctx)
|
||||
err = cl.Do(ctx, env.Context(), env.Context().Directories.Paths(), func(ctx context.Context, s solver.Solver) error {
|
||||
err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error {
|
||||
// check for cue errors by scanning all the inputs
|
||||
_, err := env.ScanInputs(ctx, true)
|
||||
if err != nil {
|
||||
|
@@ -47,7 +47,7 @@ var listCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
cl := common.NewClient(ctx)
|
||||
err = cl.Do(ctx, env.Context(), env.Context().Directories.Paths(), func(ctx context.Context, s solver.Solver) error {
|
||||
err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error {
|
||||
inputs, err := env.ScanInputs(ctx, false)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@@ -59,7 +59,7 @@ func updateEnvironmentInput(ctx context.Context, cmd *cobra.Command, target stri
|
||||
}
|
||||
|
||||
cl := common.NewClient(ctx)
|
||||
err = cl.Do(ctx, env.Context(), env.Context().Directories.Paths(), func(ctx context.Context, s solver.Solver) error {
|
||||
err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error {
|
||||
// the inputs are set, check for cue errors by scanning all the inputs
|
||||
_, err := env.ScanInputs(ctx, true)
|
||||
if err != nil {
|
||||
|
@@ -46,7 +46,7 @@ var listCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
cl := common.NewClient(ctx)
|
||||
err = cl.Do(ctx, env.Context(), env.Context().Directories.Paths(), func(ctx context.Context, s solver.Solver) error {
|
||||
err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error {
|
||||
return ListOutputs(ctx, env, true)
|
||||
})
|
||||
|
||||
|
@@ -80,7 +80,7 @@ var upCmd = &cobra.Command{
|
||||
lg.Fatal().Err(err).Msg("unable to create environment")
|
||||
}
|
||||
|
||||
err = cl.Do(ctx, env.Context(), env.Context().Directories.Paths(), func(ctx context.Context, s solver.Solver) error {
|
||||
err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error {
|
||||
// check that all inputs are set
|
||||
if err := checkInputs(ctx, env); err != nil {
|
||||
return err
|
||||
@@ -119,11 +119,7 @@ func europaUp(ctx context.Context, cl *client.Client, path string) error {
|
||||
lg.Fatal().Err(err).Msg("failed to load plan")
|
||||
}
|
||||
|
||||
localdirs, err := p.LocalDirectories()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return cl.Do(ctx, p.Context(), localdirs, func(ctx context.Context, s solver.Solver) error {
|
||||
return cl.Do(ctx, p.Context(), func(ctx context.Context, s solver.Solver) error {
|
||||
if err := p.Up(ctx, s); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user