-
Notifications
You must be signed in to change notification settings - Fork 61
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
Adding +RTS to ghc-options fails with an error #102
Comments
I can reproduce this by just adding Patch should be straightforward -- remove any RTS arguments. |
I only see this behavior sometimes. For example, modifying
And then running hie-bios (maybe this is the step I'm messing up) with: |
When adding to |
@fendor I think that's about setting the option on the program you can compile, whereas |
I'm still seeing this error. Is there a resolution for this? |
@drewboardman The issue should be solved by #106 but there has not been a release since then. Wait for #132 which should be in the next days. |
@fendor I have removed the |
If you delete it from |
Thanks @fendor. I was able to get rid of that error message, but now am getting a less useful error: 2020-01-29T11:12:40.660 DEBUG (pid:365027) [language-client-index] - [languageserver.haskell] 2020-01-29 11:12:40.660142828 [ThreadId 15] - Cradle did not load succesfully This cradle loaded successfully in the past. Is there a way to get more error output than this? |
There should be way more output than that, what else is in the logs? Also, diagnostics and such? Do you have a |
Here is a description of my setup: haskell/haskell-ide-engine#1613 (comment)
Yes
2020-01-29T11:40:04.216 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:04.215969231 [ThreadId 15] - New cradle: /home/drew/code/xxx/test/src/ProjectName/Tests/DB/Yyy/Thing.hs
2020-01-29T11:40:04.216 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:04.216781942 [ThreadId 15] - Module "/home/drew/code/xxx/test/src/ProjectName/Tests/DB/Yyy/Thing.hs" is loaded by Cradle: Cradle {cradleRootDir = "/home/drew/code/xxx", cradleOptsProg = CradleAction: multi}
2020-01-29 11:40:04.216830878 [ThreadId 15] - Found cradle: Cradle {cradleRootDir = "/home/drew/code/xxx", cradleOptsProg = CradleAction: multi}
2020-01-29T11:40:04.226 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:04.225899913 [ThreadId 5094] - Warning: /home/drew/.cabal/config: Unrecognized field ghc-options on line 18
2020-01-29T11:40:06.867 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:06.867348115 [ThreadId 5096] - Resolving dependencies...
2020-01-29T11:40:08.260 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:08.259871131 [ThreadId 5096] - Build profile: -w ghc-8.6.4 -O1
2020-01-29 11:40:08.259948719 [ThreadId 5096] - In order, the following will be built (use -v for more details):
2020-01-29 11:40:08.259976407 [ThreadId 5096] - - projectName-0.1 (lib) (configuration changed)
2020-01-29T11:40:08.260 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:08.260008711 [ThreadId 5096] - - projectName-0.1 (test:test) (configuration changed)
2020-01-29T11:40:08.286 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:08.285872112 [ThreadId 5096] - Configuring library for projectName-0.1..
2020-01-29T11:40:09.724 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:09.724664994 [ThreadId 5094] - Warning: 'ghc-options: -threaded' has no effect for libraries. It should only
2020-01-29T11:40:09.725 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:09.724737361 [ThreadId 5094] - be used for executables.
2020-01-29 11:40:09.724761742 [ThreadId 5094] - Warning: 'ghc-options: -rtsopts' has no effect for libraries. It should only
2020-01-29 11:40:09.724785564 [ThreadId 5094] - be used for executables.
2020-01-29T11:40:10.977 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:10.976835372 [ThreadId 5096] - Preprocessing library for projectName-0.1..
2020-01-29T11:40:10.977 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:10.976915242 [ThreadId 5096] - Building library for projectName-0.1..
2020-01-29T11:40:18.800 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:18.800747763 [ThreadId 5096] - Configuring test suite 'test' for projectName-0.1..
2020-01-29T11:40:20.245 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:20.24548543 [ThreadId 5094] - Warning: 'ghc-options: -threaded' has no effect for libraries. It should only
2020-01-29 11:40:20.24560092 [ThreadId 5094] - be used for executables.
2020-01-29T11:40:20.246 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:20.245659418 [ThreadId 5094] - Warning: 'ghc-options: -rtsopts' has no effect for libraries. It should only
2020-01-29 11:40:20.245709091 [ThreadId 5094] - be used for executables.
2020-01-29T11:40:21.510 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:21.510034098 [ThreadId 5096] - Preprocessing test suite 'test' for projectName-0.1..
2020-01-29T11:40:22.035 DEBUG (pid:375157) [language-client-index] - [languageserver.haskell] 2020-01-29 11:40:22.035578167 [ThreadId 15] - Cradle did not load succesfully |
what is the output of |
EDIT: It succeeds |
You can try to install the executable from this project with If nothing helps at all, please try to share your project with us (if you did not install hie from source before, I would suggest this option before installing hie from source). If it is confidential, try to reduce it to something that is not confidential and share that (assuming, it reproduces your problem). EDIT: also, please let's continue the discussion at haskell/haskell-ide-engine#1613 since I believe it is an issue with either hie or some project specific fail. |
Issue that caused it: haskell#1725 the problem is that we cant honour the `+RTS` flags, since these need to be known when GHC is started. However, HIE is the compiler and is started before we load any component. Therefore, these options for the different component are unusable and we strip them here to avoid a bug. This commit is inspired by haskell/hie-bios#102
Issue that caused it: #1725 the problem is that we cant honour the `+RTS` flags, since these need to be known when GHC is started. However, HIE is the compiler and is started before we load any component. Therefore, these options for the different component are unusable and we strip them here to avoid a bug. This commit is inspired by haskell/hie-bios#102
This is a duplicate of an issue in: https://github.com/digital-asset/ghcide/issues/136
I am investigating and can duplicate the problem, but for some reason only with the cabal files generated by
stack
/hpack
. I am going to keep investigating and try to cause the issue with pure cabal in addition to trying to fix it.The text was updated successfully, but these errors were encountered: