[web-devel] Yesod devel server and cabal-dev

Greg Weber greg at gregweber.info
Thu Mar 31 18:36:26 CEST 2011


The devel server uses hint. A while ago I had it working with cabal-dev, but
it stopped working for me lately. I have the following code that properly
sets the environment:

forkExecSh :: String -> IO ProcessID
forkExecSh command = forkProcess $ runIt >> return ()
  where
    runIt = executeFile "/bin/sh" True ("-c":[command]) cabal_dev
    cabal_dev = Just [
        ("GHC_PACKAGE_PATH","./cabal-dev/packages-7.0.2.conf/:")
      , ("PATH", "./cabal-dev/bin")
      ]

forkExecSh "wai-handler-devel 8000 Controller withApp"

I am probably going to break down soon and do something to fix the state of
development interpretation. Let me know if you are interested in working on
this.
The development server doesn't scale right now because it seems to trigger a
full reload of the application. But the hint API allows for re-loading
specific files. The hint API also has a field searchPath that might be
useful. The other thought is to try out plugins-direct or plugins.


On Thu, Mar 31, 2011 at 8:38 AM, "Timo B. Hübel" <t.h at gmx.info> wrote:

> Hi,
>
> is it possible (if yes, how?) to use the Yesod devel server with a
> sandboxed environment from cabal-dev? My main problem is, that the devel
> server is not able to load (i.e. see) custom packages that I've added via
> "cabal-dev add-source" to the sandbox. I think it all boils down to specify
> a custom package path to the Hint interpreter.
>
> Any clues?
>
> Thanks,
> Timo
>
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110331/5c86500a/attachment.htm>


More information about the web-devel mailing list