{"action":"opened","issue":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/1268","labels_url":"https://api.github.com/repos/commercialhaskell/stack/issues/1268/labels{/name}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/issues/1268/comments","events_url":"https://api.github.com/repos/commercialhaskell/stack/issues/1268/events","html_url":"https://github.com/commercialhaskell/stack/issues/1268","id":114616090,"number":1268,"title":"stack ghci treats all local packages with project cabal settings","user":{"login":"parsonsmatt","id":7310112,"avatar_url":"https://avatars.githubusercontent.com/u/7310112?v=3","gravatar_id":"","url":"https://api.github.com/users/parsonsmatt","html_url":"https://github.com/parsonsmatt","followers_url":"https://api.github.com/users/parsonsmatt/followers","following_url":"https://api.github.com/users/parsonsmatt/following{/other_user}","gists_url":"https://api.github.com/users/parsonsmatt/gists{/gist_id}","starred_url":"https://api.github.com/users/parsonsmatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parsonsmatt/subscriptions","organizations_url":"https://api.github.com/users/parsonsmatt/orgs","repos_url":"https://api.github.com/users/parsonsmatt/repos","events_url":"https://api.github.com/users/parsonsmatt/events{/privacy}","received_events_url":"https://api.github.com/users/parsonsmatt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-02T15:22:00Z","updated_at":"2015-11-02T15:22:00Z","closed_at":null,"body":"# Steps to Reproduce:\r\n\r\nThe easiest way to demonstrate the issue is to have a project with `NoImplicitPrelude` and a `local-packages` dependency without the extension. A minimal reproduction is available [here](https://github.com/parsonsmatt/stack-repro).\r\n\r\n1. Run `stack build` -- compilation proceeds as expected.\r\n2. Run `stack ghci` -- it will print errors about `Prelude` stuff not being in scope in the extradep source.\r\n\r\n# Expected\r\n\r\nUse local packages `.cabal` files to determine what language extensions are appropriate\r\n\r\n# Actual\r\n\r\nLocal packages have `NoImplicitPrelude` enabled from the project's cabal file.\r\n\r\nThe command output with `stack ghci --verbose`:\r\n\r\n```bash\r\nVersion 0.1.6.0, Git revision e22271f5ce9afa2cb5be3bad9cafa392c623f85c (2313 commits) x86_64\r\n2015-11-02 15:11:06.654383: [debug] Checking for project config at: /home/matt/Projects/stack-repro/noprelude/stack.yaml @(stack_AExdckAgYVa6TDUNGi5WTl:Stack.Config src/Stack/Config.hs:546:9)\r\n2015-11-02 15:11:06.654602: [debug] Loading project config file stack.yaml @(stack_AExdckAgYVa6TDUNGi5WTl:Stack.Config src/Stack/Config.hs:569:13)\r\n2015-11-02 15:11:06.655761: [debug] Run process: ldd /usr/bin/stack @(stack_AExdckAgYVa6TDUNGi5WTl:System.Process.Read src/System/Process/Read.hs:272:3)\r\n2015-11-02 15:11:06.66406: [debug] Trying to decode /home/matt/.stack/build-plan-cache/x86_64-linux/lts-3.8.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)\r\n2015-11-02 15:11:06.6737: [debug] Success decoding /home/matt/.stack/build-plan-cache/x86_64-linux/lts-3.8.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)\r\n2015-11-02 15:11:06.673977: [debug] Run process: ghc --info @(stack_AExdckAgYVa6TDUNGi5WTl:System.Process.Read src/System/Process/Read.hs:272:3)\r\n2015-11-02 15:11:06.703633: [debug] Run process: ghc --numeric-version @(stack_AExdckAgYVa6TDUNGi5WTl:System.Process.Read src/System/Process/Read.hs:272:3)\r\n2015-11-02 15:11:06.717697: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_AExdckAgYVa6TDUNGi5WTl:System.Process.Read src/System/Process/Read.hs:272:3)\r\n2015-11-02 15:11:06.731585: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_AExdckAgYVa6TDUNGi5WTl:System.Process.Read src/System/Process/Read.hs:272:3)\r\n2015-11-02 15:11:06.744804: [debug] Run process: locale -a @(stack_AExdckAgYVa6TDUNGi5WTl:System.Process.Read src/System/Process/Read.hs:272:3)\r\n2015-11-02 15:11:06.745847: [debug] Checking resolver: lts-3.8 @(stack_AExdckAgYVa6TDUNGi5WTl:Stack.Build.Source src/Stack/Build/Source.hs:162:17)\r\n2015-11-02 15:11:06.745963: [debug] Trying to decode /home/matt/.stack/build-plan-cache/x86_64-linux/lts-3.8.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)\r\n2015-11-02 15:11:06.749296: [debug] Success decoding /home/matt/.stack/build-plan-cache/x86_64-linux/lts-3.8.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)\r\n2015-11-02 15:11:06.751795: [debug] Checking resolver: lts-3.8 @(stack_AExdckAgYVa6TDUNGi5WTl:Stack.Build.Source src/Stack/Build/Source.hs:162:17)\r\n2015-11-02 15:11:06.751875: [debug] Trying to decode /home/matt/.stack/build-plan-cache/x86_64-linux/lts-3.8.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)\r\n2015-11-02 15:11:06.757394: [debug] Success decoding /home/matt/.stack/build-plan-cache/x86_64-linux/lts-3.8.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)\r\n2015-11-02 15:11:06.759018: [debug] Trying to decode /home/matt/.stack/indices/Hackage/00-index.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)\r\n2015-11-02 15:11:06.895016: [debug] Success decoding /home/matt/.stack/indices/Hackage/00-index.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)\r\n2015-11-02 15:11:06.899251: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_AExdckAgYVa6TDUNGi5WTl:System.Process.Read src/System/Process/Read.hs:272:3)\r\n2015-11-02 15:11:06.922499: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/matt/.stack/snapshots/x86_64-linux/lts-3.8/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_AExdckAgYVa6TDUNGi5WTl:System.Process.Read src/System/Process/Read.hs:272:3)\r\n2015-11-02 15:11:07.056551: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/matt/Projects/stack-repro/noprelude/.stack-work/install/x86_64-linux/lts-3.8/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_AExdckAgYVa6TDUNGi5WTl:System.Process.Read src/System/Process/Read.hs:272:3)\r\n2015-11-02 15:11:07.075877: [debug] Checking resolver: lts-3.8 @(stack_AExdckAgYVa6TDUNGi5WTl:Stack.Build.Source src/Stack/Build/Source.hs:162:17)\r\n2015-11-02 15:11:07.075994: [debug] Trying to decode /home/matt/.stack/build-plan-cache/x86_64-linux/lts-3.8.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)\r\n2015-11-02 15:11:07.079777: [debug] Success decoding /home/matt/.stack/build-plan-cache/x86_64-linux/lts-3.8.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)\r\n2015-11-02 15:11:07.081586: [debug] Trying to decode /home/matt/.stack/indices/Hackage/00-index.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)\r\n2015-11-02 15:11:07.220651: [debug] Success decoding /home/matt/.stack/indices/Hackage/00-index.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)\r\n2015-11-02 15:11:07.224529: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_AExdckAgYVa6TDUNGi5WTl:System.Process.Read src/System/Process/Read.hs:272:3)\r\n2015-11-02 15:11:07.249743: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/matt/.stack/snapshots/x86_64-linux/lts-3.8/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_AExdckAgYVa6TDUNGi5WTl:System.Process.Read src/System/Process/Read.hs:272:3)\r\n2015-11-02 15:11:07.36951: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/matt/Projects/stack-repro/noprelude/.stack-work/install/x86_64-linux/lts-3.8/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_AExdckAgYVa6TDUNGi5WTl:System.Process.Read src/System/Process/Read.hs:272:3)\r\n2015-11-02 15:11:07.384576: [debug] Trying to decode /home/matt/.stack/indices/Hackage/00-index.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)\r\n2015-11-02 15:11:07.515492: [debug] Success decoding /home/matt/.stack/indices/Hackage/00-index.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)\r\n2015-11-02 15:11:07.515604: [debug] Trying to decode /home/matt/.stack/indices/Hackage/00-index.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:53:5)\r\n2015-11-02 15:11:07.661802: [debug] Success decoding /home/matt/.stack/indices/Hackage/00-index.cache @(stack_AExdckAgYVa6TDUNGi5WTl:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:62:13)\r\n2015-11-02 15:11:07.721336: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_AExdckAgYVa6TDUNGi5WTl:System.Process.Read src/System/Process/Read.hs:272:3)\r\n2015-11-02 15:11:07.735606: [info] Configuring GHCi with the following packages: stack-repro, extradep @(stack_AExdckAgYVa6TDUNGi5WTl:Stack.Ghci src/Stack/Ghci.hs:83:5)\r\n2015-11-02 15:11:07.735697: [debug] Run process: ghc --interactive -odir=/home/matt/Projects/stack-repro/noprelude/.stack-work/odir/ -hidir=/home/matt/Projects/stack-repro/noprelude/.stack-work/odir/ -hide-all-packages -XNoImplicitPrelude -i/home/matt/Projects/stack-repro/noprelude/ -i/home/matt/Projects/stack-repro/noprelude/src/ -i/home/matt/Projects/stack-repro/noprelude/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/autogen/ -i/home/matt/Projects/stack-repro/noprelude/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/ -stubdir=/home/matt/Projects/stack-repro/noprelude/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/ -optP-include -optP/home/matt/Projects/stack-repro/noprelude/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/autogen/cabal_macros.h -package-id=base-4.8.1.0-4f7206fd964c629946bb89db72c80011 -hide-all-packages -i/home/matt/Projects/stack-repro/noprelude/.stack-work/downloaded/7a5605ac4f897b7881cede65ef793b63defa8f4474cab2f64d2c849c20f1d85e.git/ -i/home/matt/Projects/stack-repro/noprelude/.stack-work/downloaded/7a5605ac4f897b7881cede65ef793b63defa8f4474cab2f64d2c849c20f1d85e.git/src/ -i/home/matt/Projects/stack-repro/noprelude/.stack-work/downloaded/7a5605ac4f897b7881cede65ef793b63defa8f4474cab2f64d2c849c20f1d85e.git/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/autogen/ -i/home/matt/Projects/stack-repro/noprelude/.stack-work/downloaded/7a5605ac4f897b7881cede65ef793b63defa8f4474cab2f64d2c849c20f1d85e.git/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/ -stubdir=/home/matt/Projects/stack-repro/noprelude/.stack-work/downloaded/7a5605ac4f897b7881cede65ef793b63defa8f4474cab2f64d2c849c20f1d85e.git/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/ -optP-include -optP/home/matt/Projects/stack-repro/noprelude/.stack-work/downloaded/7a5605ac4f897b7881cede65ef793b63defa8f4474cab2f64d2c849c20f1d85e.git/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/autogen/cabal_macros.h -package-id=base-4.8.1.0-4f7206fd964c629946bb89db72c80011 Lib Dep @(stack_AExdckAgYVa6TDUNGi5WTl:Stack.Exec src/Stack/Exec.hs:52:5)\r\nGHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help\r\n[1 of 2] Compiling Dep              ( /home/matt/Projects/stack-repro/noprelude/.stack-work/downloaded/7a5605ac4f897b7881cede65ef793b63defa8f4474cab2f64d2c849c20f1d85e.git/src/Dep.hs, interpreted )\r\n\r\n/home/matt/Projects/stack-repro/noprelude/.stack-work/downloaded/7a5605ac4f897b7881cede65ef793b63defa8f4474cab2f64d2c849c20f1d85e.git/src/Dep.hs:3:8:\r\n    Not in scope: type constructor or class ‘IO’\r\n\r\n/home/matt/Projects/stack-repro/noprelude/.stack-work/downloaded/7a5605ac4f897b7881cede65ef793b63defa8f4474cab2f64d2c849c20f1d85e.git/src/Dep.hs:5:3:\r\n    Not in scope: ‘putStrLn’\r\nFailed, modules loaded: none.\r\nLeaving GHCi.\r\n```\r\n\r\nRelated: #1154 \r\n\r\nWhen `extra-dep: true` is present in the entry of the package in `stack.yaml`, then the problem doesn't occur."}}