Skip to content

Commit

Permalink
fix more build errors with renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoreilly committed Apr 15, 2024
1 parent 0bf32ed commit a389e50
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions econfig/args.go
Expand Up @@ -226,10 +226,10 @@ func fieldArgNamesStruct(obj any, path string, nest bool, allArgs map[string]ref
nwNest = true
}
}
fieldArgNamesStruct(reflectx.PtrValue(fv).Interface(), nwPath, nwNest, allArgs)
fieldArgNamesStruct(reflectx.PointerValue(fv).Interface(), nwPath, nwNest, allArgs)
continue
}
pval := reflectx.PtrValue(fv)
pval := reflectx.PointerValue(fv)
addAllCases(f.Name, path, pval, allArgs)
if f.Type.Kind() == reflect.Bool {
addAllCases("No"+f.Name, path, pval, allArgs)
Expand Down
2 changes: 1 addition & 1 deletion econfig/usage.go
Expand Up @@ -38,7 +38,7 @@ func usageStruct(obj any, path string, b *strings.Builder) {
if path != "" {
nwPath = path + "." + nwPath
}
usageStruct(reflectx.PtrValue(fv).Interface(), nwPath, b)
usageStruct(reflectx.PointerValue(fv).Interface(), nwPath, b)
continue
}
nm := f.Name
Expand Down
8 changes: 4 additions & 4 deletions ekube/main.go
Expand Up @@ -6,11 +6,11 @@
// and the deployment of those images to Kubernetes clusters.
package main

//go:generate core generate
import "cogentcore.org/core/cli"

import "cogentcore.org/core/grease"
//go:generate core generate

func main() {
opts := grease.DefaultOptions("ekube", "ekube provides easy building of Docker images for emergent models and the deployment of those images to Kubernetes clusters.")
grease.Run(opts, &Config{}, Build)
opts := cli.DefaultOptions("ekube", "ekube provides easy building of Docker images for emergent models and the deployment of those images to Kubernetes clusters.")
cli.Run(opts, &Config{}, Build)
}
4 changes: 2 additions & 2 deletions netparams/io.go
Expand Up @@ -14,11 +14,11 @@ import (

"cogentcore.org/core/core"
"cogentcore.org/core/gox/indent"

Check failure on line 16 in netparams/io.go

View workflow job for this annotation

GitHub Actions / build

no required module provides package cogentcore.org/core/gox/indent; to add it:
"cogentcore.org/core/iox"

Check failure on line 17 in netparams/io.go

View workflow job for this annotation

GitHub Actions / build

no required module provides package cogentcore.org/core/iox; to add it:
"cogentcore.org/core/iox/jsonx"

Check failure on line 18 in netparams/io.go

View workflow job for this annotation

GitHub Actions / build

no required module provides package cogentcore.org/core/iox/jsonx; to add it:
"cogentcore.org/core/iox/tomlx"

Check failure on line 19 in netparams/io.go

View workflow job for this annotation

GitHub Actions / build

no required module provides package cogentcore.org/core/iox/tomlx; to add it:
"github.com/BurntSushi/toml"
"github.com/emer/emergent/v2/params"
"goki.dev/grows"
)

// WriteGoPrelude writes the start of a go file in package main that starts a
Expand Down Expand Up @@ -56,7 +56,7 @@ func (pr *Sets) OpenTOML(filename core.Filename) error {
// SaveTOML saves params to a TOML-formatted file.
func (pr *Sets) SaveTOML(filename core.Filename) error {
// return tomlx.Save(pr, string(filename)) // pelletier/go-toml produces bad output on maps
return grows.Save(pr, string(filename), func(w io.Writer) grows.Encoder {
return iox.Save(pr, string(filename), func(w io.Writer) iox.Encoder {
return toml.NewEncoder(w)
})
}
Expand Down
16 changes: 8 additions & 8 deletions params/io.go
Expand Up @@ -16,10 +16,10 @@ import (

"cogentcore.org/core/core"
"cogentcore.org/core/gox/indent"
"cogentcore.org/core/iox"
"cogentcore.org/core/iox/jsonx"
"cogentcore.org/core/iox/tomlx"
"github.com/BurntSushi/toml"
"goki.dev/grows"
"golang.org/x/exp/maps"
)

Expand Down Expand Up @@ -52,7 +52,7 @@ func (pr *Params) OpenTOML(filename core.Filename) error {
// SaveTOML saves params to a TOML-formatted file.
func (pr *Params) SaveTOML(filename core.Filename) error {
// return tomlx.Save(pr, string(filename)) // pelletier/go-toml produces bad output on maps
return grows.Save(pr, string(filename), func(w io.Writer) grows.Encoder {
return iox.Save(pr, string(filename), func(w io.Writer) iox.Encoder {
return toml.NewEncoder(w)
})
}
Expand Down Expand Up @@ -126,7 +126,7 @@ func (pr *Hypers) OpenTOML(filename core.Filename) error {
// SaveTOML saves params to a TOML-formatted file.
func (pr *Hypers) SaveTOML(filename core.Filename) error {
// return tomlx.Save(pr, string(filename))
return grows.Save(pr, string(filename), func(w io.Writer) grows.Encoder {
return iox.Save(pr, string(filename), func(w io.Writer) iox.Encoder {
return toml.NewEncoder(w)
})
}
Expand Down Expand Up @@ -200,7 +200,7 @@ func (pr *Sel) OpenTOML(filename core.Filename) error {
// SaveTOML saves params to a TOML-formatted file.
func (pr *Sel) SaveTOML(filename core.Filename) error {
// return tomlx.Save(pr, string(filename))
return grows.Save(pr, string(filename), func(w io.Writer) grows.Encoder {
return iox.Save(pr, string(filename), func(w io.Writer) iox.Encoder {
return toml.NewEncoder(w)
})
}
Expand Down Expand Up @@ -266,7 +266,7 @@ func (pr *Sheet) OpenTOML(filename core.Filename) error {
// SaveTOML saves params to a TOML-formatted file.
func (pr *Sheet) SaveTOML(filename core.Filename) error {
// return tomlx.Save(pr, string(filename))
return grows.Save(pr, string(filename), func(w io.Writer) grows.Encoder {
return iox.Save(pr, string(filename), func(w io.Writer) iox.Encoder {
return toml.NewEncoder(w)
})
}
Expand Down Expand Up @@ -334,7 +334,7 @@ func (pr *Sheets) OpenTOML(filename core.Filename) error {
// SaveTOML saves params to a TOML-formatted file.
func (pr *Sheets) SaveTOML(filename core.Filename) error {
// return tomlx.Save(pr, string(filename))
return grows.Save(pr, string(filename), func(w io.Writer) grows.Encoder {
return iox.Save(pr, string(filename), func(w io.Writer) iox.Encoder {
return toml.NewEncoder(w)
})
}
Expand Down Expand Up @@ -407,7 +407,7 @@ func (pr *Set) OpenTOML(filename core.Filename) error {
// SaveTOML saves params to a TOML-formatted file.
func (pr *Set) SaveTOML(filename core.Filename) error {
// return tomlx.Save(pr, string(filename))
return grows.Save(pr, string(filename), func(w io.Writer) grows.Encoder {
return iox.Save(pr, string(filename), func(w io.Writer) iox.Encoder {
return toml.NewEncoder(w)
})
}
Expand Down Expand Up @@ -446,7 +446,7 @@ func (pr *Sets) OpenTOML(filename core.Filename) error {
// SaveTOML saves params to a TOML-formatted file.
func (pr *Sets) SaveTOML(filename core.Filename) error {
// return tomlx.Save(pr, string(filename))
return grows.Save(pr, string(filename), func(w io.Writer) grows.Encoder {
return iox.Save(pr, string(filename), func(w io.Writer) iox.Encoder {
return toml.NewEncoder(w)
})
}
Expand Down

0 comments on commit a389e50

Please sign in to comment.