fix(test): restore namespace after explicit run-tests - #798
Conversation
Review summaryVerified the fix directly: reverted just the one-line change ( Also checked:
Small, correct, well-tested fix. LGTM — approving. |
nooga
left a comment
There was a problem hiding this comment.
Verified the fix reproduces and resolves the reported error; regression test is genuine (confirmed it fails without the fix). See summary comment.
|
This remains approved and its head checks are green at @jasalt, please update/rebase the contributor-owned branch and resolve the generated-artifact overlap, then let CI rerun. I will not push to it. Once it is current-base, conflict-free, and fully green, it is eligible to land. |
Summary
Fix
test/run-testsfailing after otherwise successful tests when called with explicit namespaces.The explicit-namespace branch saves
*ns*as a namespace object, but attempted to restore it with:nameonly accepts symbols, keywords, or strings in let-go—not namespace objects—so restoration throws:The no-argument branch already handles namespace objects correctly with
ns-name. This change makes the explicit branch use the same conversion:Reproduction
Before this fix (lg 1.12.2), the assertion passes, but
run-teststhrows while restoring the caller namespace, causing the command to fail:After this fix, the test completes successfully and the caller’s namespace is restored:
Clojure reference
Babashka v1.13.219:
Changes
ns-namewhen explicit namespaces are passed.run-testsreturns without a restoration error;Testing
make check-generatedmake testLLM assisted PR (gpt-5.6-sol)