Closed creichert closed 8 years ago
Cool. When snap lands in nightly that'll be good.
Do you happen to know where MonadCatchIO has gone? Is it in base now?
MonadCatchIO-transformers not in nightly because its marked unmaintained. We need it for the test suite; it appears to be the catch
that was used in MonadSnap, and snap-core presently depends on it. Deprecated in favour of exceptions apparently, wherein there is a MonadCatch with a catch
.
I'm not going to leave this much longer. I hope Snap will get onto GHC 8, but if it's not going to make it then perhaps I should use something else for the test suite. Anyone have any suggestions for a light HTTP server to embded in-process for http-stream's test suite?
I'm working on the Snap 1.0 release this weekend and am planning to have it out by August 7.
@mightybyte Hey Dough, awesome! Do you have a sense of how to deal with the MonadCatch thing? https://github.com/snapframework/snap-core/issues/256#issuecomment-229992026 makes a good point; seems like it's all that's needed.
Snap 1.0 solves the problem by using monad-control instead of MonadCatchIO-transformers.
Oh dear. After all that, I just discovered snap-server depends on http-streams for its testsuite
target. That's inconvenient, seeing as how this project depends on Snap for its test suite. Anyway, stack test
fails to resolve right now. Not sure what to do about that.
While constructing the BuildPlan the following exceptions were encountered:
-- Failure when adding dependencies:
http-streams: needed (>=0.7 && <0.9), couldn't resolve its dependencies
needed for package snap-server-1.0.0.0
Yeah, bootstrapping the test suites is a bit of a pain. But the two test suites don't depend on each other. They just depend on the libraries themselves. So you should be able to build snap-server 1.0, then http-streams (whatever version supports snap 1.0), then the snap-server test suite, then the http-streams test suite. I believe @gregorycollins has this set up on Jenkins (it's been sending messages to #snapframework). Once we upload snap-server-1.0 to hackage it should be easier.
@mightybyte Hm. Right now I've got
resolver: nightly-2016-07-19
packages:
- /home/andrew/vcs/haskell/io-streams-haproxy
- /home/andrew/vcs/haskell/snap-core
- /home/andrew/vcs/haskell/snap-server
- .
flags:
http-streams:
network-uri: true
in stack.yaml because I'm having to get Snap from git master. I'm not sure what I can do to convince stack to go and build snap-server ignoring the dependency. You're right, of course; this will be easier when snap-server-1.0 is released.
(doing stack install snap-server
to try and force it ahead of time doesn't do it)
I can't find any way to convince stack to build the library. I think I'm back to needing to remove snap-server as a dependency. We'll have to find some other way to test our code.
[I'm pleased that you chose to use http-streams in your test suite, of course]
Can you just manually run the tests using cabal-install once before you release? This problem should go away once we release snap which is still on track for happening in a week and a half.
@afcowie You can use the following stack.yaml file, plus the obviously needed changes to your .cabal file:
resolver: nightly-2016-07-27
packages:
- .
- location:
git: https://github.com/snapframework/snap-server
commit: 6977049674f406944d325b1575d7e2b588da7c92
extra-dep: true
- location:
git: https://github.com/snapframework/snap-core
commit: 3f49a1662cad466861b5ec4b1e88812328d26b1b
extra-dep: true
- location:
git: https://github.com/snapframework/io-streams-haproxy
commit: ee84473f6fe3a6049a40ea4156277efcfde37603
extra-dep: true
flags:
http-streams:
network-uri: true
I've confirmed that it finds a build plan, but it's still in the process of building.
PR #97 resolves this.
Merged. Tests pass on GHC 7.10 and 8.0 now. Most excellent. Thanks @snoyberg Do you want me to [re]submit http-streams to nightly? I can't remember whether it's library build or test build that has to pass to be in (if just library, then I don't need to wait on Snap 1.0 getting in)
Please do. There's a section for skipped tests in the yaml configuration file, please just add http-streams there too so it doesn't complain about the lack of a compatible snap.
On Fri, Jul 29, 2016, 1:48 AM Andrew Cowie notifications@github.com wrote:
Closed #96 https://github.com/afcowie/http-streams/issues/96.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/afcowie/http-streams/issues/96#event-738552386, or mute the thread https://github.com/notifications/unsubscribe-auth/AADBB7gx27ij_V3HkTWZZPWa7blKzompks5qaTHSgaJpZM4In_lp .
A new stackage nightly is ready for GHC 8 (
nightly-2016-05-26
).http-streams
was temporarily pulled from stackage for GHC 8 compatibility.Links for reference:
Here are the initial error messages from
stack
while trying to patch the issue:I believe some of the necessary changes have been made in
snap-core
: