Skip to content

Report configs that extend each other - #1351

Merged
clauderic merged 1 commit into
docs-cache-atomic-writesfrom
cyclic-extends
Oct 20, 2026
Merged

clauderic merged 1 commit into
docs-cache-atomic-writesfrom
cyclic-extends

Conversation

@clauderic

Copy link
Copy Markdown
Member

Stacked on #1350. Review that one first; this PR's base moves down the stack as the PRs below it merge.

What are you adding in this PR?

Two theme-check configs that extend each other made theme-check hang.

  • resolveConfig followed extends without remembering where it came from, so a cycle made it recurse forever.
  • It now passes down the configs that extend the current one, and throws when the current one is among them. The error names the cycle: Cyclic extends in theme-check config: a.yml -> b.yml -> a.yml.
  • It checks the chain from the root config, not every config seen so far. So a config extended from two places, like a shared base, still resolves.

What's next? Any followup issues?

None.

Tophatting

  • npx vitest run packages/theme-check-node/src/config/resolve/resolve-config.spec.ts. Without the fix, "rejects configs that extend each other" times out.

Before you deploy

  • I included a patch bump changeset
  • My feature is backward compatible

🤖 Generated with Claude Code

@clauderic
clauderic requested a review from a team as a code owner October 20, 2026 13:15
@clauderic clauderic mentioned this pull request Oct 20, 2026
2 tasks done
@clauderic
clauderic added this pull request to stack #1353 October 20, 2026 13:15
resolveConfig followed `extends` without remembering where it came
from, so two configs that extend each other made it recurse forever,
and theme-check hung.

It now passes down the configs that extend the current one and throws
when the current one is among them. A config extended twice from
different places, like a shared base, still resolves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@clauderic
clauderic merged commit 20f8edf into main Oct 20, 2026
9 of 15 checks passed
@clauderic
clauderic deleted the cyclic-extends branch October 20, 2026 16:28
@clauderic clauderic mentioned this pull request Oct 20, 2026
1 task done
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.

3 participants