haskell / ghcup-hs

https://www.haskell.org/ghcup/
GNU Lesser General Public License v3.0
289 stars 89 forks source link

Fails to compile HLS master with GHC-9.10.1 #1068

Closed mouse07410 closed 5 months ago

mouse07410 commented 5 months ago
$ ghcup compile hls -g master --ghc 9.10.1
[ Info  ] downloading: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.8.yaml as file /Users/ur20980/.ghcup/cache/ghcup-0.0.8.yaml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
[ Info  ] Fetching git repo https://github.com/haskell/haskell-language-server.git at ref master (this may take a while)
xattr: [Errno 13] Permission denied: '/Users/ur20980/.ghcup/tmp/ghcup-c428f287f10b0099/.git/objects/pack/pack-bd6c5ff86a146217275f72a486f11df681643326.idx'
xattr: [Errno 13] Permission denied: '/Users/ur20980/.ghcup/tmp/ghcup-c428f287f10b0099/.git/objects/pack/pack-bd6c5ff86a146217275f72a486f11df681643326.rev'
xattr: [Errno 13] Permission denied: '/Users/ur20980/.ghcup/tmp/ghcup-c428f287f10b0099/.git/objects/pack/pack-bd6c5ff86a146217275f72a486f11df681643326.pack'
[ Warn  ] [GHCup-00841] Process "/usr/bin/xattr" with arguments ["-r", "-d",
[ ...   ]                                          "com.apple.quarantine",
[ ...   ]                                          "/Users/ur20980/.ghcup/tmp/ghcup-c428f287f10b0099"] failed with exit code 1.
[ Info  ] Examining git ref master
[ ...   ]   HLS version (from cabal file): 2.8.0.0
[ ...   ]   branch: master
[ ...   ]   commit hash: 0651c5c904396ac105acc8db8bd1a6415552fb2c
[ Info  ] Building HLS 2.8.0.0 for GHC version 9.10.1
[ cabal ] goals I've had most trouble fulfilling: profunctors, comonad, base,
[ cabal ] bifunctors, primitive-extras, transformers, template-haskell,
[ cabal ] indexed-traversable, comonad:indexed-traversable, stm-hamt, stm-containers,
[ cabal ] primitive, vector, ghcide
[ cabal ] Try running with --minimize-conflict-set to improve the error message.
[ cabal ] 
[ Error ] [GHCup-08841] BuildFailed failed in dir /Users/ur20980/.ghcup/tmp/ghcup-c428f287f10b0099: Process "cabal" with arguments ["v2-install",
[ ...   ]                                                                                                             "-w",
[ ...   ]                                                                                                             "ghc-9.10.1",
[ ...   ]                                                                                                             "--install-method=copy",
[ ...   ]                                                                                                             "--overwrite-policy=always",
[ ...   ]                                                                                                             "--disable-profiling",
[ ...   ]                                                                                                             "--disable-tests",
[ ...   ]                                                                                                             "--installdir=/Users/ur20980/.ghcup/tmp/ghcup-c428f287f10b0099/out/9.10.1",
[ ...   ]                                                                                                             "--project-file=cabal.project",
[ ...   ]                                                                                                             "exe:haskell-language-server",
[ ...   ]                                                                                                             "exe:haskell-language-server-wrapper"] failed with exit code 1.
$ 
$ ghcup debug-info
Debug Info
==========
GHCup base dir: /Users/ur20980/.ghcup
GHCup bin dir: /Users/ur20980/.ghcup/bin
GHCup GHC directory: /Users/ur20980/.ghcup/ghc
GHCup cache directory: /Users/ur20980/.ghcup/cache
Architecture: x86_64
Platform: Darwin
Version: 0.1.22.0
$ 
fendor commented 5 months ago

HLS can't be compiled with GHC 9.10 yet, see https://github.com/haskell/haskell-language-server/pull/4233

mouse07410 commented 5 months ago

HLS can't be compiled with GHC 9.10 yet, see haskell/haskell-language-server#4233

My apologies - I mistook merged hie-bios PR for the HLS one.

mouse07410 commented 5 months ago

First, I'm now trying to compile an HLS branch for GHC-9.10.1 (that isn't merged yet), which should be possible according to my understanding of ghcup compile hls -help.

$ ghcup compile hls -help
Usage: ghcup compile hls ((-v|--version VERSION) | (-g|--git-ref GIT_REFERENCE) 
                           [-r|--repository GIT_REPOSITORY] |
                           --source-dist VERSION | --remote-source-dist URI) 
                         [-j|--jobs JOBS] [--set | --no-set] [--cabal-update] 
                         [-o|--overwrite-version OVERWRITE_VERSION] 
                         [-i|--isolate DIR] [--cabal-project CABAL_PROJECT] 
                         [--cabal-project-local CABAL_PROJECT_LOCAL] 
                         [[--patch PATCH_URI] | (-p|--patchdir PATCH_DIR)]
                         (--ghc GHC_VERSION|TAG) [CABAL_ARGS]

  Compile HLS from source

Available options:
  -v,--version VERSION     The version to compile (pulled from hackage)
  -g,--git-ref GIT_REFERENCE
                           The git commit/branch/ref to build from (accepts
                           anything 'git checkout' accepts)

I see that the referred branch exists:

Screenshot 2024-05-22 at 22 32 27

However, it fails to locate that branch - help would be lovely.

$ ghcup compile hls -g wip/9.10 --ghc 9.10.1
[ Info  ] Fetching git repo https://github.com/haskell/haskell-language-server.git at ref wip/9.10 (this may take a while)
xattr: [Errno 13] Permission denied: '/Users/ur20980/.ghcup/tmp/ghcup-fc68230eda627e16/.git/objects/pack/pack-497289e5ea08c40c42a8b18cc7621a5e07b51f61.idx'
xattr: [Errno 13] Permission denied: '/Users/ur20980/.ghcup/tmp/ghcup-fc68230eda627e16/.git/objects/pack/pack-497289e5ea08c40c42a8b18cc7621a5e07b51f61.rev'
xattr: [Errno 13] Permission denied: '/Users/ur20980/.ghcup/tmp/ghcup-fc68230eda627e16/.git/objects/pack/pack-497289e5ea08c40c42a8b18cc7621a5e07b51f61.pack'
[ Warn  ] [GHCup-00841] Process "/usr/bin/xattr" with arguments ["-r", "-d",
[ ...   ]                                          "com.apple.quarantine",
[ ...   ]                                          "/Users/ur20980/.ghcup/tmp/ghcup-fc68230eda627e16"] failed with exit code 1.
[ Info  ] Examining git ref wip/9.10
[ ...   ]   HLS version (from cabal file): 2.8.0.0
[ ...   ]   branch: wip/9.10
[ ...   ]   commit hash: 5a4405da458ea7e2d5dd0827a74608a5cd5fe133
[ Info  ] Building HLS 2.8.0.0 for GHC version 9.10.1
[ cabal ] fatal: Could not parse object '7bf599856f055aefa86a6db10c12dcbc10c7130a'.

[ Error ] [GHCup-08841] BuildFailed failed in dir /Users/ur20980/.ghcup/tmp/ghcup-fc68230eda627e16: Process "cabal" with arguments ["v2-install",
[ ...   ]                                                                                                             "-w",
[ ...   ]                                                                                                             "ghc-9.10.1",
[ ...   ]                                                                                                             "--install-method=copy",
[ ...   ]                                                                                                             "--overwrite-policy=always",
[ ...   ]                                                                                                             "--disable-profiling",
[ ...   ]                                                                                                             "--disable-tests",
[ ...   ]                                                                                                             "--installdir=/Users/ur20980/.ghcup/tmp/ghcup-fc68230eda627e16/out/9.10.1",
[ ...   ]                                                                                                             "--project-file=cabal.project",
[ ...   ]                                                                                                             "exe:haskell-language-server",
[ ...   ]                                                                                                             "exe:haskell-language-server-wrapper"] failed with exit code 128.
$

Second - I'm concerned about these (strange for me) "permission denined" messages. What causes them, and how can we (you ;) address it?

xattr: [Errno 13] Permission denied: '/Users/ur20980/.ghcup/tmp/ghcup-fc68230eda627e16/.git/objects/pack/pack-497289e5ea08c40c42a8b18cc7621a5e07b51f61.pack'
[ Warn  ] [GHCup-00841] Process "/usr/bin/xattr" with arguments ["-r", "-d",
[ ...   ]                                          "com.apple.quarantine",
[ ...   ]                                          "/Users/ur20980/.ghcup/tmp/ghcup-fc68230eda627e16"] failed with exit code 1.
hasufell commented 5 months ago

You're experiencing a bug in hls's cabal.project:

https://github.com/haskell/haskell-language-server/blob/5a4405da458ea7e2d5dd0827a74608a5cd5fe133/cabal.project#L51

@wz1000 seems to have force pushed to https://github.com/wz1000/retrie.git breaking the cabal file (I'm not assigning blame here, 9.10 is a WIP branch).

Please report compile failures to the HLS project. GHCup does not guarantee that HLS builds.

mouse07410 commented 5 months ago

Please report compile failures to the HLS project.

Will do.

GHCup does not guarantee that HLS builds.

I understand. The thought was that tests that are of interest to me (e.g., MacOS) were passing. Did not expect cabal.project to be screwed up.