Skip to content

Conversation

@zach-klippenstein
Copy link
Collaborator

@zach-klippenstein zach-klippenstein commented Jun 26, 2020

This should be the last unblocker for GUWT workers.

Fixes #59.

@zach-klippenstein zach-klippenstein added this to the v1.0.0 milestone Jun 26, 2020
@zach-klippenstein zach-klippenstein requested a review from a team as a code owner June 26, 2020 19:40
@zach-klippenstein zach-klippenstein force-pushed the zachklipp/nullable-output branch 3 times, most recently from 5241a14 to 9216a69 Compare June 27, 2020 19:00
@zach-klippenstein zach-klippenstein requested a review from rjrjr June 27, 2020 19:01
@zach-klippenstein
Copy link
Collaborator Author

Discussed testing and applyTo APIs offline. Those changes are now implemented, along with a bunch of new unit tests.

@zach-klippenstein zach-klippenstein requested a review from a team June 27, 2020 19:02
* If this is already a [CancellationException], returns it as-is, otherwise wraps it in one with
* the given message.
*/
private inline fun Throwable?.toCancellationException(message: () -> String) = when (this) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This was already unused?

Copy link
Collaborator Author

@zach-klippenstein zach-klippenstein Jun 27, 2020

Choose a reason for hiding this comment

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

Yea, it stopped being used in an earlier PR but the deletion got left out of a rebase. I'm not sure why ktlint/compiler warnings for unused code didn't catch this actually.

snapshotCache: Map<WorkflowNodeId, TreeSnapshot>,
private val contextForChildren: CoroutineContext,
private val emitActionToParent: (WorkflowAction<StateT, OutputT>) -> Any?,
private val emitActionToParent: (WorkflowAction<StateT, OutputT>) -> MaybeOutput<Any?>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we really need both MaybeOutput and OutputHolder? No strong feelings about it, just surprised.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They're both internal to their modules. To share them, we'd have to make one of them public, and I don't want to do that.

@zach-klippenstein zach-klippenstein force-pushed the zachklipp/nullable-output branch from 7efe64a to e49357e Compare June 27, 2020 23:17
@zach-klippenstein zach-klippenstein merged commit b4858db into main Jun 27, 2020
@zach-klippenstein zach-klippenstein deleted the zachklipp/nullable-output branch June 27, 2020 23:47
zach-klippenstein added a commit that referenced this pull request Jun 29, 2020
After #49 made outputs nullable, and introduced new `RenderTestResult`
methods to handle nullable outputs (`verifyActionState`, `verifyActionOutput`,
and `verifyNoActionOutput`), #64 came along and introduced a dedicated
type for nullable outputs, `WorkflowOutput`. This type means that we can
revert the `RenderTestResult` changes made in #49 and return to the simpler
API with only `verifyAction` and `verifyActionResult` methods. This change
does exactly that.
zach-klippenstein added a commit that referenced this pull request Jun 29, 2020
After #49 made outputs nullable, and introduced new `RenderTestResult`
methods to handle nullable outputs (`verifyActionState`, `verifyActionOutput`,
and `verifyNoActionOutput`), #64 came along and introduced a dedicated
type for nullable outputs, `WorkflowOutput`. This type means that we can
revert the `RenderTestResult` changes made in #49 and return to the simpler
API with only `verifyAction` and `verifyActionResult` methods. This change
does exactly that.
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.

OutputT should be nullable

3 participants