Skip to content

Conversation

@starpit
Copy link
Member

@starpit starpit commented Mar 12, 2025

Warning

DO NOT MERGE, depends on #752 being merged first.

Refines #752 to use a separate venv for every distinct codeblock requirements… and that updates the pdl AST so that it transparently launches the python code using that venv.

This requires extending CodeBlock so that the code field, for lang: command can be an array — i.e. an argv array. Currently it’s a string, meaning that call_command() needs to resort to a shlex.split(" ") which is problematic w.r.t. nested quotes.

For example, if i have a CodeBlock with code that contains jinja variable expansions that expand to include single quotes… it is difficult in general to construct a string command line that works. whereas if i could provide an args array, this problem goes away.

Signed-off-by: Nick Mitchell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant