-
Notifications
You must be signed in to change notification settings - Fork 88
Fix KCL function parameter unit conversion to work in ZDS #8205
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
Conversation
Signed-off-by: Nick Cameron <[email protected]>
The latest updates on your projects. Learn more about Vercel for GitHub.
|
CodSpeed Instrumentation Performance ReportMerging #8205 will not alter performanceComparing Summary
Footnotes |
.unwrap(); | ||
let mut exec_state = ExecState::new(&ctx); | ||
ctx.run(&program, &mut exec_state).await.map_err(|e| e.error).unwrap(); | ||
println!("{:#?}", exec_state.errors()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably be eprintln
and should be wrapped in if !exec_state.errors().is_empty()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output from main.rs is very debug-y and I found it useful to have the []
as an indicator of no errors.
To be pedantic, it's reporting an error with the user's code not reporting an error with the program, so I think it should be using print
rather than eprint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with one nit
It's also a bug fix, so fine to land according to our breaking change policy |
Extracted from #8103.
Before, types of function parameters did not get serialized. So using them in the app had no effect even though they should coerce arguments to the parameter type, including converting units.
I see this as a minor breaking change. I expect it to impact few users since few KCL programs use parameter types to coerce.