Closed llattila closed 3 years ago
Is this error during the initial build of the project or later? I mean, the plugin is using the REPL (GHCi) to validate the code.
I think it is later (this Template stuff goes over my head anyways and not sure how this compile magic works :D ) as it reacts very fast to the changes in the file location. It's almost immediate (like 1 second) if I change the file location whether the error appears or disappears. As such, I think it is the REPL validation and not the actual building process.
Sorry, then I don’t know a solution. If you know how to solve this with stack repl
then I can maybe solve this issue in the plugin.
Does the IntelliJ-Haskell plugin call the :r
command frequently or how does it handle the building? I can investigate the issue a bit and inform if I can get a more knowledgeable answer on the issue
It calls mainly :load
. Thanks!
If I have understood correctly, the GHCi will use the base folder of the project. As such, when it is trying to locate the proto
file, it is one folder deeper. However, stack build
will use a different directory when building. Found some related discussions five years ago and the Stack
developers mentioned, the problems come from the GHCi interface
. I could ask from their support as well, whether there is a solution. For now, I have created a very non-hacky solution by creating a symbolic link in the base folder to my sub-package file which works locally :D
I could update this when I hear something from the Stack
guys to see whether things have changed.
Got some good feedback from the guys at FPComplete. They suggested using the following to handle the issue:
This should allow one to properly handle files even if there are multiple packages.
I'm creating a protobuf service with Haskell using the project: https://github.com/higherkindness/mu-haskell. Inside IntelliJ-Haskell, I get the following error:
On the command line
stack build
works as expected. File is located at:If I put the whole local path to the file (
/home/project/sub-package/predictor.proto
), IntelliJ-Haskell recognizes it and removes the error. However, this is not an actual solution after it goes to our GIT. Are there any easy fixes to this issue?