Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@adamgfraser
Copy link
Contributor

Right now specs are effectual but because the effect is a ZIO it has a fixed "scope" so when we do provideLayerShared we need to create one effect that conceptually describes "running" the entire spec so that we can provide the layer to it. This creates issues because we have to prematurely decide what execution strategy to use and some combinators don't work after provideLayerShared since we have "already run" the spec by then.

This PR changes specs to use a ZManaged so we can expand the scope dynamically. This way we can just describe providing a resource to the spec and only at the time we execute the spec keep the scope open while we execute all the tests in the suite.

@iravid
Copy link
Member

iravid commented Apr 26, 2020

As t -> ♾, all ZIO values become ZManaged values 😂

@adamgfraser adamgfraser requested a review from jdegoes April 26, 2020 09:50
jdegoes
jdegoes previously approved these changes Apr 26, 2020
@jdegoes
Copy link
Member

jdegoes commented Apr 26, 2020

:shipit:

@jdegoes jdegoes closed this Apr 26, 2020
@jdegoes jdegoes reopened this Apr 26, 2020
@adamgfraser adamgfraser requested a review from jdegoes April 27, 2020 11:04
@adamgfraser
Copy link
Contributor Author

@jdegoes I think this is ready to go.

@jdegoes jdegoes merged commit 4560d5d into zio:master Apr 30, 2020
@adamgfraser adamgfraser deleted the spec branch April 30, 2020 14:12
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.

3 participants