You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two projects. One is a yesod web site and it references the other project. The way I do this is by adding the git url of the second project to the yesod one in it's stack.yaml. This works fine with stack build, but it doesn't work with stack repl. I get errors when ghci processes files from the second project because that project expects Prelude to be implicitly imported.
There are two sources where the extension is mentioned. It's set in the yesod project's cabal file and it's set in the .ghci file.
I don't really know what to do about this. If I remove the extensions from the .ghci file, the yesod project doesn't build, but if I keep them there the other project doesn't build.
There's also some weird interaction happening when I add or remove the extensions from the cabal file. What can I do about this?
Again, stack build works fine. Is there a way to avoid having to interpret the other project at all? Why can't it just work like it does for other packages I include from stackage?
The text was updated successfully, but these errors were encountered:
stack ghci will tell you that there are mismatched extension flags and that this will . There are plans to reduce the number of extensions specified in the cabal file for yesod templates - yesodweb/yesod-scaffold#109 . The workaround is to remove them from the extensions in cabal and moving them to {-# LANGUAGE ... #-} pragmas in the modules that need it.
There isn't anything we can do about this - having stack ghci load multiple packages is really a hack that just happens to work decently in practice. Doing it properly will require support from GHC: https://ghc.haskell.org/trac/ghc/ticket/10827
Is there a way to avoid having to interpret the other project at all? Why can't it just work like it does for other packages I include from stackage?
Since it's in the packages list, it's treated as a local package. You probably need extra-dep: True for that package. Yeah, I don't like that very much.. This will probably be cleaned up, hopefully soonish, by resolving the following issues: #1265#1217#1501
By default, stack ghci loads up all executable and library components of every local package. You could also do stack ghci my-main-package to only load that package.
I have two projects. One is a yesod web site and it references the other project. The way I do this is by adding the git url of the second project to the yesod one in it's stack.yaml. This works fine with
stack build
, but it doesn't work withstack repl
. I get errors whenghci
processes files from the second project because that project expects Prelude to be implicitly imported.There are two sources where the extension is mentioned. It's set in the yesod project's cabal file and it's set in the
.ghci
file.I don't really know what to do about this. If I remove the extensions from the
.ghci
file, the yesod project doesn't build, but if I keep them there the other project doesn't build.There's also some weird interaction happening when I add or remove the extensions from the cabal file. What can I do about this?
Again,
stack build
works fine. Is there a way to avoid having to interpret the other project at all? Why can't it just work like it does for other packages I include from stackage?The text was updated successfully, but these errors were encountered: