snapframework / snap

Top-level package for the official Snap Framework libraries, includes the snaplets API as well as infrastructure for sessions, auth, and templates.
http://snapframework.com/
BSD 3-Clause "New" or "Revised" License
455 stars 68 forks source link

[0.10] Not in scope: type constructor or class `Snap' using -fdevelopment #41

Closed adinapoli closed 12 years ago

adinapoli commented 12 years ago

How to reproduce it:

    mkdir snap-play && cd snap-play
    snap init
    cabal install -fdevelopment
    snap-play

Expected behaviour:

Real behaviour:

A web handler threw an exception. Details:
Compile errors:

Not in scope: type constructor or class `Snap'
cmoore commented 12 years ago

Having this problem as well on ghc 7.4.2 with snap head from about 20 min. ago.

mightybyte commented 12 years ago

Can you download the latest github version of snap-loader-dynamic (https://github.com/snapframework/snap-loader-dynamic) and see if that fixes the problem?

adinapoli commented 12 years ago

Tried just now with bleeding-edge versions of the whole snap framework suite. It works.

One little observation, though: Updating snap-loader-dynamic warns you this way:

snap-loader-dynamic-0.9.0 (reinstall) changes: snap-core-0.9.2 -> 0.9.2.1

Is this the correct behavior or would be better to relax the constrain to use snap-core 0.9.2?

mightybyte commented 12 years ago

Our constraint includes 0.9.2. That's just a cabal message because you already have some of those packages installed.

adinapoli commented 12 years ago

Perfect, so at least for me (let's wait for @cmoore too), we can close :)

cmoore commented 12 years ago

That fixed it. Yay!

drozzy commented 12 years ago

So... what is the solution to this? Because I am getting the exact same error on Windows with latest snap. I am running an older project I created a few months ago, if that makes any difference.

Any tips on how to fix this?

mightybyte commented 12 years ago

The solution is to make sure you're using snap-loader-dynamic-0.9.0.1 that I just uploaded to hackage. The above confirmations that it works may have come from people using snap-0.10 which isn't on hackage yet, so there's an outside chance there could still be problems if you're using snap 0.9. But I think it should work with both snap versions.