fix: resolve relative path sources in --sandbox uv export#9052
Merged
dmadisetti merged 7 commits intomarimo-team:mainfrom Apr 23, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
1 task
Bundle ReportBundle size has no change ✅ Affected Assets, Files, and Routes:view changes for bundle: marimo-esmAssets Changed:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes sandbox failures when uv export --script emits relative local path requirements by rewriting those paths to be absolute based on the script’s directory before writing the temp requirements file used by uv run --with-requirements.
Changes:
- Resolve
.-prefixed path requirement lines fromuv export --scriptinto absolute paths in the sandbox CLI. - Add a regression test covering editable and non-editable relative path lines as well as unchanged “normal” and already-absolute deps.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
marimo/_cli/sandbox.py |
Converts relative path lines from uv export --script output to absolute paths rooted at the script directory. |
tests/_cli/test_sandbox.py |
Adds a unit test to ensure relative paths in exported requirements are resolved correctly. |
dmadisetti
previously approved these changes
Apr 21, 2026
Collaborator
dmadisetti
left a comment
There was a problem hiding this comment.
@VishakBaddur Thanks! The helper function means we can test directly
for more information, see https://pre-commit.ci
a39fa8c to
bceb60f
Compare
Collaborator
|
Thanks @VishakBaddur ! |
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.23.3-dev37 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #8980
Problem
marimo edit --sandboxfails when a script's inline metadata uses relativepathsources in[tool.uv.sources].uv export --scriptreturns paths relative to the script file, but those lines get written to a temp requirements file. Whenuv run --with-requirementsprocesses that file, it resolves paths relative to CWD - not the script's directory - causing path resolution failures.Fix
In
_uv_export_script_requirements_txt(marimo/_cli/sandbox.py), convert any relative paths (.-prefixed) to absolute paths using the script's parent directory as the base. Handles both editable (-e ../../) and non-editable (../../) path sources. Non-path deps and already-absolute paths are left unchanged.Test
Added
test_uv_export_script_requirements_txt_resolves_relative_pathscovering:-e ../../) → resolved to absolute../other_pkg) → resolved to absolutenumpy==1.26.0) → unchanged