-
Notifications
You must be signed in to change notification settings - Fork 52
fix #1252: Add predictable naming to tasks instead of UUIDs #1253
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,7 +21,6 @@ | |||||||||||||||||||||||||||||||||||||||||
| import java.util.Collections; | ||||||||||||||||||||||||||||||||||||||||||
| import java.util.List; | ||||||||||||||||||||||||||||||||||||||||||
| import java.util.Objects; | ||||||||||||||||||||||||||||||||||||||||||
| import java.util.UUID; | ||||||||||||||||||||||||||||||||||||||||||
| import java.util.function.Consumer; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -35,6 +34,17 @@ | |||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||
| public abstract class BaseTaskItemListBuilder<SELF extends BaseTaskItemListBuilder<SELF>> { | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| public final String TYPE_SET = "set"; | ||||||||||||||||||||||||||||||||||||||||||
| public final String TYPE_FOR = "for"; | ||||||||||||||||||||||||||||||||||||||||||
| public final String TYPE_SWITCH = "switch"; | ||||||||||||||||||||||||||||||||||||||||||
| public final String TYPE_RAISE = "raise"; | ||||||||||||||||||||||||||||||||||||||||||
| public final String TYPE_FORK = "fork"; | ||||||||||||||||||||||||||||||||||||||||||
| public final String TYPE_LISTEN = "listen"; | ||||||||||||||||||||||||||||||||||||||||||
| public final String TYPE_EMIT = "emit"; | ||||||||||||||||||||||||||||||||||||||||||
| public final String TYPE_TRY = "try"; | ||||||||||||||||||||||||||||||||||||||||||
| public final String TYPE_HTTP = "http"; | ||||||||||||||||||||||||||||||||||||||||||
| public final String TYPE_OPENAPI = "openapi"; | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+37
to
+46
|
||||||||||||||||||||||||||||||||||||||||||
| public final String TYPE_SET = "set"; | |
| public final String TYPE_FOR = "for"; | |
| public final String TYPE_SWITCH = "switch"; | |
| public final String TYPE_RAISE = "raise"; | |
| public final String TYPE_FORK = "fork"; | |
| public final String TYPE_LISTEN = "listen"; | |
| public final String TYPE_EMIT = "emit"; | |
| public final String TYPE_TRY = "try"; | |
| public final String TYPE_HTTP = "http"; | |
| public final String TYPE_OPENAPI = "openapi"; | |
| protected static final String TYPE_SET = "set"; | |
| protected static final String TYPE_FOR = "for"; | |
| protected static final String TYPE_SWITCH = "switch"; | |
| protected static final String TYPE_RAISE = "raise"; | |
| protected static final String TYPE_FORK = "fork"; | |
| protected static final String TYPE_LISTEN = "listen"; | |
| protected static final String TYPE_EMIT = "emit"; | |
| protected static final String TYPE_TRY = "try"; | |
| protected static final String TYPE_HTTP = "http"; | |
| protected static final String TYPE_OPENAPI = "openapi"; |
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto-generated names currently use this.list.size() as the suffix, which makes the first generated name end with -0. Issue #1252’s example suggests set-1 for the first unnamed task; please confirm whether the index should be 1-based and adjust the implementation/tests accordingly (e.g., size() + 1) if that’s the expected contract.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SwitchTaskFluent.on(Consumer)now passesnullas the name, but this builder only applies default naming inonPredicate(...)and still adds switch items with the rawnameinon(String, ...). That means.on(...)will now createSwitchItems with null/blank names. Please add the same null/blank defaulting foron(String, ...)(or overrideon(Consumer)in this builder) so switch items always have deterministic non-blank names.