himura / twitter-conduit

Twitter API package for Haskell, including enumerator interfaces and Streaming API supports.
BSD 2-Clause "Simplified" License
158 stars 48 forks source link

add support for http-conduit-2.3 and conduit-1.3 #59

Closed cdepillabout closed 6 years ago

cdepillabout commented 6 years ago

This PR adds support for both http-conduit-2.3 and conduit-1.3.

At work we are trying to use twitter-conduit with stackage's lts-11, which includes http-conduit-2.3 and conduit-1.3. Once this gets merged it, it would be great if you could cut a release!

It seems like there are quite a few changes in conduit-1.3. ResumableSource has been removed, so now some of the http-conduit functions just return a normal Source instead. (Also, Source has been deprecated, and the conduit docs say to use the full ConduitT type.) Now some of the functions in this package are returning a ConduitT instead of a ResumableSource.

Also, there was a problem with using MonadBase IO. To be honest, I'm not sure what the problem was. I think some type has lost a MonadBase instance, but I didn't really look into what has happened. Instead, I just switched everything to using MonadIO. I don't think there should be a problem with this, but if there is, let me know.

I think the Snoyman-family of libraries have been moving away from MonadBase and MonadBaseControl and instead settling on MonadIO and UnliftIO. I thought this might be the reason for the MonadBase IO problem, but like I said, I didn't look into it.

I also modified the travis.yml file to test on ghc-8.4.3.

This PR would require a major version bump before being released to Hackage.

cdepillabout commented 6 years ago

I haven't actually tried compiling this PR with older versions of GHC/http-conduit/conduit yet. I'll do that tomorrow.

Also, if the CI tests fail I'll try to figure out why.

cdepillabout commented 6 years ago

Okay, it looks like with commit 798e90d, everything should be building successfully.

This PR should be ready for review.

himura commented 6 years ago

It looks great! Thanks a lot. I'll merge and release it to hackage sooner.