Open Hypnoes opened 4 years ago
A possible solution might be to add an explicit hie.yaml
with the contents:
cradle:
stack:
for simple projects and for more complex projects, use a more complex one, see https://github.com/haskell/haskell-ide-engine#project-configuration
You can find the components of your projects via stack ide targets
and components are your executables, library, tests and benchmarks.
@Hypnoes Can you paste the output of stack ide packages --cabal-files --stdout
and just stack ide packages --stdout
?
@Hypnoes Can you paste the output of
stack ide packages --cabal-files --stdout
and juststack ide packages --stdout
?
Nothing.
Btw, add a hie.yaml
just work for me. But why? why it work?
Ok, so how is your project setup? Do you have a stack.yaml
, package.yaml
, *.cabal
file or all of the above?
If stack build
works in your project but ide packages
doesn't spit anything out I'd actually consider this a stack bug.
@DanielG Emmm, I just found stack build
goes wrong. I build a new project by stack new
and it works. So it seems i'm not config my project correctly.
I'm facing the same issue here. Instead, with the following hie.yaml:
cradle:
stack:
it does work.
Stack build builds properly the project and stack ide packages
dumps the package name.
The interesting part is that the project is using a handwritten cabal file, though it does compile via stack (hence it is equipped with both stack.yml and the related project.cabal).
The resolver in use is lts-15.1
, and the build-type: Simple
is set.
@awgn and stack ide packages --cabal-files --stdout
?
@awgn Please post some logs, if you use hie.yaml
, your problem is definitely different to the posted issue. Ideally, open a new issue with logs attached, please :)
To be sure that it is the same issue the error log should contain:
user error (Pattern match failure in do expression at lib/Distribution/Helper.hs:603:7-22)
(with the exact line numbers)
If it helps, I am running arch and installed via aura -A haskell-ide-engine
.
I had the exact error @jneira posted above. I added the hie.yaml as also posted above.
resulted in
2020-03-20 21:11:32.758869325 [ThreadId 4] - Executing Stack GHC with args: --numeric-version
2020-03-20 21:11:33.00966254 [ThreadId 4] - Project GHC version:8.8.3
2020-03-20 21:11:33.00973858 [ThreadId 4] - hie exe candidates :["hie-8.8.3","hie-8.8","hie"]
2020-03-20 21:11:33.009944699 [ThreadId 4] - cannot find any hie exe, looked for:hie-8.8.3, hie-8.8, hie
[Error - 9:11:33 PM] Connection to server got closed. Server will not be restarted.
The project I am in was initialized via stack new
on Version 2.2.0, Git revision 95aaf2bc2c969622679c2a8233e7bb637e43210d (dirty) (8043 commits) PRE-RELEASE x86_64
stack ide packages --cabal-files --stdout
produced no output.
I solved this by uninstalling haskell-ide-engine with aura and cloning the repo manually.
Here is the output from log:
I thought it might be related to DanielG/cabal-helper/issues/90, but i can't find the solution of this problem.