-
Notifications
You must be signed in to change notification settings - Fork 175
Compiler #if directive leads to lexical error message. #460
Comments
I'm not sure what happened, but now I can't reproduce this behaviour (though I was able to in past, and checked it several times before open issue). |
You need |
Also my fork is completely untested with the emacs frontend. I got told the newly introduced logging to stderr confuses emacs so you might want to replace ghc-mod(i) with a script that redirects stderr to /dev/null or make |
Sorry for such unclear report, strange magic happening around here. CPP extension is listed in cabal file (this is Yesod scaffolded web site). Yesterday I was able to make checking of this project though, but don't know how! All I've noticed that there was another warning, but check was successful (I've tested various project files after that, running ghc-mod from project root):
But today I still have issue with directives. I also have Regarding Emacs: I didn't understand solutions you suggested, but don't bother yourself (dunno how to redirect output, and how to replace ghc-mod, and don't know what «nop» means). |
Here is another little observation: it is still successfully checks some files, for example $ ghc-mod check Foundation.hs
info: loadTargets: Switching to LinkInMemory/HscInterpreted (memory hungry)
Internal/Persist.hs:7:1:Warning: Orphan instance: instance persistent-2.1.2:Database.Persist.Sql.Class.PersistFieldSql Answer
Internal/Persist.hs:7:1:Warning: Orphan instance: instance persistent-2.1.2:Database.Persist.Class.PersistField.PersistField Answer When checking other files I see mentioned error. I tried to run |
Can you post the whole output of So the significant hint in the output is the I think erroring out when no component assignment can be found might be better but IIRC there was some case that breaks completely if I do that. |
Sorry for such long delay, I'm out of my usual location now, and have limited internet access. Here is the full log (sorry, have to hide some real names, I hope this will not affect overall report):
Also, I've built this code inside docker container today for some production tests (also project was temporary sandboxed). After that I had another error:
Finally, all errors are gone again and all checks succeed now. Please excuse me, I feel myself very stupid because of such confusing reports. |
Odd the module The unboxed tuples thing is a known issue with a known fix that I seem to have forgotten about: #451. Basically just use What did you do to make everything succeed? |
Oh actually I think I have an idea the paths above should all be absolute, in the version you have there was one function that didn't canonical the paths it returns but to search for matching modules IIRC I just do (==) so that might be why ghc-mod is not finding the Application module in the module graph. |
Module
I didn't done anything special. I've just plugged my project as volume in docker image; logged in docker image, initiated sandbox, and built the project. As I can see, there was a sandbox when I've done I hope it was helpful a bit! Will be glad to test new versions. |
On Mon, Apr 13, 2015 at 01:44:57AM -0700, Артур Файзрахманов wrote:
That doesn't matter ghc-mod does transitive module dependecy
So what was that about the error you got in docker first then? I
I just pushed a few more changes I'm curious if it still happens now. Either way there should now be a new command Use it like:
(I just found a bug in that though looks like it only accepts absolute |
I've used docker to build executable for production only (i.e. to make build in same environment as my VPS have). I do all development under OS X (and ghc-mod also lives in OS X only), so I just wanted to say, that I didn't done anything special, also there was no changes is code.
Ok, I'll be able to rebuild |
Looks like it could be closed now. |
I have Yesod project, when I try to check it with ghc-mod it fails because of there is
#if-#else
directives inSettings/Development.hs
file:The error message I have is:
$ ghc-mod check Application.hs
Note: I'm using upcoming
ghc-mod
version from Daniel's repository, because I'm usingcabal-1.22
, so I can't be certain does this issue occurs with ghc-mod form master branch of original repository.This also have impact on Emacs' ghc-mod support:
The text was updated successfully, but these errors were encountered: