Repository navigation
Conversation
|
Awesome thanks a lot! Can we get some test for this? |
|
Sorry I don't have a simple repro and so am not sure how to test this. |
|
Both our case and the repro mentioned in https://github.com/digital-asset/ghcide/issues/25 involve |
|
If there’s no easy way to reproduce this, I’m happy to go without a testcase for now. Looking at the docs of |
The linker crashes because the hm_linkable field of HomeModInfo is empty. Fill it with correct data. Fixes https://github.com/digital-asset/ghcide/issues/25.
|
I'm not really an expert in GHC internals and, as you said, I assumed an empty list is ok because we're not generating code here. I added a comment there. |
|
https://github.com/digital-asset/ghcide/issues/25#issuecomment-530289283 has a minimal reproducible example, and you commented on that ticket that you have a fix for it? If so, could that minimal example become the test? Even if it can't (the dependency on external packages is annoying) could you test that this patch fixes it? |
|
I finally succeeded to create a test case. Let me clean it up and upload soon. |
|
Added a test, which fails with "expectJust getLinkDeps" without the fix. But with the fix, I'm getting a different error and I'm not sure how to fix that. Probably it is a separate issue. This same patch did fix our internal code. |
|
I also tried from the command-line the repro case in https://github.com/digital-asset/ghcide/issues/25#issuecomment-530289283, and I'm getting a new build error there too as below. Maybe that's because I'm passing an empty list as the |
|
I tried filling the I'm not sure whether this new problem always happens with this "fix". If not, the fix would be worth it, but I don't have a good way to prove that. |
|
This does fix the original error, but I run into the |
|
I've seen similar errors from ghci in the past, which at the time needed |
|
I think the new error |
|
I'm going to revert this change. This seems to only fix the first symptom. I think the proper fix should be done together with https://github.com/digital-asset/ghcide/issues/34; by generating bytecode for things that are used by Template Haskell, and passing the bytecode as part of the |
* First attempt at TH support * Update TcModuleResult when generating core * Be a bit more cautious when asking for bytecode * Check need for bytecode not only in source file itself, also in global information * Add a test (based on #212) * Fix test (thanks, @jinwoo) * Split GenerateCore and GenerateByteCode
* First attempt at TH support * Update TcModuleResult when generating core * Be a bit more cautious when asking for bytecode * Check need for bytecode not only in source file itself, also in global information * Add a test (based on haskell/ghcide#212) * Fix test (thanks, @jinwoo) * Split GenerateCore and GenerateByteCode
* First attempt at TH support * Update TcModuleResult when generating core * Be a bit more cautious when asking for bytecode * Check need for bytecode not only in source file itself, also in global information * Add a test (based on haskell/ghcide#212) * Fix test (thanks, @jinwoo) * Split GenerateCore and GenerateByteCode
* First attempt at TH support * Update TcModuleResult when generating core * Be a bit more cautious when asking for bytecode * Check need for bytecode not only in source file itself, also in global information * Add a test (based on haskell/ghcide#212) * Fix test (thanks, @jinwoo) * Split GenerateCore and GenerateByteCode
The linker crashes because the hm_linkable field of HomeModInfo is
empty. Fill it with correct data.
Fixes https://github.com/digital-asset/ghcide/issues/25.