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
Feat/local execution #82
Conversation
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.
LGTM 👍
case r of | ||
Left e -> liftIO $ putMVar _localResultVar $ Left e | ||
Right r' -> liftIO $ putMVar _localResultVar r' | ||
go |
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.
Ah so it wasn't forming runlooping. Cool 👍
@@ -175,7 +175,7 @@ initPactService' ver cid chainwebLogger spv act = do | |||
let !pd = P.PublicData def (unsafeGetChainId cid) def def | |||
let !pse = PactServiceEnv Nothing checkpointEnv spv pd | |||
|
|||
evalStateT (runReaderT act pse) theState | |||
evalStateT (runReaderT act pse) (PactServiceState theState Nothing) |
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.
This uses the lazy state monad. Is this intentional? Could it increase the risk of space leaks?
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.
@marklnichols any comment here -- both PactService
and Chainweb.Pact.Types
use lazy state. Was there a reason for this? I'm assuming it was an oversight.
Fixing.
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.
Great catch @larskuhtz
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.
Note doing strict state across the board @emmanueldenloye @marklnichols @emilypi .
Also cleaning up some other warnings -- uninitialized variables in tests, and Lars' putLog
(underscoring).
@@ -507,7 +507,7 @@ withElasticsearchBackend mgr esServer ixName inner = do | |||
, HTTP.requestHeaders = [("content-type", "application/json")] | |||
} | |||
|
|||
putLog a = HTTP.defaultRequest | |||
_putLog a = HTTP.defaultRequest |
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.
👍 Thanks @slpopejoy
Done, but currently hanging after the first request ...