-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support custom cell executions #613
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.
LGTM
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.
Let's talk this thru today. I'd like us to provide more clarity that this, in fact, works like a #!
shebang. We can decide to do that in a follow-up PR (likely more UX than logic).
Outside of that something like /usr/bin/env python3
does not work and errors will be "swallowed". Can we improve that please. Using env
as a way to allow multi argument shebangs is commonplace.
Agreed. I used "
This is a bit complicated since we need to distinguish the program path from the arguments (this is probably a limitation of the syscall responsible for spawning a new process). Some paths can contain spaces, like "C:\Program Files...". For now I can use a simple regexp on whitespace. But eventually we would need to (in descending order of difficulty):
I think I can get this working with (1), maybe in a follow-up PR. EDIT: looks like shebang line doesn't support spaces in path, so this would be extra functionality. Definitely interested in your thoughts @sourishkrout |
@sourishkrout Just pushed changes that supports arguments in the I also fixed error handling. You should now get the following error popup if you don't provide a
And the following error popup if the user-provided
Happy to work out UX here 👍 |
f934ede
to
d23c9d5
Compare
fix tests serializer tests support languageid on grpc runner support runmeTask configurable program catch invalid program error fix tests test `getCellProgram` basic e2e test typo Co-authored-by: Sebastian Tiedtke <sebastiantiedtke@gmail.com> fix error messages format
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.
👍 LGTM, just some minor things. Feel free to change & merge.
@@ -145,6 +145,11 @@ export class Annotations extends LitElement { | |||
description: "Cell's canonical name for easy referencing in the CLI.", | |||
docs: 'https://docs.runme.dev/configuration#cell-options', | |||
}, | |||
interpreter: { | |||
description: 'Script shebang line', | |||
// FIXME: update docs link |
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.
I'll do that before releasing 👍
Allows running cells with custom languages. Provides new
program
cell annotation, with which the cell will run.Requires runme with stateful/runme#302
Depends on #590