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

StaticFile / fromResource: effects not handled. #2592 #2611

Closed
wants to merge 2 commits into from

Conversation

@pravin-raha
Copy link
Contributor

commented May 30, 2019

Added functional effect to getResource.

@pravin-raha pravin-raha changed the title StaticFile / fromResource: effects not handled. #2592 WIP: StaticFile / fromResource: effects not handled. #2592 May 30, 2019

@rossabaker
Copy link
Member

left a comment

Thanks! This looks correct to me. We could minimize the amount of code in Sync with:

OptionT(Sync[F].delay(getClass.getResource(name + ".gz"))).map(Option(_))

Minimizing Sync is generally good, but it would cost us an extra map, so I'm fine with it as is. The important thing is that we will raise an error into F instead of throwing, which this achieves.

This is binary compatible, so we might just cherry-pick this onto series/0.20 to get it out in a patch.

@pravin-raha pravin-raha changed the title WIP: StaticFile / fromResource: effects not handled. #2592 StaticFile / fromResource: effects not handled. #2592 Jun 4, 2019

@pravin-raha

This comment has been minimized.

Copy link
Contributor Author

commented Jun 4, 2019

Ok, Thanks.

@rossabaker rossabaker added this to the 0.20.2 milestone Jun 5, 2019

rossabaker added a commit that referenced this pull request Jun 5, 2019

@rossabaker

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

Cherry-picked onto series/0.20 as 714f096.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.