Skip to content
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

Merged
merged 8 commits into from Mar 30, 2019
Merged

Feat/local execution #82

merged 8 commits into from Mar 30, 2019

Conversation

sirlensalot
Copy link
Contributor

Done, but currently hanging after the first request ...

@sirlensalot sirlensalot marked this pull request as ready for review March 29, 2019 19:51
Copy link
Member

@emilypi emilypi left a 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
Copy link
Member

@emilypi emilypi Mar 29, 2019

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)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great catch @larskuhtz

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Thanks @slpopejoy

@sirlensalot sirlensalot merged commit 541d36c into master Mar 30, 2019
@sirlensalot sirlensalot deleted the feat/local-execution branch March 30, 2019 04:02
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.

None yet

4 participants