Skip to content

Commit

Permalink
Merge pull request #122 from zong-zhe/fix-missing-print
Browse files Browse the repository at this point in the history
fix: fix missing Print output
  • Loading branch information
Peefy committed Aug 2, 2024
2 parents ee196e2 + 668c499 commit 3dc0915
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 46 deletions.
21 changes: 11 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
module kcl-lang.io/cli

go 1.22
go 1.22.4

toolchain go1.22.1
toolchain go1.22.5

require (
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
github.com/onsi/ginkgo/v2 v2.19.1
github.com/onsi/gomega v1.34.0
github.com/onsi/gomega v1.34.1
github.com/spf13/cobra v1.8.1
kcl-lang.io/kcl-go v0.10.0-alpha.1.0.20240730084238-c647f95196d2
kcl-lang.io/kcl-openapi v0.6.5
kcl-lang.io/kcl-playground v0.5.1
kcl-lang.io/kpm v0.9.4-0.20240730115858-1fb33d5051a8
kcl-lang.io/kpm v0.9.4
)

require (
cloud.google.com/go v0.112.1 // indirect
cloud.google.com/go/compute/metadata v0.3.0 // indirect
cloud.google.com/go/iam v1.1.6 // indirect
cloud.google.com/go/storage v1.38.0 // indirect
github.com/Microsoft/hcsshim v0.12.3 // indirect
github.com/aws/aws-sdk-go v1.44.122 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/chainguard-dev/git-urls v1.0.2 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/containerd/errdefs v0.1.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/containers/image/v5 v5.31.1 // indirect
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 // indirect
github.com/containers/ocicrypt v1.1.10 // indirect
Expand Down Expand Up @@ -65,7 +66,7 @@ require (
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/api v0.169.0 // indirect
Expand All @@ -91,11 +92,11 @@ require (
github.com/chai2010/jsonv v1.1.3 // indirect
github.com/chai2010/protorpc v1.1.4 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/containerd v1.7.11 // indirect
github.com/containerd/containerd v1.7.20 // indirect
github.com/cyphar/filepath-securejoin v0.2.5 // indirect
github.com/docker/cli v26.1.3+incompatible // indirect
github.com/docker/cli v27.1.0+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker v26.1.3+incompatible // indirect
github.com/docker/docker v27.1.0+incompatible // indirect
github.com/docker/docker-credential-helpers v0.8.1 // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-metrics v0.0.1 // indirect
Expand Down Expand Up @@ -205,7 +206,7 @@ require (
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
oras.land/oras-go v1.2.5 // indirect
oras.land/oras-go v1.2.6 // indirect
oras.land/oras-go/v2 v2.5.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
Expand Down
101 changes: 65 additions & 36 deletions go.sum

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pkg/options/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ func (o *RunOptions) Run() error {
client.WithDebug(o.Debug),
client.WithStrictRange(o.StrictRangeCheck),
client.WithCompileOnly(o.CompileOnly),
client.WithLogger(o.Writer),
)

if err != nil {
Expand Down
1 change: 1 addition & 0 deletions test/e2e/test_suites/test_kcl_run_print/input
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kcl run
Empty file.
1 change: 1 addition & 0 deletions test/e2e/test_suites/test_kcl_run_print/stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello World !
1 change: 1 addition & 0 deletions test/e2e/test_suites/test_kcl_run_print/test_space/main.k
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("Hello World !")

0 comments on commit 3dc0915

Please sign in to comment.