-
Notifications
You must be signed in to change notification settings - Fork 12
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
Runtime: warn when an expression doesn't return state #832
Conversation
93e1325
to
889fdd6
Compare
yet to add some additional tests! |
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.
This is fantastic @doc-han, thank you so much! It's a really good, clean PR and you've done all the right things.
Having had a little play with this and the output, I'm having some thoughts about the structure.
At the end of an operation, if no state was returned, let's always logger.debug(
warning: operation ${name} did not return state`). That gives us a nice log in-context, and because it's debug level we can easily hide it.
So the output will be like:
[R/T] ❯ Starting operation 1
[R/T] ❯ Warning: operation 1 did not return state
[R/T] ❯ Operation 1 complete in 0ms
Plus there are some other comments
I think most of our user errors will be reduced extremely when they have development time help(proper static & semantic validations) |
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.
See comment!
f142839
to
f7541df
Compare
f7541df
to
8032762
Compare
8032762
to
406926e
Compare
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.
Fantastic @doc-han , thanks
One little tweak please, then can I ask you to run pnpm changeset
and generate a runtime patch log?
Then I can get this merged and released tomorrow 🎉
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.
Thanks! I'll do a final check and release in the morning 🚀
Short Description
This PR
Fixes #737 #761
Implementation Details
when an operation fails to return state.
Before
After
QA Notes
List any considerations/cases/advice for testing/QA here.
AI Usage
Please disclose how you've used AI in this work (it's cool, we just want to know!):
You can read more details in our Responsible AI Policy