Skip to content

refactor(core): remove legacy instrumentation and finalize adapter architecture (#15) - #20

Merged
joncrangle merged 6 commits into
masterfrom
feat/15-remove-legacy-instrumentation
Sep 10, 2026
Merged

joncrangle merged 6 commits into
masterfrom
feat/15-remove-legacy-instrumentation

Conversation

@joncrangle

Copy link
Copy Markdown
Owner

Closes #15

Summary

Removes remaining legacy instrumentation, wrapper modules, and compatibility infrastructure across itchy.nvim, completing the migration to the unified adapter/event architecture.

Changes

  • Legacy infrastructure removal:
    • Deleted lua/itchy/adapters/legacy.lua, lua/itchy/wrappers/, and tests/legacy_adapter_spec.lua.
    • Removed dosbatch runtime and deleted its orphaned test fixture tests/test_files/cmd.bat.
  • Strict adapter resolution:
    • adapters.resolve now fails explicitly when a runtime specifies an unknown or missing adapter.
    • Removed silent fallbacks to legacy adapters.
    • All built-in runtimes explicitly declare an adapter; custom runtimes provide a registered adapter name or adapter table.
  • Dead code removal:
    • Deleted zero-caller helpers from lua/itchy/utils.lua: should_filter_line, get_wrapped_code, parse_line_output, parse_error_output, process_output_text, process_output, process_error, apply_extmarks, is_headless.
  • Lua and Snacks integration:
    • Preserved Lua delegation to Snacks.debug.run() without adapter resolution or premature runtime loading.
    • Preserved scratch buffer clear key configuration and snacks_debug namespace clearing.
    • Added safe configuration handling for { enabled = false } tables.
  • Documentation and comments:
    • Removed stale #\d+ issue numbers and migration/transitional phrasing from production comments.
    • Rewrote README.md to document adapter-based custom runtimes, removing wrapper hack explanations. Left generated vimdocs in doc/ untouched.
  • Test coverage:
    • Added tests/adapters_spec.lua covering strict registry resolution, repository audits against legacy imports/issue references, and Lua/Snacks integration semantics.

Verification

Ran the complete test suite:

nvim -l tests/minit.lua --minitest

Result: 216 test cases passed across 17 test groups (0 fails, 0 notes).

@joncrangle
joncrangle merged commit d7ef3ff into master Sep 10, 2026
0 of 4 checks passed
@joncrangle
joncrangle deleted the feat/15-remove-legacy-instrumentation branch September 10, 2026 04:47
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.

Remove remaining legacy instrumentation code and finalize adapter architecture

1 participant