Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What now?
Here's a very dirty prototype for code-block execution in Sphere Engine.
(Like, genuinely, clean coders turn back now)
The plan here is to change the menus while in a
CodeView
context to include a button that fires of code execution, then spit that output to the console to prove a round-trip possible.Under the hood (and flying directly in the face of CORS, convention, and the heavens themselves) we use some local proxying to send our code block to Sphere Grid, who attempts to compile it directly as C# code, and yells at you if it breaks.
There's some horrendously long waiting here, because the options are to poll (which goes against the
quick
part) or recieve webhooks (which goes against thedirty
part). Instead, we just wait for long enough that we're probably going to get a result from Sphere Engine.The results are pushed straight to console.
What next?
run-code
to be part of a registered plugin. This needs to interact with the Menu plugin (and I'm of the opinion that the menu plugin can be more statefully driven, which will enable us to be a bit more dynamic with the menus when in certain contexts