Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlyCheck unable to find sandboxed packages #33

Closed
geraldus opened this issue May 26, 2015 · 5 comments
Closed

FlyCheck unable to find sandboxed packages #33

geraldus opened this issue May 26, 2015 · 5 comments
Labels

Comments

@geraldus
Copy link

Currently I'm using shared sandbox created by Stackage CLI1, but I had same problem with normal sandbox. FlyCheck reports me a lot of haskell-ghc checker "Could not find module" errors when checking sandboxed project (output of C-c ! C-c haskell-ghc RET):

-- mode: compilation; default-directory: "~/Haskell/SandBox/" --
Compilation started at Tue May 26 17:52:21

ghc -Wall -fno-code -i/Users/arthurfayzrakhmanov/Haskell/SandBox/ -x hs /Users/arthurfayzrakhmanov/Haskell/SandBox/Foundation.hs

Handler/Form/Import.hs:13:18:
Could not find module ‘Text.Shakespeare.I18N’
Use -v to see a list of the files searched for.

Handler/Form/Import.hs:14:18:
Could not find module ‘Yesod.Core’
Use -v to see a list of the files searched for.

Handler/Form/Import.hs:15:18:
Could not find module ‘Yesod.Form.Fields’
Use -v to see a list of the files searched for.
… and so on

And cabal list --installed from project root makes sure that modules are actually installed:

$ cabal list --installed

…

* shakespeare
    Synopsis: A toolkit for making compile-time interpolated templates
    Default available version: 2.0.5
    Installed versions: 2.0.5
    Homepage: http://www.yesodweb.com/book/shakespearean-templates
    License:  MIT 
…

* yesod-core
    Synopsis: Creation of type-safe, RESTful web applications.
    Default available version: 1.4.9.1
    Installed versions: 1.4.9.1
    Homepage: http://www.yesodweb.com/
    License:  MIT

* yesod-form
    Synopsis: Form handling support for Yesod Web Framework
    Default available version: 1.4.4.1
    Installed versions: 1.4.4.1
    Homepage: http://www.yesodweb.com/
    License:  MIT

…

I guess this is because of checker use ghc -Wall -fno-code -i<path> command; should it use cabal in case of sandboxed projects?

@swsnr
Copy link
Contributor

swsnr commented May 26, 2015

Please show the output of C-c ! v. Does it work after M-x normal-mode?

@swsnr
Copy link
Contributor

swsnr commented May 26, 2015

Besides, it's Flycheck, not FlyCheck, and there's no reason to emphasize it…

@swsnr
Copy link
Contributor

swsnr commented May 26, 2015

And, additionally, please show me your Flycheck Haskell setup from your init file.

@geraldus
Copy link
Author

Please excuse me, I've updated flycheck-haskell and now the issue is not relevant!
BTW, C-c ! v showed me green statuses for each checker and I don't know where did I get this capital C from! (:

@swsnr
Copy link
Contributor

swsnr commented May 26, 2015

@geraldus Never mind :) I'm unsure how a Flycheck update could have solved this, unless you used a very old version, but I'm happy that it works for you now :)

@swsnr swsnr added invalid and removed needs-input labels May 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants