Skip to content

Commit

Permalink
Merge pull request #94 from Peefy/fix-dependencies-features
Browse files Browse the repository at this point in the history
fix: dependencies features
  • Loading branch information
Peefy authored Sep 6, 2024
2 parents 3d5d384 + f03266b commit 343c33c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ metadata:
name: my-kcl-fn
namespace: foo
spec:
dependencies:
dependencies: |
helloworld = {oci = "oci://ghcr.io/kcl-lang/helloworld", "tag" = "0.1.0"}
k8s = "1.26"
source: |
import helloworld
Expand All @@ -176,7 +177,7 @@ spec:
assert.NoError(t, err)
resultYaml, err := yaml.Parse(tc.expectResult)
assert.NoError(t, err)
assert.Equal(t, result[0], resultYaml)
assert.Equal(t, result[0].MustString(), resultYaml.MustString())
} else {
assert.Error(t, err)
assert.Contains(t, err.Error(), tc.expectErrMsg)
Expand Down
3 changes: 1 addition & 2 deletions pkg/edit/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

"kcl-lang.io/cli/pkg/options"
"kcl-lang.io/kpm/pkg/client"
pkg "kcl-lang.io/kpm/pkg/package"
"kcl-lang.io/krm-kcl/pkg/api"
"sigs.k8s.io/kustomize/kyaml/errors"
"sigs.k8s.io/kustomize/kyaml/yaml"
Expand All @@ -35,7 +34,7 @@ func LoadDepListFromConfig(cli *client.KpmClient, dependencies string) ([]string
if err != nil {
return nil, errors.Wrap(err)
}
pkg, err := pkg.LoadKclPkg(tmpDir)
pkg, err := cli.LoadPkgFromPath(tmpDir)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 343c33c

Please sign in to comment.