Skip to content

compiler: prevent recursive class glob cycles - #2862

Merged
alixander merged 2 commits into
masterfrom
agent/fix-recursive-class-glob-cycle
Aug 28, 2026
Merged

compiler: prevent recursive class glob cycles#2862
alixander merged 2 commits into
masterfrom
agent/fix-recursive-class-glob-cycle

Conversation

@alixander

Copy link
Copy Markdown
Collaborator

Summary

  • keep recursive globs out of classes and vars definition maps
  • detect class-reference cycles during object and edge compilation
  • return a source diagnostic instead of overflowing the Go stack

Verification

  • go test ./d2ir ./d2compiler -count=1
  • go test -race ./d2ir ./d2compiler -count=1
  • go vet ./d2ir ./d2compiler
  • the minimized issue input now compiles successfully
  • full e2etests package passed
  • go test ./ci/release -count=1

Fixes #2851

@alixander
alixander merged commit 75915ca into master Aug 28, 2026
14 checks passed
@alixander
alixander deleted the agent/fix-recursive-class-glob-cycle branch August 28, 2026 14:18
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.

Error in playground: Maximum call stack size exceeded

1 participant