Skip to content

feat: keep rust-managed code block venvs separate #755

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

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