Skip to content

Remove TODO on duplicated work unit wrapper + add explanatory comment#1011

Merged
brandur merged 1 commit into
masterfrom
brandur-work-unit-wrapper-todo
Aug 14, 2025
Merged

Remove TODO on duplicated work unit wrapper + add explanatory comment#1011
brandur merged 1 commit into
masterfrom
brandur-work-unit-wrapper-todo

Conversation

@brandur

@brandur brandur commented Aug 12, 2025

Copy link
Copy Markdown
Contributor

This one comes from me trying to find a good alternative to fix a TODO
in rivertest/worker.go over the duplicated work unit wrapper and
factory types. Unfortunately I found that there is no good fix available
because anything we do introduces a cyclic dependency. Having put very
low level types like Job, JobArgs, and Workerinto the top-levelriver` package unfortunately acts to hugely limit our ability to move
things around.

So instead, I just remove the TODO here since there's nothing to be
done, and replace it with an explanatory comment saying how this isn't
great, but it's the only viable method that we know of.

This one comes from me trying to find a good alternative to fix a TODO
in `rivertest/worker.go` over the duplicated work unit wrapper and
factory types. Unfortunately I found that there is no good fix available
because anything we do introduces a cyclic dependency. Having put very
low level types like `Job`, `JobArgs, and `Worker` into the top-level
`river` package unfortunately acts to hugely limit our ability to move
things around.

So instead, I just remove the TODO here since there's nothing to be
done, and replace it with an explanatory comment saying how this isn't
great, but it's the only viable method that we know of.
@brandur brandur merged commit 9262a68 into master Aug 14, 2025
10 checks passed
@brandur brandur deleted the brandur-work-unit-wrapper-todo branch August 14, 2025 07:21
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.

2 participants