-
Notifications
You must be signed in to change notification settings - Fork 100
Initial usable SDK interface and state machine translation #25
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
Merged
Merged
Changes from all commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
3b974d1
Pretty far with impl, but just ran into big generic wall.
Sushisource 0ee244b
Test helper translation mostly done. Need to dedupe.
Sushisource dd5f544
Cleanup to make things cleaner with peeking. Dedupe not worth it.
Sushisource bf60b34
Need to implement non_stateful_event
Sushisource 495ba2b
More progress. In the middle of implementing non stateful event handler.
Sushisource 84a3fe4
Merge branch 'master' into implement-workflow-machines
Sushisource bc0dd18
Implement event dispatch pattern & add visibility to fsm!
Sushisource a23441d
Workflow task state machine partially implemented
Sushisource 2120430
Saving progress. Halfway through detangling workflow task machine cal…
Sushisource 911db19
Annoying function factoring
Sushisource 2de4a50
Cleanup, got to timer started command
Sushisource eeb723a
Remove unneded trait
Sushisource 5b46c78
Now need to implement handle command event! brr brr brr
Sushisource 66dc259
Moving to deskstop
Sushisource aefb9b9
Managed to get past gnarly borrow checker problems
Sushisource fb2671e
So close! Just producing wrong cmd at end
Sushisource 20eec95
Erroneous command is gone. Just need to trigger WF completion
Sushisource 576bfcf
Things are coming together! Just need to add a complete workflow machine
Sushisource fef3c32
Woohooo! This is pretty much working. Spitting out an extra command, …
Sushisource 9f09a0a
Clean up clippy warnings for tomorrow me
Sushisource 157a9ab
Checkpointing before I use tracing to make this more understandable
Sushisource 1186d24
Tracing makes debug easier
Sushisource a5d0a04
IDE just didn't commit a bunch of stuff, cool.
Sushisource d0f5343
Test helpers to own modules before rework
Sushisource 54246bd
Modify interface
af6c682
Moving back to desktop
Sushisource 05768de
Nice! Refactoring to allow handling *just* machine commands. Remove T…
Sushisource 84b717a
Add new way to create the timers with completion future
Sushisource b499fa9
Getting real close. Just need to wrap the command sink to be able to …
Sushisource f0f9562
Remarkably close. Saving this before trying slot type approach
Sushisource d42c549
Done! YAY!
Sushisource a45a1cc
Clippy fixes
Sushisource 1a44f34
Remove/fix some todos
Sushisource 3d0d4eb
Missed a word
Sushisource df99d7e
Remove Sync+Send impl for CoreSDKInitOptions
8ef8bba
Add workflow_id to SDKWFTask
aaf3c65
Simple rename / comment upgrade
Sushisource fbb27b0
Merge remote-tracking branch 'origin/implement-workflow-machines' int…
Sushisource 30cb2aa
Merge branch 'implement-workflow-machines' into interface-design
Sushisource 9d5fec0
Fix up clippy lints and remove async from sdk trait
Sushisource 38e8e89
Add autoconversion to make life easier for lang side proto construction
Sushisource fc25233
Some prototyping of how we might glue FSMs to CoreService
Sushisource 7d26c3c
Define an SDK Command type
ac75640
Made some reasonable progress. Trying to figure out how to push comma…
Sushisource 1b1e3c9
Merge remote-tracking branch 'origin/interface-design' into interface…
Sushisource 757eb56
Merge branch 'master' into interface-design
Sushisource 1eed2cb
Pushing broken stuff so can pair w/ Vitaly
Sushisource 9a61adb
Make stuff compile
vitarb 5cb642f
Set us up for tomorrow
Sushisource f102bb2
Remove SDK prefix and refine interface a bit
f03824c
Made enough meaningful progress
vitarb cb88807
Amend the core interface with meeting conclusions
bergundy 90c8468
Compile fix
Sushisource 55d26db
Clean up one of the more obnoxious proto conversion chains
Sushisource a4723a3
Dumping all the stuff
vitarb a136972
Merge
vitarb 9cac8b6
compiling
vitarb 4e15a15
add assertion
vitarb 8f541fc
Upgrade histinfo test a bit
Sushisource b2838c9
Add comments etc from our meet with Max
Sushisource 8e9016c
Woo! Test is going. Need to do some cleanup and need to pump tasks *o…
Sushisource b24aa33
:tada: The test works! The activations go out! Commands come in! Clea…
Sushisource 51f75d9
Just a smidge of cleanup
Sushisource e6a2436
Use run id instead of wfid
Sushisource File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,8 @@ | ||
| extern crate state_machine_trait as rustfsm; | ||
|
|
||
| use state_machine_trait::TransitionResult; | ||
| use std::convert::Infallible; | ||
|
|
||
| #[test] | ||
| fn tests() { | ||
| let t = trybuild::TestCases::new(); | ||
| t.pass("tests/trybuild/*_pass.rs"); | ||
| t.compile_fail("tests/trybuild/*_fail.rs"); | ||
| } | ||
|
|
||
| // Kept here to inspect manual expansion | ||
| state_machine_procmacro::fsm! { | ||
| name SimpleMachine; command SimpleMachineCommand; error Infallible; | ||
|
|
||
| One --(A(String), foo)--> Two; | ||
| One --(B)--> Two; | ||
| Two --(B)--> One; | ||
| Two --(C, baz)--> One | ||
| } | ||
|
|
||
| #[derive(Default, Clone)] | ||
| pub struct One {} | ||
| impl One { | ||
| fn foo(self, _: String) -> SimpleMachineTransition { | ||
| TransitionResult::default::<Two>() | ||
| } | ||
| } | ||
| impl From<Two> for One { | ||
| fn from(_: Two) -> Self { | ||
| One {} | ||
| } | ||
| } | ||
|
|
||
| #[derive(Default, Clone)] | ||
| pub struct Two {} | ||
| impl Two { | ||
| fn baz(self) -> SimpleMachineTransition { | ||
| TransitionResult::default::<One>() | ||
| } | ||
| } | ||
| impl From<One> for Two { | ||
| fn from(_: One) -> Self { | ||
| Two {} | ||
| } | ||
| } | ||
|
|
||
| pub enum SimpleMachineCommand {} |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.