Skip to content

Fix getTagDefForTagName seen tag tracking - #3773

Merged
DylanPiercey merged 1 commit into
mainfrom
dpiercey-ws-eslint-wv2qux-tagdef-seen
Aug 6, 2026
Merged

Fix getTagDefForTagName seen tag tracking#3773
DylanPiercey merged 1 commit into
mainfrom
dpiercey-ws-eslint-wv2qux-tagdef-seen

Conversation

@DylanPiercey

Copy link
Copy Markdown
Contributor

The seen set in getTagDefForTagName was checked by tag definition but populated with tag name, so the guard never hit: the watch file check re-ran on every call and duplicate watch file entries piled up. Fixing the mismatch improves a 400-template compileSync benchmark from ~222ms to ~188ms (median).

@changeset-bot

changeset-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1bc31db

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

This PR includes changesets to release 1 package
Name Type
@marko/compiler 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

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7cfcc1c3-5809-471e-86cb-5a4bb899d790

📥 Commits

Reviewing files that changed from the base of the PR and between 74b41ab and 1bc31db.

📒 Files selected for processing (2)
  • .changeset/tagdef-seen.md
  • packages/compiler/src/babel-utils/taglib.js

Walkthrough

getTagDefForTagName now tracks seen tag definitions by tagDef object identity instead of tag name. This prevents repeated watch-file checks and duplicate watch-file entries when multiple tag names resolve to the same definition. A patch changeset documents the compiler fix.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the fix to seen-tag tracking in getTagDefForTagName.
Description check ✅ Passed The description accurately explains the seen-set mismatch, its effects, and the benchmark improvement.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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 dpiercey-ws-eslint-wv2qux-tagdef-seen

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

@DylanPiercey
DylanPiercey merged commit eb25d4c into main Aug 6, 2026
3 checks passed
@DylanPiercey
DylanPiercey deleted the dpiercey-ws-eslint-wv2qux-tagdef-seen branch August 6, 2026 17:51
@github-actions github-actions Bot mentioned this pull request Aug 6, 2026
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.

1 participant