-
Notifications
You must be signed in to change notification settings - Fork 47
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
First class dagger shell #736
Conversation
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.
A couple of suggestions, but overall LGTM.
One more asks I have is to add an example in the PR description of the input (exemplary Markdown) and the expected output (a script) and how it will be executed.
service NotebookService { | ||
// ResolveNotebook that takes a notebook and a cellIndex and returns a script | ||
// that takes the whole notebook into account to run as cell. | ||
rpc ResolveNotebook(ResolveNotebookRequest) returns (ResolveNotebookResponse) {} |
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.
Question: Is there any reason this method couldn't be in RunnerService
?
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.
That's where I had it first. I decided to make it a separate service because the Runner
only knows about atomic cells, and this service needs the entire notebook. Perhaps that's not "different enough". We could consider bringing it back into the Runner as part of runnerv2.
|
In order to natively support Dagger's shell Runme needs to take the entire notebook as opposed to an atomic cell into account. This PR introduces the APIs necessary to transform a notebook into a Dagger Shell script using some basic AST transformation.
Integration with extension in stateful/vscode-runme#1947.
PS: The protos are not published yet and need local-gen to work.
The new service will turn a deserialized version of the following markdown into a runnable Dagger shell script.
Simple example notebook
Unamed cell:
And the same as a named cell:
Resulting Dagger Shell Script
Running the unamed cell:
Running the named cell: