Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

Remove handling for deleted `delete-nonlocal` error type (#5980)

Trevor Manz74eed833d9d0
diff --git a/.github/workflows/test_fe.yaml b/.github/workflows/test_fe.yaml
index 989aa83070..ae3b24ab6a 100644
--- a/.github/workflows/test_fe.yaml
+++ b/.github/workflows/test_fe.yaml
@@ -23,8 +23,7 @@ jobs:
filters: |
frontend:
- 'frontend/**'
- - 'lsp/**'
- - 'openapi/**'
+ - 'packages/**'
test_frontend:
needs: changes
diff --git a/.github/workflows/test_fe_dagger.yaml.skip b/.github/workflows/test_fe_dagger.yaml.skip
index c470bfac2b..2cdf5251ea 100644
--- a/.github/workflows/test_fe_dagger.yaml.skip
+++ b/.github/workflows/test_fe_dagger.yaml.skip
@@ -21,8 +21,7 @@ jobs:
filters: |
frontend:
- 'frontend/**'
- - 'lsp/**'
- - 'openapi/**'
+ - 'packages/**'
- 'dagger/**'
test_frontend:
diff --git a/frontend/src/components/editor/output/MarimoErrorOutput.tsx b/frontend/src/components/editor/output/MarimoErrorOutput.tsx
index 9793297615..a8a38e2d60 100644
--- a/frontend/src/components/editor/output/MarimoErrorOutput.tsx
+++ b/frontend/src/components/editor/output/MarimoErrorOutput.tsx
@@ -96,10 +96,6 @@ export const MarimoErrorOutput = ({
(e): e is Extract<MarimoError, { type: "import-star" }> =>
e.type === "import-star",
);
- const deleteNonlocalErrors = errors.filter(
- (e): e is Extract<MarimoError, { type: "delete-nonlocal" }> =>
- e.type === "delete-nonlocal",
- );
const interruptionErrors = errors.filter(
(e): e is Extract<MarimoError, { type: "interruption" }> =>
e.type === "interruption",
@@ -363,30 +359,6 @@ export const MarimoErrorOutput = ({
);
}
- if (deleteNonlocalErrors.length > 0) {
- messages.push(
- <div key="delete-nonlocal">
- {deleteNonlocalErrors.map((error, idx) => (
- <div key={`delete-nonlocal-${idx}`}>
- {`The variable '${error.name}' can't be deleted because it was defined by another cell (`}
- <CellLinkError cellId={error.cells[0] as CellId} />
- {")"}
- </div>
- ))}
- {cellId && (
- <AutoFixButton errors={deleteNonlocalErrors} cellId={cellId} />
- )}
- <Tip title="Why can't I delete other cells' variables?">
- marimo determines how to run your notebook based on variables
- definitions and references only. When a cell deletes a variable it
- didn't define, marimo cannot determine an unambiguous execution
- order. Try refactoring so that you can delete variables in the cells
- that create them.
- </Tip>
- </div>,
- );
- }
-
if (interruptionErrors.length > 0) {
messages.push(
<div key="interruption">