Repository navigation
Closed
haskell/ghcide
#410Description
The new Template Haskell support seems to get further at work, now failing with:
ghcide version: 0.0.5 (GHC: 8.8.1)
Ghcide setup tester in /home/ollie/work/circuithub.
Report bugs at https://github.com/digital-asset/ghcide/issues
Step 1/6: Finding files to test in /home/ollie/work/circuithub
Found 1 files
Step 2/6: Looking for hie.yaml files that control setup
Found 1 cradle
Step 3/6, Cradle 1/1: Loading ./hie.yaml
Step 4/6, Cradle 1/1: Loading GHC Session
Step 5/6: Initializing the IDE
Step 6/6: Type checking the files
ghcide: ^^ Could not load 'filepickerzmpolicyzm0zi2zi6zmLUnJDYkanFc1p7RlDh5zzSr_NetworkziFilepickerziHandle_FilepickerHandle_closure', dependency unresolved. See top entry above.
File: entities/Model/Common.hs
Range: 1:0-100001:0
Source: typecheck
Severity: DsError
Message:
Program error:
ByteCodeLink.lookupCE
During interactive linking, GHCi couldn't find the following symbol:
filepickerzmpolicyzm0zi2zi6zmLUnJDYkanFc1p7RlDh5zzSr_NetworkziFilepickerziHandle_FilepickerHandle_closure
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session. Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please send a bug report to:
[email protected]
ghcide: ^^ Could not load 'OctopartV3ziTypesziCore_Uid_closure', dependency unresolved. See top entry above.
File: entities/Model/OctopartV3.hs
Range: 1:0-100001:0
Source: typecheck
Severity: DsError
Message:
Program error:
ByteCodeLink.lookupCE
During interactive linking, GHCi couldn't find the following symbol:
OctopartV3ziTypesziCore_Uid_closure
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session. Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please send a bug report to:
[email protected]
ghcide: ^^ Could not load 'filepickerzmpolicyzm0zi2zi6zmLUnJDYkanFc1p7RlDh5zzSr_NetworkziFilepickerziHandle_FilepickerHandle_closure', dependency unresolved. See top entry above.
File: entities/Model/User.hs
Range: 1:0-100001:0
Source: typecheck
Severity: DsError
Message:
Program error:
ByteCodeLink.lookupCE
During interactive linking, GHCi couldn't find the following symbol:
filepickerzmpolicyzm0zi2zi6zmLUnJDYkanFc1p7RlDh5zzSr_NetworkziFilepickerziHandle_FilepickerHandle_closure
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session. Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please send a bug report to:
[email protected]
Files that failed:
* api/src/Daemon/Notification/Consignment.hs
My hie.yaml is:
cradle:
direct:
arguments:
- -Wall
- -fno-warn-orphans
- -hide-package resource-pool
- -hide-package servant-checked-exceptions-core
- -ich-aws/lib
- -ich-eda/src
- -ich-linear/lib
- -ich-model/lib
- -ich-persistence/src
- -ich-segment/lib
- -ich-servant-auth/lib
- -ich-stripe/lib
- -ich-wai-extra/lib
- -idaemons/ch-shipment-tracking/src
- -idaemons/ch-sync-mycronic-events/lib
- -idaemons/ch-sync-trays/lib
- -ieffects/hedis-simple-effects/lib
- -ieffects/http-client-simple-effects/lib
- -ientities
- -iex-pool-prometheus/lib
- -imouse-proxy/shared
- -ioctopart
- -ipicofactory/aoi/lib
- -ipicofactory/coordinator/lib
- -ipicofactory/jpctl/src
- -ipicofactory/linescan-image-archiver/src
- -ipicofactory/my300/src
- -ipicofactory/panelisation/lib
- -ipicofactory/ur10/lib
- -ipicofactory/ur10/src-lib
- -iprelude
- -iquoting/lib
- -package-env - # so that .ghci-environment.* generated by cabal is not usedThe z-encoded name in question comes from something that is in my package database, as witnessed by:
$ ghc-pkg dump | grep Network.Filepicker.Handle
Network.Filepicker.Handle Network.Filepicker.Policy
Reacted by Aidan Gilmore and Abastro
Metadata
Metadata
Assignees
Labels
No labels
Activity
ocharles commentedon Dec 16, 2019
Interestingly, even if I
-ithe source code of this module, I still get the same error - though I can see ghcide compiling the whole package as expected:ocharles commentedon Dec 16, 2019
I can't give a full minimal repro just yet, but the package in question is open source at https://github.com/circuithub/haskell-filepicker-policy
ocharles commentedon Dec 16, 2019
This may be a dupe of haskell/ghcide#25 which reports the same error and is still open, but perhaps we should move on to this issue as the bug has changed? I'll leave that choice to the maintainers.
cocreature commentedon Dec 16, 2019
Good idea, I’ve closed haskell/ghcide#25
chessai commentedon Dec 20, 2019
I am also getting this bug.
chessai commentedon Dec 24, 2019
@ndmitchell @cocreature i want to work on fixing this. Any idea what the problem is/could be, relevant points of code to look at? Thanks
cocreature commentedon Dec 24, 2019
@chessai Sorry, I don’t know what the issue is or how to fix it. TH support was initially added in haskell/ghcide#222 so that might be helpful for finding relevant code paths.
MaxGabriel commentedon Jan 21, 2020
Has anyone been able to reproduce this? Our project at work is running into it, so I thought I'd try to get a reproducing case.
I took the gist here: https://gist.github.com/ocharles/1eb5532910bd65a3e1c11c880a1da349 and copied the same premise into this github repo: https://github.com/MaxGabriel/TemplateHaskellBug
Then I ran ghcide with both stack and cabal and didn't run into the error. I also was able to build https://github.com/circuithub/haskell-filepicker-policy with ghcide with Stack (after making a few changes to it).
This was with
ghcide version: 0.0.5 (GHC: 8.6.5)and GHC 8.6.5 (Cabal), and LTS 14.19 (Stack, GHC 8.6.5)merijn commentedon Jan 21, 2020
@MaxGabriel I will see if I can reproduce it with the current ghcide
merijn commentedon Jan 31, 2020
I just tried with 0.0.6 (i.e. HEAD) and I still run into problems. Specifically, I run into this error:
Looking in the mentioned store path I find two persistent-sqlite libraries, one static and one dynamic. Running nm on these to find the mentioned symbols I see:
So
sqlite3_errmsgdoes appear to exist in the library, but is still mentioned as missing, andstat64is indeed not there.As for the dynamic one:
Both symbols appear to be defined.
merijn commentedon Jan 31, 2020
I've tried explicitly passing
-lcin my cradle to resolve the symbols, but that seems to have no effect.merijn commentedon Jan 31, 2020
I don't really know how to effectively debug/inspect what ghcide/hie-bios are doing in terms of linkerflags used, but if someone tells me what to try I can have a look.
mpickering commentedon Feb 6, 2020
I have a fix locally for this which I will put up soon. I'm also going to implement support for generating object files to reduce memory usage when using TH which is prohibitive for big projects at the moment.
merijn commentedon Feb 7, 2020
@mpickering If you need someone to test/try it, just point me at the right branch and I can try it.
Run simplifier before generating ByteCode
Run simplifier before generating ByteCode
Run simplifier before generating ByteCode (#410)
Run simplifier before generating ByteCode (haskell/ghcide#410)
Run simplifier before generating ByteCode (haskell/ghcide#410)
Run simplifier before generating ByteCode (haskell/ghcide#410)