refactor: rename NotRun to Skipped - #3
Merged
Merged
Conversation
TaskInfo.NotRun named a condition in the negative, unlike every sibling option, which names what it attaches: WithSetup, WithParent, WithHandler. Skipped names the event instead, and the callback still says why. Renames TaskInfo.NotRun to TaskInfo.Skipped, WithNotRun to WithSkipped in both svcinit and instancetask, and ErrTaskNotRun to ErrTaskSkipped. Internal identifiers and the trace log message follow the same name. No behavior changes: the callback signature, call order and uniqueness guarantees are unchanged. The old exported names are removed without deprecated aliases, so dependents fail to compile rather than silently lose the hook. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TaskInfo.NotRunnamed a condition in the negative, unlike every sibling option, which names what it attaches:WithSetup,WithStart,WithParent,WithHandler.Skippednames the event instead, and the callback still says why viacause.Renames
TaskInfo.NotRunTaskInfo.SkippedWithNotRunWithSkippedinstancetask.WithNotRun[T]instancetask.WithSkipped[T]ErrTaskNotRun("task not run")ErrTaskSkipped("task skipped")Internal identifiers follow the same name:
Manager.notifyTasksSkipped, theskippedNotifiedflag inrunWithStopErrors,taskBuild.skipped, and the trace log message"notifying task skipped".Compatibility
This is a breaking change. The old exported names are removed without deprecated aliases, so dependents fail to compile rather than silently lose the hook. Losing it silently would leave a
Futureunresolved and its waiters blocked, which is the bug the hook exists to prevent.Verification
No behavior changes: the callback signature, call order and uniqueness guarantees are unchanged.
go build ./...andgo vet ./...are clean and the fullgo test ./...passes, including thefuturetasktests that cover a future being resolved withErrTaskSkippedthroughBuildTask(WithParent(...))decoration.🤖 Generated with Claude Code