Skip to content

Link <for> branch owners from the serialized branch list instead of per-branch _ props - #3353

Open
DylanPiercey wants to merge 1 commit into
mainfrom
for-branch-list-owners
Open

Link <for> branch owners from the serialized branch list instead of per-branch _ props#3353
DylanPiercey wants to merge 1 commit into
mainfrom
for-branch-list-owners

Conversation

@DylanPiercey

Copy link
Copy Markdown
Contributor

Description

A marker-free <for> serializes its branch scopes as a list on the parent, yet each branch also serializes an identical _: _(parent) owner prop — O(n) redundancy for the common "loop body reads ancestor state" shape.

  • The branch list now serializes through an owner-assigning wrapper (_.o(ownerId, scopes)); the resume runtime links each branch's owner from it (a serialized owner still wins, matching marker behavior).
  • When markers are statically off, the per-branch _ prop is elided outright; when the marker reason is runtime-dependent (e.g. of=input.items), _ serializes behind that same guard, so marker-off renders drop it and marker-on renders keep today's behavior.
  • With the owner gone, branches with nothing else to say are elided from the fill entirely.

Example (for-tag-static-value-with-closure): Aa:[_(2),…,_(5)] plus four {_:_(1)} fills becomes just Aa:_.o(1,[_(2),…,_(5)]).

Checklist:

  • I have read the CONTRIBUTING document and have signed (or will sign) the CLA.
  • I have updated/added documentation affected by my changes.
  • I have added tests to cover my changes.

Generated by Claude Code

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7e7299f

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

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

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.30%. Comparing base (9849a13) to head (7e7299f).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3353   +/-   ##
=======================================
  Coverage   94.29%   94.30%           
=======================================
  Files         388      388           
  Lines       53085    53153   +68     
  Branches     4237     4240    +3     
=======================================
+ Hits        50058    50125   +67     
- Misses       2998     3000    +2     
+ Partials       29       28    -1     

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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