godot
godot copied to clipboard
Expression Evaluator (REPL support with inspector sequent results)
Meoowww... I made an expression evaluator.
Looks like this:

I overloaded
void GDScriptLanguage::debug_get_stack_level_locals(int p_level, List<String> *p_locals, List<Variant> *p_values, int p_max_subitems, int p_max_depth)
definitions with
void GDScriptLanguage::debug_get_stack_level_locals(int p_level, Vector<String> *p_locals, Array *p_values, int p_max_subitems, int p_max_depth)
because Expression methods accepts Vector<String> and Array soo I didn't copy List<String> and List<Variant> datas into Vector<String> and Array.
I connected EditorDebuggerInspector's object_selected to inspect objects from evaluater result to inspector bar.
Fixes godotengine/godot-proposals#4473
Thanks for opening a pull request!
Please amend the commit to use a human-readable commit message (git commit --amend). This way, people reading the Git log can easily figure out what's going on :slightly_smiling_face:
PS: It's "evaluator", not "evaluater".
PS: It's "evaluator", not "evaluater".
Hiiii @Calinou I refactored the typo.
Please squash commits together as required by our pipeline (https://docs.godotengine.org/en/latest/community/contributing/pr_workflow.html).
Hiiii @Chaosus I squashed commits.
Hiii, I added missing overloading of virtual method for C# bindings, trimmed trailing spaces and squashed commits.
I ordered includes for format checker and squashed commits again. 🙀
Meow.. @Chaosus @Calinou clang-format is acting interesting. I ran clang_format.sh in my local and it ordered the includes but it still wants a different order in Github workflow. 🙀
@rohanrhu Make sure your clang-format version matches the one we're using. As of this comment, that would be version 13: https://github.com/godotengine/godot/blob/8fee88947e7c5ac7171b056088c3ac5ae20e954e/.github/workflows/static_checks.yml#L27
Can someone help @rohanrhu write a proposal for this so we can all meow.
Can someone help @rohanrhu write a proposal for this so we can all meow.
Yesss I want to meoowww.
I meowed a proposal: https://github.com/godotengine/godot-proposals/issues/4473
Meoowwww can anyone review this PR?? 🙀
Hi! This is really nice work! Just for reference, we discussed that feature a while ago and had a working implementation but because the codebase changed too much it was never implemented (#26219). It also supported watchpoints and usability was more ironed out. Would you be interested in following up that work? We could go with just evals (what your PR does) and wachpoints can be implemented later on.
Hi! This is really nice work!
Oh Reduzz.... thank you 🙀
Would you be interested in following up that work?
Yess sure. 🙂
This is one of the features I am waiting for, I hope It will make into Godot 4
This is one of the features I am waiting for, I hope It will make into Godot 4
I think there is no reason not to merge this.. I will resolve conflicts in latest revision. I'm very busy right now.
Hewwwoooo, let's merge this plss it just works like a charm 😊
Btw I will work on more features on this when I have timeeee
Bump, this would be a useful feature to have and I almost made a duplicate.
This PR is neither mergeable nor reviewable with 803 commits wrongly added during rebase. It would need to be rebased again to remove the duplicated commits, or redone.
@akien-mga I willl meoowww about ittt 🙀
Is there any chance of this getting cleaned up and finalized for 4.1? This would be awesome for new users
Is there any chance of this getting cleaned up and finalized for 4.1? This would be awesome for new users
akien-mga's comment above still stands. This PR needs to be rebased before it can be reviewed.
Judging from the OP's activity with other PRs, this is not going to happen unless someone else takes over.
Judging from the OP's activity with other PRs, this is not going to happen unless someone else takes over.
Oh sorryyy I'm working so much.. I will rebase it soon.
I have rebased this PR again in https://github.com/godotengine/godot/compare/master...LinqLover:godot:expression-evaluater (based on the last commit of @rohanrhu, 57c8a0d855e2a792004d66606fbafbf879a60f23). Not sure whether this helps, but at least it should facilitate the review (13 changed files with 3,476 additions and 0 deletions) ... Anyway, this PR was previously approved by @atsd34, and the ancestry problem is now solved. I would (too) be glad to see this feature come to life in Godot, meow!
Can you remake the pull request to godot engine?
@fire See https://github.com/godotengine/godot/pull/76736
I rebased the PR. Thank you very much to @LinqLover for extracting my commit from broken branch.
Since Godot PRs are being merged in a very slow progress, I think I can add more features to this, please let me know what you would like to have with the evaluator. I already have some ideas to add.
I'll take care of format checking too. I forgot how to run it locally lol.
I forgot how to run it locally lol.
See https://docs.godotengine.org/en/stable/contributing/development/code_style_guidelines.html#pre-commit-hook :slightly_smiling_face: