Skip to content

fix: many fixes and extractor improvements#512

Merged
DylanPiercey merged 1 commit into
mainfrom
extractor-refactor
Jun 17, 2026
Merged

fix: many fixes and extractor improvements#512
DylanPiercey merged 1 commit into
mainfrom
extractor-refactor

Conversation

@DylanPiercey

Copy link
Copy Markdown
Contributor

Refactor the main extractor logic which allows for many simplifications and fixes.
This PR also contains a small bug bash.

See changesets for more details.

@DylanPiercey DylanPiercey self-assigned this Jun 17, 2026
@changeset-bot

changeset-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 96225b7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@marko/language-tools Patch
@marko/language-server Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation Bot moved this to Todo in Roadmap Jun 17, 2026
@DylanPiercey DylanPiercey merged commit 35a1050 into main Jun 17, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Roadmap Jun 17, 2026
@DylanPiercey DylanPiercey deleted the extractor-refactor branch June 17, 2026 15:51
@github-actions github-actions Bot mentioned this pull request Jun 17, 2026
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

This PR refactors the extractor token model to introduce a Mapping enum distinguishing full, alias, and anchor mappings, and adds Extractor.anchor for zero-length source-anchored tokens. attach-scopes.ts gains a range field on VarBinding, a new ProgramBinding export, an analyzeMutations flag, and fixes for mutation tracking in for-loops, destructuring assignments, and function declarations. The script extractor replaces all tag-name comment injections with anchor() calls, updates hoist binding iteration to use binding objects, and introduces #hasScopeExpression/#writeScopeExpression helpers. The language server adds findReferences and findDocumentHighlights handlers, updates findDefinition to return multiple links via sourceRangesAt, and rewrites doRename to accumulate edits across all generated offsets. Test fixtures for tag-variable mutation patterns and seven changeset entries are included.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.52% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: many fixes and extractor improvements' accurately reflects the main objective of the PR, which is to refactor extractor logic and include multiple bug fixes.
Description check ✅ Passed The description relates to the changeset by explaining the refactoring of extractor logic and mentioning a bug bash, directing readers to changesets for more details.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch extractor-refactor

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant