Skip to content

fix: improve performance for dynamic input intersections#495

Merged
DylanPiercey merged 1 commit into
mainfrom
dynamic-tag-input-intersection
Jun 1, 2026
Merged

fix: improve performance for dynamic input intersections#495
DylanPiercey merged 1 commit into
mainfrom
dynamic-tag-input-intersection

Conversation

@DylanPiercey

Copy link
Copy Markdown
Contributor

Optimizes dynamic tag input intersection type performance (reduces "potentially infinite" recursion issues).

@changeset-bot

changeset-bot Bot commented Jun 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1385550

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

This PR includes changesets to release 4 packages
Name Type
@marko/language-tools Patch
@marko/language-server Patch
@marko/type-check Patch
marko-vscode 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 Jun 1, 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: 5757ae54-7394-4682-8437-9c296e8f8be2

📥 Commits

Reviewing files that changed from the base of the PR and between 61e1112 and 1385550.

⛔ Files ignored due to path filters (2)
  • packages/language-server/src/__tests__/fixtures/script/tags-api-basic/__snapshots__/tags-api-basic.expected/index.md is excluded by !**/__snapshots__/** and included by **
  • packages/language-server/src/__tests__/fixtures/script/tags-api-basic/__snapshots__/tags-api-basic.expected/index.ts is excluded by !**/__snapshots__/** and included by **
📒 Files selected for processing (3)
  • .changeset/fuzzy-planes-take.md
  • packages/language-server/src/__tests__/fixtures/script/tags-api-basic/index.marko
  • packages/language-tools/marko.internal.d.ts

Walkthrough

This pull request refactors the Marko._.DynamicRenderer<Name> conditional type to consolidate handling of Marko.Template<any, any> and string cases into a single unified renderer function that uses Marko.Input<Name> and Marko.Return<Name>, replacing the previous separate TemplateRenderer<Name> and NativeTagRenderer<Name> branches. A test fixture is updated to validate the unified renderer behavior, and a changeset documents the patch releases with release notes indicating the change improves type checking performance by preferring intersection types for dynamic tag input types.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: improve performance for dynamic input intersections' directly addresses the main change—optimizing dynamic tag input intersection types for performance, which aligns with the changeset and type definition updates.
Description check ✅ Passed The description states the PR optimizes dynamic tag input intersection type performance to reduce recursion issues, which is directly related to the changeset note and the type definition changes in marko.internal.d.ts.
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.

✏️ 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 dynamic-tag-input-intersection

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

@DylanPiercey DylanPiercey merged commit 5e05dff into main Jun 1, 2026
5 checks passed
@DylanPiercey DylanPiercey deleted the dynamic-tag-input-intersection branch June 1, 2026 21:23
@github-actions github-actions Bot mentioned this pull request Jun 1, 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