Skip to content

Add %lsmagic -v for magic load debugging#366

Merged
blink1073 merged 2 commits intoCalysto:mainfrom
blink1073:address-193
Mar 13, 2026
Merged

Add %lsmagic -v for magic load debugging#366
blink1073 merged 2 commits intoCalysto:mainfrom
blink1073:address-193

Conversation

@blink1073
Copy link
Copy Markdown
Contributor

Closes #193.

Summary

  • reload_magics() now records magic_search_paths and magic_load_errors on the kernel after each load cycle
  • %lsmagic gains a -v/--verbose flag that prints the search paths and any load errors (or "No load errors.")
  • Adds a "Debugging magic loading" section to docs/new_magic.md explaining how to use %lsmagic -v and how to diagnose the editable-vs-regular-install issue described in the issue

Test plan

  • %lsmagic output unchanged without -v
  • %lsmagic -v shows search paths and "No load errors." on a clean kernel
  • A broken magic file produces an entry under "Load errors:" when using -v
  • All existing tests pass (just test)

Expose magic search paths and load errors via `%lsmagic --verbose` so
users can diagnose why a magic is missing without needing log access.
Closes Calysto#193.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.97%. Comparing base (e203cf8) to head (c1e935b).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #366      +/-   ##
==========================================
+ Coverage   90.92%   90.97%   +0.05%     
==========================================
  Files          51       51              
  Lines        2886     2903      +17     
  Branches      404      408       +4     
==========================================
+ Hits         2624     2641      +17     
  Misses        183      183              
  Partials       79       79              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Tests cover both the clean path (search paths shown, no errors) and the
error path (broken magic file surfaces in load errors output).
@blink1073 blink1073 enabled auto-merge (squash) March 13, 2026 03:58
@blink1073 blink1073 merged commit 1988e3c into Calysto:main Mar 13, 2026
25 checks passed
@blink1073 blink1073 deleted the address-193 branch March 13, 2026 04:00
@blink1073 blink1073 mentioned this pull request Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debugging magics

2 participants