Skip to content

fix(resolve): use >= for dependency limit check (#7)#34

Open
SAY-5 wants to merge 1 commit into
erdemtuna:mainfrom
SAY-5:fix/issue-7-dep-limit-off-by-one
Open

fix(resolve): use >= for dependency limit check (#7)#34
SAY-5 wants to merge 1 commit into
erdemtuna:mainfrom
SAY-5:fix/issue-7-dep-limit-off-by-one

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented Apr 30, 2026

Summary

Fixes #7. len(visited) > maxTotalDeps allowed the visited map to reach 201 entries before the error fired (insertion happens before the check). Switching to >= makes the check trip the moment visited reaches the documented 200-dep ceiling.

Change

internal/resolve/resolver.go:325, >>=.

Test plan

  • go build ./..., clean
  • go test ./internal/resolve/..., passes (no existing test exercised the boundary; behavior change is the minimal-impact >= swap requested in the issue)

Signed-off-by: SAY-5 <say.apm35@gmail.com>
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.

Bug: Off-by-one in dependency limit check

1 participant