Skip to content

remove cuego.Complete from cuecfg.Marshal #1349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions internal/cuecfg/cuecfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,12 @@ import (
"os"
"path/filepath"

"cuelang.org/go/cuego"
"github.com/pkg/errors"
)

// TODO: add support for .cue

func Marshal(valuePtr any, extension string) ([]byte, error) {
err := cuego.Complete(valuePtr)
if err != nil {
return nil, errors.WithStack(err)
}

switch extension {
case ".json", ".lock":
return MarshalJSON(valuePtr)
Expand Down
4 changes: 2 additions & 2 deletions internal/devconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const DefaultName = "devbox.json"
type Config struct {
// Packages is the slice of Nix packages that devbox makes available in
// its environment. Deliberately do not omitempty.
Packages []string `cue:"[...string]" json:"packages"`
Packages []string `json:"packages"`

// Env allows specifying env variables
Env map[string]string `json:"env,omitempty"`
Expand Down Expand Up @@ -52,7 +52,7 @@ type NixpkgsConfig struct {

// Stage contains a subset of fields from plansdk.Stage
type Stage struct {
Command string `cue:"string" json:"command"`
Command string `json:"command"`
}

func DefaultConfig() *Config {
Expand Down