Skip to content

feat(value): add foreach APIs for lists and objects - #2032

Open
jpnurmi wants to merge 1 commit into
masterfrom
jpnurmi/feat/value-foreach
Open

feat(value): add foreach APIs for lists and objects#2032
jpnurmi wants to merge 1 commit into
masterfrom
jpnurmi/feat/value-foreach

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Add interruptible callbacks for visiting the values of a list and the key/value pairs of an object. A non-zero callback return stops iteration, and the same value is returned to the caller.

Note: callbacks may modify the container freely. Those changes are applied, but the current iteration continues over the entries present when it began.

Close: #2017

Add callbacks for visiting the values of a list and the key/value pairs
of an object.

Callbacks may modify the container. Those changes are applied, but the
current iteration continues over the entries present when it began.

A non-zero callback return stops iteration, and the same value is
returned to the caller.

Close: #2017
@jpnurmi
jpnurmi force-pushed the jpnurmi/feat/value-foreach branch from 82777a3 to b8eff51 Compare August 28, 2026 10:14
@github-actions

Copy link
Copy Markdown
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against b8eff51

@jpnurmi

jpnurmi commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator Author

@limbonaut Would this kind of foreach solution work for sentry-godot? I was hoping to get away without implementing a full-blown iterator API. 😅

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.33%. Comparing base (719803e) to head (b8eff51).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2032      +/-   ##
==========================================
+ Coverage   74.21%   74.33%   +0.11%     
==========================================
  Files         104      104              
  Lines       26627    26653      +26     
  Branches     4844     4848       +4     
==========================================
+ Hits        19762    19813      +51     
+ Misses       5519     5489      -30     
- Partials     1346     1351       +5     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@limbonaut limbonaut left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Visitor will totally work for what we need in Godot.

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.

Add ability to iterate object keys

2 participants