-
Notifications
You must be signed in to change notification settings - Fork 124
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
Print function is broke #1535
Comments
cc @zong-zhe I think bug is involved in this refactor issue and forget to set the logger to os.Stdout |
@Peefy you are right! const code = `
import kcl_plugin.hello
name = "kcl"
sum = hello.add(option("a"), option("b"))
+++print("hello world")
`
func TestNativeRun(t *testing.T) {
--- yaml := MustRun("main.k", WithCode(code), WithOptions("a=1", "b=2")).GetRawYamlResult()
+++ yaml := MustRun("main.k", WithCode(code), WithLogger(os.Stdout), WithOptions("a=1", "b=2")).GetRawYamlResult()
fmt.Println(yaml)
} At the sdk-go level, I thought Stdout was used as the logger by default. |
This was referenced Aug 2, 2024
Closed by kcl-lang/kpm#428 and kcl-lang/cli#122 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cc @Peefy @He1pa
Now,
Print
is not working, and i found the tests for print seems like all disabled:kcl/test/grammar/builtins/default/print/hello_world/main.k
Line 1 in 8f654a0
NOTE: i have check the
cli
,kpm
andkcl-go
, i believe that the problem iskcl-lang/kcl
I have enable this test and then failed.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your KCL components version? (Required)
The text was updated successfully, but these errors were encountered: