-
Notifications
You must be signed in to change notification settings - Fork 61
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
cabal_macros.h is constantly overwritten #177
Comments
@mpickering ping? This affects both |
I will look into it. |
I can not reproduce with plain hie-bios, so I would not expect that you can reproduce this issue with haskell-ide-engine. |
I will try to reproduce with cabal 3.2. That is unreleased, right? Just build from snapshot? |
Yes. Here's what I changed in diff --git a/cabal.project b/cabal.project
index 4b7d2226..0ef8b76e 100644
--- a/cabal.project
+++ b/cabal.project
@@ -1,13 +1,14 @@
packages:
./
./hie-plugin-api/
-- ./submodules/HaRe
-source-repository-package
- type: git
- location: https://github.com/DanielG/cabal-helper.git
- tag: a18bbb2af92e9b4337e7f930cb80754f2408bcfd
+--source-repository-package
+-- type: git
+-- location: https://github.com/DanielG/cabal-helper.git
+-- tag: a18bbb2af92e9b4337e7f930cb80754f2408bcfd
tests: true
@@ -17,8 +18,9 @@ package haskell-ide-engine
-- Match the flag settings we use in stac builds
constraints:
haskell-ide-engine +pedantic,
- hie-plugin-api +pedantic
+ hie-plugin-api +pedantic,
+ Cabal ==3.2.0.0,
+ cabal-helper ==1.1.0.0
write-ghc-environment-files: never
-index-state: 2020-05-02T10:11:15Z
I would be happy to provide more information, just tell me what you need. |
@maksbotan Do you have |
No. I used to, but now it's commented out. |
Adding it back did not help, by the way (I tried adding to |
I am unable to reproduce the issue with hie-bios, hie and hls. Whatever I do, Can you provide a repository that reproduces the problem? Including rough steps how you reproduce the issue? |
I fear this depends not on the repo, but on my local setup. Re hie.yaml - I do have one. With cabal cradle. Cabal the library that hie is built with comes from hackage, 3.2.0.0 version. Thanks for the answers so far! |
Here is my cradle:
cabal:
- path: "code/morley"
component: "lib:morley"
- path: "code/morley"
component: "test:morley-test"
- path: "code/lorentz"
component: "lib:lorentz"
- path: "code/morley-ledgers"
component: "lib:morley-ledgers"
- path: "code/morley-ledgers"
component: "exe:morley-ledgers"
- path: "code/indigo"
component: "lib:indigo" The repo is https://gitlab.com/morley-framework/morley, however I don't think it is important. In "install-plan": [
{
"type": "pre-existing",
"id": "Cabal-3.2.0.0-82QQ9INxvFvLuRIYMiY5kY",
"pkg-name": "Cabal",
"pkg-version": "3.2.0.0",
... Meaning that
re ghcide: I certainly can reproduce this with |
I also did test it with $ /home/maks/work/haskell-ide-engine/dist-newstyle/build/x86_64-linux/ghc-8.8.3/hie-bios-0.4.0/x/hie-bios/build/hie-bios/hie-bios version
hie-bios version 0.4.0 compiled by GHC 8.8.3 $ /home/maks/work/haskell-ide-engine/dist-newstyle/build/x86_64-linux/ghc-8.8.3/hie-bios-0.4.0/x/hie-bios/build/hie-bios/hie-bios debug code/morley/src/
Root directory: /home/maks/Projects/SRK/morley
GHC options: XXXXXX
System libraries: /usr/lib64/ghc-8.8.3
Config Location: /home/maks/Projects/SRK/morley/hie.yaml
Cradle: Cradle {cradleRootDir = "/home/maks/Projects/SRK/morley", cradleOptsProg = CradleAction: Cabal}
Dependencies: cabal.project And reproduced the same problem. Diff in |
However, now if I add
I suppose that it is calling |
Okay, I believe I understand now. On Gentoo So in a sense, this is the problem of my setup. However, I still can't understand why Feel free to close this issue if you don't think fixing this is worth the effort. |
Now the only problem I see is that after running
I.e., |
Re the last issue: in some rare cases I get this when I compile my project myself:
Looks like when Contrary to my haddock problem above, I believe that this issue is very serious. |
I occassionally see this, too. Could not reproduce reliably and restart fixes it immediately. |
Yes, restart helps. However I think this indicates that hie stuff clashes with user's own build system and this not a good sign. |
Maybe hie should use separate dist-newstyle dir? |
It writes this stuff to the filesystem in temp. That is unrelated to dist-newstyle. While I dont really know what causes this, I imagine that it is some kind of race between writing the file to disk/setting the access modes and cabal repl trying to access it. |
I'd love to investigate this in my free time, if you could give me some pointers. |
Sorry, I do not have any pointers :( Just to clarify, hie will not receive love for much longer, but hls will receive way more love :) (https://mpickering.github.io/ide/index.html) |
Thanks! |
Yes, it is currently the backbone of all ide's :) |
hie-bios uses a different builddir now, so I think this issue is outdated and not relevant anymore. |
I don't know if it's my system broken in a subtle way, or an actual issue, so I report it anyway.
I have GHC 8.8.3 installed from my package manager (I'm on Gentoo Linux):
I also have Cabal-3.2 & cabal-install-3.2 installed from the package manager:
I use this ghc & cabal to build my project (
cabal new-build all
).I also used the same cabal to build
haskell-ide-engine
andhaskell-language-server
master branches (I had to changecabal-helper
github dep tocabal-helper-1.1.0.0
from Hackage).Now, when I run
hie
orhaskell-language-server
in my project, it rebuilds a lot of modules due to changes tobuild/autogen/cabal_macros.h
.Here is the diff between
cabal_macros.h
when I build the project and when HIE/HLS builds it:This is very annoying, since each
cabal new-build
takes a long time due to these rebuilds.For the record:
(This is not in
$PATH
).The text was updated successfully, but these errors were encountered: