Shopify / Shopify/theme-tools

Detect circular dependencies [Requires: Cross-file checking]

Open
#559 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
234
Forks
92
Avg merge
1d 3h
Merged PRs (30d)
6

Description

Acceptance Criteria

  • Explore how we could identify problematic circular dependencies
  • Depending on the result of the exploration open a PR or present your findings to the team

Notes

  • It's possible to get into an infinite loop with blocks and we wouldn't currently catch this before somebody blows up their theme
  • It's also possible to have a block render a block and it not be a problem (e.g. early return if a value is set) and we wouldn't want to throw a theme check error in that case

Detect and warn on circular dependencies. Ex: Group block has a static Text block and the Text block itself has a static Group block. This can lead to infinite loop in adding a Group block preset since static blocks are added with their container (block that contains them)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by exploring the cross-file checking and static block/container preset handling described in the issue. Investigate how circular dependencies can cause infinite loops while allowing safe cases with early returns. Done means either opening a PR with detection and warnings or presenting the exploration findings to the team.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.