-
-
Notifications
You must be signed in to change notification settings - Fork 389
Projects setting "-dynamic" don't play well with the extension #434
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
Comments
I don't use -dynamic, but just in case, have you tried the first option? you could add as ghc-options in the .cabal file |
@jneira This seems to solve the issue. Thanks! |
Reopened cause -fexternal-interpreter is not supported by hls |
@LeventErkok sorry, the first optionn suggested by the compiler is not supported yet by hls. |
@jneira Unfortunately the original repo is not publically available; but I suspect any project that compiles with |
Ah, after switching from stack to cabal, I encountered this issue. My project url is https://github.com/berberman/arch-hs. I am using archlinux operating system, in order to use haskell packages provided by system, which are built dynamically, cabal should be configured with:
Debug log
|
I believe the reason
If your codebase uses TH, ghcide will need to generate and load object files for all the imported modules of a module with TH. For this it needs to load the objects for all the packages that your project depends on. But these are shared objects, i.e. created by My understanding is very limited though, so I might be wrong. /cc @adamse Note that HLS is a static executable to simplify automated deployment via the VSCode extension. If you build your own HLS binary it wouldn't be a static executable by default and the above might not apply. |
I think @pepeiborra's comment is correct and I think the proposed solution of building your own (dynamically linked) HLS should work. |
Thanks for the reply! I tried compiling HLS with |
* Use Just True == in preference to fromMaybe True or similar * Use trimStart instead of dropWhile isSpace * Whitespace only * Remove a redundant import * Enable HLint hints suggesting the extra library
There is a newer issue about, with the workaround: #1160 (comment) |
I've a project that I have to compile as a dynamically loaded library, i.e., with GHC's
-dynamic
flag.Unfortunately, this doesn't do well with VSCode. I see the following printed in the "PROBLEMS" tab:
Is there a known workaround for this problem?
The text was updated successfully, but these errors were encountered: