-
Notifications
You must be signed in to change notification settings - Fork 170
[macros] add support for on_start/on_end to select_loop! #2671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
commonware-mcp | a59d60b | Jan 02 2026, 08:02 PM |
Deploying monorepo with
|
| Latest commit: |
a59d60b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b6781f02.monorepo-eu0.pages.dev |
| Branch Preview URL: | https://andre-select-loop-start-end.monorepo-eu0.pages.dev |
|
For the places where I updated the code to use |
8f82089 to
101b82d
Compare
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #2671 +/- ##
========================================
Coverage 92.62% 92.62%
========================================
Files 357 357
Lines 102996 103136 +140
========================================
+ Hits 95396 95534 +138
- Misses 7600 7602 +2
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This PR extends the
select_loop!macro with optionalon_startandon_endblocks, enabling cleaner patterns for code that needs to run at the beginning or end of each loop iteration.The
on_startblock executes before the select, allowing variable initialization that's visible to all arms. Theon_endblock runs after any non-shutdown arm completes but is skipped when shutdown triggers, which is useful for cleanup or post-processing logic. Both blocks share lexical scope with the select arms.This allows migrating some more places to use the
select_loop!macro.