haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Apache License 2.0
2.66k stars 355 forks source link

hls does not work in the ghcup-hs codebase #2362

Open jneira opened 2 years ago

jneira commented 2 years ago
jneira commented 2 years ago

For example GHCup.Utils.Prelude works in my windows 10, with ghc-9.0.1

imagen

Note the error about hs-boot file

pepeiborra commented 2 years ago

Is this with HEAD or 1.4.0?

jneira commented 2 years ago

Mine is 1.4.0, just installed with ghcup. Posting the log of

haskell-language-server-wrapper -d .\lib\Ghcup.hs ``` PS D:\dev\ws\haskell\ghcup-hs> haskell-language-server-wrapper -d .\lib\GHCup.hs Found "D:\dev\ws\haskell\ghcup-hs\hie.yaml" for "D:\dev\ws\haskell\ghcup-hs\a" Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper-1.4.0.exe) Version 1.4.0.0, Git revision 253547816ee216c53ee7dacc0ad3cac43e863d30 (dirty) x86_64 ghc-8.10.4 Current directory: D:\dev\ws\haskell\ghcup-hs Operating system: mingw32 Arguments: ["-d",".\\lib\\GHCup.hs"] Cradle directory: D:\dev\ws\haskell\ghcup-hs Cradle type: Cabal Tool versions found on the $PATH cabal: 3.6.2.0 stack: 2.7.3.1 ghc: 9.0.1 Consulting the cradle to get project GHC version... Project GHC version: 9.0.1 haskell-language-server exe candidates: ["haskell-language-server-9.0.1.exe","haskell-language-server.exe"] Launching haskell-language-server exe at:D:\ghcup\bin\haskell-language-server-9.0.1.exe haskell-language-server version: 1.4.0.0 (GHC: 9.0.1) (PATH: D:\ghcup\bin\haskell-language-server-9.0.1~1.4.0.exe) (GIT hash: 253547816ee216c53ee7dacc0ad3cac43e863d30) ghcide setup tester in D:\dev\ws\haskell\ghcup-hs. Report bugs at https://github.com/haskell/haskell-language-server/issues Step 1/4: Finding files to test in D:\dev\ws\haskell\ghcup-hs Found 1 files Step 2/4: Looking for hie.yaml files that control setup Found 1 cradle (D:\dev\ws\haskell\ghcup-hs\hie.yaml) Step 3/4: Initializing the IDE 2021-11-17 21:40:49.8011909 [ThreadId 6] DEBUG hls: Initializing exports map from hiedb 2021-11-17 21:40:50.190183 [ThreadId 6] DEBUG hls: Done initializing exports map from hiedb (0) Step 4/4: Type checking the files 2021-11-17 21:40:51.1042147 [ThreadId 22] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup.hs" 2021-11-17 21:40:51.210669 [ThreadId 23] INFO hls: Consulting the cradle for "lib\\GHCup.hs" Output from setting up the cradle Cradle {cradleRootDir = "D:\\dev\\ws\\haskell\\ghcup-hs", cradleOptsProg = CradleAction: Cabal} 2021-11-17 21:40:53.5872178 [ThreadId 30] INFO hie-bios: Build profile: -w ghc-9.0.1 -O2 2021-11-17 21:40:53.5912088 [ThreadId 30] INFO hie-bios: In order, the following will be built (use -v for more details): 2021-11-17 21:40:53.5952118 [ThreadId 30] INFO hie-bios: - ghcup-0.1.17.4 (lib) (first run) 2021-11-17 21:40:55.5071807 [ThreadId 30] INFO hie-bios: Preprocessing library for ghcup-0.1.17.4.. 2021-11-17 21:41:21.2533383 [ThreadId 23] DEBUG hls: Session loading result: Right (ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O0","-outputdir","C:\\Users\\atrey\\AppData\\Local\\hie-bios\\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\\build\\x86_64-windows\\ghc-9.0.1\\ghcup-0.1.17.4\\opt\\build","-odir","C:\\Users\\atrey\\AppData\\Local\\hie-bios\\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\\build\\x86_64-windows\\ghc-9.0.1\\ghcup-0.1.17.4\\opt\\build","-hidir","C:\\Users\\atrey\\AppData\\Local\\hie-bios\\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\\build\\x86_64-windows\\ghc-9.0.1\\ghcup-0.1.17.4\\opt\\build","-stubdir","C:\\Users\\atrey\\AppData\\Local\\hie-bios\\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\\build\\x86_64-windows\\ghc-9.0.1\\ghcup-0.1.17.4\\opt\\build","-i","-iC:\\Users\\atrey\\AppData\\Local\\hie-bios\\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\\build\\x86_64-windows\\ghc-9.0.1\\ghcup-0.1.17.4\\opt\\build","-ilib","-iC:\\Users\\atrey\\AppData\\Local\\hie-bios\\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\\build\\x86_64-windows\\ghc-9.0.1\\ghcup-0.1.17.4\\opt\\build\\autogen","-iC:\\Users\\atrey\\AppData\\Local\\hie-bios\\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\\build\\x86_64-windows\\ghc-9.0.1\\ghcup-0.1.17.4\\opt\\build\\global-autogen","-IC:\\Users\\atrey\\AppData\\Local\\hie-bios\\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\\build\\x86_64-windows\\ghc-9.0.1\\ghcup-0.1.17.4\\opt\\build\\autogen","-IC:\\Users\\atrey\\AppData\\Local\\hie-bios\\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\\build\\x86_64-windows\\ghc-9.0.1\\ghcup-0.1.17.4\\opt\\build\\global-autogen","-IC:\\Users\\atrey\\AppData\\Local\\hie-bios\\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\\build\\x86_64-windows\\ghc-9.0.1\\ghcup-0.1.17.4\\opt\\build","-ID:\\ghcup\\msys64\\mingw64\\include","-optP-DIS_WINDOWS","-optP-include","-optPC:\\Users\\atrey\\AppData\\Local\\hie-bios\\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\\build\\x86_64-windows\\ghc-9.0.1\\ghcup-0.1.17.4\\opt\\build\\autogen\\cabal_macros.h","-LD:\\ghcup\\msys64\\mingw64\\lib","-this-unit-id","ghcup-0.1.17.4-inplace","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","D:\\cabal\\store\\ghc-9.0.1\\package.db","-package-db","C:\\Users\\atrey\\AppData\\Local\\hie-bios\\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\\packagedb\\ghc-9.0.1","-package-db","C:\\Users\\atrey\\AppData\\Local\\hie-bios\\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\\build\\x86_64-windows\\ghc-9.0.1\\ghcup-0.1.17.4\\opt\\package.conf.inplace","-package-id","Cabal-3.6.2.0-9df950b4c46cae7531aeac8dd2578fbf444ceba0","-package-id","Win32-2.10.0.0","-package-id","aeson-2.0.2.0-f986db20ceaa0c77beecec25389a20ad0d32e7ef","-package-id","async-2.2.4-2b05321b41e2bf9b48502c4d879ba169d0bef1c1","-package-id","base-4.15.0.0","-package-id","base16-bytest_-1.0.2.0-b7b687dd04e75922fab35c17c2bbf1af9d805af0","-package-id","binary-0.8.8.0","-package-id","bytestring-0.10.12.1","-package-id","bzlib-0.5.1.0-06431df53d85c9010a8c2bd71bbaf852b32d711d","-package-id","case-insensit_-1.2.1.0-e526e73b3d8a9026ee5928e9a90e559595242c53","-package-id","casing-0.1.4.1-595e6394ca905c194d08d286b9b2c2f55f0f594f","-package-id","containers-0.6.4.1","-package-id","cryptohash-sh_-0.11.10_-b9cae1971e3118129e0370fdb2ee6b00501f5a2b","-package-id","deepseq-1.4.5.0","-package-id","directory-1.3.6.1","-package-id","disk-free-spa_-0.1.0.1-47bbea57f40d4d05045f15d582869e722820bb46","-package-id","filepath-1.4.2.1","-package-id","haskus-utils-_-1.5.1-111dd3a44dafe5ec03f8d7e2f911818655435602","-package-id","haskus-utils-_-3.2.1-f6d8d157f97c2cb005f5b1bd9b33deb762d03a1f","-package-id","libarchive-3.0.3.1-15ffe1a1105452e57a6aaf8431453fc0382f0d69","-package-id","lzma-static-5.2.5.4-b81cc35656456cbf8d9a99dc1acb5883f073b70d","-package-id","megaparsec-9.0.1-24abfe3c226a46967fe47fa6ccda83106ef448cc","-package-id","mtl-2.2.2","-package-id","optics-0.4-7b740bd04887b1995c6049f13bc8a120289aecd5","-package-id","os-release-1.0.2.1-bf4f97afe5d0f599e00531ae460845d544e6b36b","-package-id","pretty-1.1.3.6","-package-id","pretty-termin_-0.1.0.0-6e2287dc3c20fb210f3988f00aa4cc84bbb3afd7","-package-id","process-1.6.11.0","-package-id","regex-posix-0.96.0.1-7e58ebc4c7fe138b2e7932ae7fd68afbebd0be9c","-package-id","resourcet-1.2.4.3-42ab4bea82690d20a6bafefcdef039a62e8d7c6e","-package-id","retry-0.8.1.2-b37b7b3d5bd1eeb8dda1a56b1738732a3eea98cf","-package-id","safe-0.3.19-017a0f449f17bdb1a6bb5a39b909e05060de6537","-package-id","safe-exceptio_-0.1.7.2-5ee60c2510ecd43aa1b261f5096db02da8926938","-package-id","split-0.2.3.4-9888e0847eca347142ebf01e0ebff6b2d900b002","-package-id","strict-base-0.4.0.0-01c36a8087f51c910276334030bcd1899a5405d5","-package-id","template-haskell-2.17.0.0","-package-id","temporary-1.3-4f7ac6b3c3f4b4f7bfe88de1b9f7a9aed7ac7b38","-package-id","text-1.2.4.1","-package-id","time-1.9.3","-package-id","transformers-0.5.6.2","-package-id","unliftio-core-0.2.0.1-be93a2348ed0729f585522401e1cee0f0dbc8340","-package-id","unordered-con_-0.2.15.0-c064c542150ad922c7ad47755cf96b22697821d3","-package-id","uri-bytestring-0.3.3.1-f38563f0345597b7bf52d6e70331aa4d94250fed","-package-id","vector-0.12.3.1-65482342dcba1ecfc1c217aebcace5741bb679ca","-package-id","versions-5.0.0-a756faf047799a5e577e2e6b573cd31a7c5e246e","-package-id","word8-0.1.3-2cf9fc13e2781afcd0814762a1dcb83cbd794d58","-package-id","yaml-streamly-0.12.0-13bc5d7f2e65e30159dcd0ce48745783816e8d70","-package-id","zlib-0.6.2.3-4a7b011714ac1c71a7cf15e27a46abd1ecd40379","-XHaskell2010","-XDeriveGeneric","-XLambdaCase","-XMultiWayIf","-XNamedFieldPuns","-XPackageImports","-XQuasiQuotes","-XRecordWildCards","-XScopedTypeVariables","-XStrictData","-XTupleSections","-XTypeApplications","-XTypeFamilies","-XViewPatterns","GHCup","GHCup.Download","GHCup.Download.Utils","GHCup.Errors","GHCup.Platform","GHCup.Requirements","GHCup.Types","GHCup.Types.JSON","GHCup.Types.Optics","GHCup.Utils","GHCup.Utils.Dirs","GHCup.Utils.File","GHCup.Utils.File.Common","GHCup.Utils.Logger","GHCup.Utils.MegaParsec","GHCup.Utils.Prelude","GHCup.Utils.String.QQ","GHCup.Utils.Version.QQ","GHCup.Version","Paths_ghcup","GHCup.Utils.File.Windows","GHCup.Utils.Prelude.Windows","GHCup.Utils.Windows","-Wall","-fwarn-tabs","-fwarn-incomplete-uni-patterns","-fwarn-incomplete-record-updates","-hide-all-packages"], componentRoot = "D:\\dev\\ws\\haskell\\ghcup-hs", componentDependencies = ["ghcup.cabal","cabal.project","cabal.project.local"]},"D:\\ghcup\\ghc\\9.0.1\\lib") 2021-11-17 21:41:23.1053161 [ThreadId 23] INFO hls: Using interface files cache dir: C:\Users\atrey\AppData\Local\ghcide\ghcup-0.1.17.4-inplace-011f2cbe342f414817ac355d01d0f7cb23e61002 2021-11-17 21:41:23.1382493 [ThreadId 23] INFO hls: Making new HscEnv[ghcup-0.1.17.4-inplace] 2021-11-17 21:41:23.2693187 [ThreadId 23] DEBUG hls: New Component Cache HscEnvEq: (([],Just HscEnvEq 5),fromList [("D:\\dev\\ws\\haskell\\ghcup-hs\\hie.yaml",Just 2021-11-12 22:23:07.5993452 UTC),("cabal.project",Just 2021-11-12 22:23:07.4833728 UTC),("cabal.project.local",Nothing),("ghcup.cabal",Just 2021-11-12 22:23:07.5302473 UTC)]) 2021-11-17 21:41:44.046822 [ThreadId 23] DEBUG hls: Known files updated: fromList [(TargetModule GHCup.Utils.Prelude.Windows,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils\\Prelude\\Windows.hs"]),(TargetModule GHCup.Requirements,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Requirements.hs"]),(TargetModule Paths_ghcup,fromList ["C:\\Users\\atrey\\AppData\\Local\\hie-bios\\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\\build\\x86_64-windows\\ghc-9.0.1\\ghcup-0.1.17.4\\opt\\build\\autogen\\Paths_ghcup.hs"]),(TargetModule GHCup.Types,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Types.hs"]),(TargetModule GHCup.Types.JSON,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Types\\JSON.hs"]),(TargetModule GHCup,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup.hs"]),(TargetModule GHCup.Types.Optics,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Types\\Optics.hs"]),(TargetModule GHCup.Utils.Windows,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils\\Windows.hs"]),(TargetModule GHCup.Download,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Download.hs"]),(TargetModule GHCup.Utils.Version.QQ,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils\\Version\\QQ.hs"]),(TargetModule GHCup.Utils.File,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils\\File.hs"]),(TargetModule GHCup.Utils.File.Windows,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils\\File\\Windows.hs"]),(TargetModule GHCup.Utils.String.QQ,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils\\String\\QQ.hs"]),(TargetModule GHCup.Utils.Dirs,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils\\Dirs.hs"]),(TargetFile NormalizedFilePath "D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup.hs",fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup.hs"]),(TargetModule GHCup.Utils.Prelude,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils\\Prelude.hs"]),(TargetModule GHCup.Version,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Version.hs"]),(TargetModule GHCup.Utils.Logger,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils\\Logger.hs","D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils\\Logger.hs-boot"]),(TargetModule GHCup.Download.Utils,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Download\\Utils.hs"]),(TargetModule GHCup.Errors,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Errors.hs"]),(TargetModule GHCup.Utils.File.Common,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils\\File\\Common.hs-boot","D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils\\File\\Common.hs"]),(TargetModule GHCup.Platform,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Platform.hs"]),(TargetModule GHCup.Utils.MegaParsec,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils\\MegaParsec.hs"]),(TargetModule GHCup.Utils,fromList ["D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils.hs","D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup\\Utils.hs-boot"])] 2021-11-17 21:41:44.1071414 [ThreadId 10] DEBUG hls: Finishing build session(exception: AsyncCancelled) 2021-11-17 21:41:44.0840821 [ThreadId 23] DEBUG hls: Restarting build session for keys [GhcSessionIO; ] (aborting the previous one took 0.00s) 2021-11-17 21:41:44.1516821 [ThreadId 49] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "D:\\dev\\ws\\haskell\\ghcup-hs\\lib\\GHCup.hs" 2021-11-17 21:42:07.9386025 [ThreadId 822] DEBUG hls: SUCCEEDED LOADING HIE FILE FOR:"C:\\Users\\atrey\\AppData\\Local\\ghcide\\ghcup-0.1.17.4-inplace-011f2cbe342f414817ac355d01d0f7cb23e61002\\GHCup\\Utils\\Windows.hie" 2021-11-17 21:42:07.9396062 [ThreadId 821] DEBUG hls: SUCCEEDED LOADING HIE FILE FOR:"C:\\Users\\atrey\\AppData\\Local\\ghcide\\ghcup-0.1.17.4-inplace-011f2cbe342f414817ac355d01d0f7cb23e61002\\GHCup\\Utils\\String\\QQ.hie" 2021-11-17 21:42:07.9396062 [ThreadId 822] DEBUG hls: Re-indexing hie file forD:\dev\ws\haskell\ghcup-hs\lib\GHCup\Utils\Windows.hs 2021-11-17 21:42:07.9426015 [ThreadId 821] DEBUG hls: Re-indexing hie file forD:\dev\ws\haskell\ghcup-hs\lib\GHCup\Utils\String\QQ.hs 2021-11-17 21:42:08.020599 [ThreadId 820] DEBUG hls: SUCCEEDED LOADING HIE FILE FOR:"C:\\Users\\atrey\\AppData\\Local\\ghcide\\ghcup-0.1.17.4-inplace-011f2cbe342f414817ac355d01d0f7cb23e61002\\Paths_ghcup.hie" 2021-11-17 21:42:08.021603 [ThreadId 820] DEBUG hls: Re-indexing hie file forC:\Users\atrey\AppData\Local\hie-bios\dist-ghcup-hs-9cd507f82d204138ce4ffe925cb05426\build\x86_64-windows\ghc-9.0.1\ghcup-0.1.17.4\opt\build\autogen\Paths_ghcup.hs 2021-11-17 21:42:08.0396037 [ThreadId 821] DEBUG hls: SUCCEEDED LOADING HIE FILE FOR:"C:\\Users\\atrey\\AppData\\Local\\ghcide\\ghcup-0.1.17.4-inplace-011f2cbe342f414817ac355d01d0f7cb23e61002\\GHCup\\Utils.hie-boot" 2021-11-17 21:42:08.0406054 [ThreadId 821] DEBUG hls: Re-indexing hie file forD:\dev\ws\haskell\ghcup-hs\lib\GHCup\Utils.hs-boot 2021-11-17 21:42:10.0116211 [ThreadId 846] DEBUG hls: SUCCEEDED LOADING HIE FILE FOR:"C:\\Users\\atrey\\AppData\\Local\\ghcide\\ghcup-0.1.17.4-inplace-011f2cbe342f414817ac355d01d0f7cb23e61002\\GHCup\\Utils\\Version\\QQ.hie" 2021-11-17 21:42:10.0126214 [ThreadId 846] DEBUG hls: Re-indexing hie file forD:\dev\ws\haskell\ghcup-hs\lib\GHCup\Utils\Version\QQ.hs 2021-11-17 21:42:14.4242635 [ThreadId 856] DEBUG hls: SUCCEEDED LOADING HIE FILE FOR:"C:\\Users\\atrey\\AppData\\Local\\ghcide\\ghcup-0.1.17.4-inplace-011f2cbe342f414817ac355d01d0f7cb23e61002\\GHCup\\Types.hie" 2021-11-17 21:42:14.4242635 [ThreadId 856] DEBUG hls: Re-indexing hie file forD:\dev\ws\haskell\ghcup-hs\lib\GHCup\Types.hs 2021-11-17 21:42:16.9055474 [ThreadId 859] DEBUG hls: SUCCEEDED LOADING HIE FILE FOR:"C:\\Users\\atrey\\AppData\\Local\\ghcide\\ghcup-0.1.17.4-inplace-011f2cbe342f414817ac355d01d0f7cb23e61002\\GHCup\\Version.hie" 2021-11-17 21:42:16.9065561 [ThreadId 859] DEBUG hls: Re-indexing hie file forD:\dev\ws\haskell\ghcup-hs\lib\GHCup\Version.hs 2021-11-17 21:42:17.5295535 [ThreadId 880] DEBUG hls: SUCCEEDED LOADING HIE FILE FOR:"C:\\Users\\atrey\\AppData\\Local\\ghcide\\ghcup-0.1.17.4-inplace-011f2cbe342f414817ac355d01d0f7cb23e61002\\GHCup\\Types\\Optics.hie" 2021-11-17 21:42:17.5305526 [ThreadId 880] DEBUG hls: Re-indexing hie file forD:\dev\ws\haskell\ghcup-hs\lib\GHCup\Types\Optics.hs 2021-11-17 21:42:17.8425514 [ThreadId 884] DEBUG hls: SUCCEEDED LOADING HIE FILE FOR:"C:\\Users\\atrey\\AppData\\Local\\ghcide\\ghcup-0.1.17.4-inplace-011f2cbe342f414817ac355d01d0f7cb23e61002\\GHCup\\Errors.hie" 2021-11-17 21:42:17.8425514 [ThreadId 884] DEBUG hls: Re-indexing hie file forD:\dev\ws\haskell\ghcup-hs\lib\GHCup\Errors.hs 2021-11-17 21:42:19.7814493 [ThreadId 903] DEBUG hls: SUCCEEDED LOADING HIE FILE FOR:"C:\\Users\\atrey\\AppData\\Local\\ghcide\\ghcup-0.1.17.4-inplace-011f2cbe342f414817ac355d01d0f7cb23e61002\\GHCup\\Utils\\Prelude.hie" 2021-11-17 21:42:19.7814493 [ThreadId 903] DEBUG hls: Re-indexing hie file forD:\dev\ws\haskell\ghcup-hs\lib\GHCup\Utils\Prelude.hs 2021-11-17 21:42:20.125454 [ThreadId 925] DEBUG hls: SUCCEEDED LOADING HIE FILE FOR:"C:\\Users\\atrey\\AppData\\Local\\ghcide\\ghcup-0.1.17.4-inplace-011f2cbe342f414817ac355d01d0f7cb23e61002\\GHCup\\Utils\\File\\Common.hie" 2021-11-17 21:42:20.125454 [ThreadId 925] DEBUG hls: Re-indexing hie file forD:\dev\ws\haskell\ghcup-hs\lib\GHCup\Utils\File\Common.hs 2021-11-17 21:42:20.1544539 [ThreadId 929] DEBUG hls: SUCCEEDED LOADING HIE FILE FOR:"C:\\Users\\atrey\\AppData\\Local\\ghcide\\ghcup-0.1.17.4-inplace-011f2cbe342f414817ac355d01d0f7cb23e61002\\GHCup\\Utils\\Logger.hie" 2021-11-17 21:42:20.1544539 [ThreadId 929] DEBUG hls: Re-indexing hie file forD:\dev\ws\haskell\ghcup-hs\lib\GHCup\Utils\Logger.hs 2021-11-17 21:42:21.3711738 [ThreadId 940] INFO hls: File: D:\dev\ws\haskell\ghcup-hs\lib\GHCup\Types\JSON.hs Hidden: no Range: 1:1-2:1 Source: typecheck Severity: DsError Message: Program error: module GHCup.Utils.File.Common cannot be linked; it is only available as a boot module 2021-11-17 21:42:21.6336724 [ThreadId 979] INFO hls: finish: User TypeCheck (took 37.51s) 2021-11-17 21:42:21.6336724 [ThreadId 976] INFO hls: finish: GetHie (took 0.00s) Files that failed: 2021-11-17 21:42:21.6336724 [ThreadId 983] INFO hls: finish: GenerateCore (took 0.00s) * D:\dev\ws\haskell\ghcup-hs\lib\GHCup.hs Completed (0 files worked, 1 file failed) haskell-language-server-wrapper-1.4.0.exe: callProcess: D:\ghcup\bin\haskell-language-server-9.0.1.exe "-d" ".\\lib\\GHCup.hs" (exit 1): failed ```

Significantly it ends with

2021-11-17 21:42:21.3711738 [ThreadId 940] INFO hls:    File:     D:\dev\ws\haskell\ghcup-hs\lib\GHCup\Types\JSON.hs
Hidden:   no
Range:    1:1-2:1
Source:   typecheck
Severity: DsError
Message:
  Program error: module GHCup.Utils.File.Common cannot be linked; it is only available as a boot
  module

and haskell-language-server-wrapper -d .\lib\GHCup\Utils\Prelude.hs is succesful, without mentioning the boot module

michaelpj commented 2 years ago

Ah, I've also seen that error recently! Something is up with hs-boot files. I just fixed it by getting rid of my module cycles D:

jneira commented 2 years ago

What a coincidence 1.5.0 is failing in hs-boot files for ghc and 1.4.0 also fails in hs-boot for ghcup, but no for ghc 😵

hasufell commented 2 years ago

It seems this is related: https://gitlab.haskell.org/ghc/ghc/-/issues/1012

It's a combination of boot files and template haskell.

Here's a fix: https://gitlab.haskell.org/haskell/ghcup-hs/-/commit/6073ebe4764828f668049a10f6a80b67d8d2646e#note_406582 Maybe someone wants to investigate what's actually going on there?

michaelpj commented 8 months ago

Is this still happening?