Skip to content

Use patched version of hie-bios to load ghcide modules #64

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

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

jneira
Copy link
Member

@jneira jneira commented Apr 16, 2020

@alanz
Copy link
Collaborator

alanz commented Apr 17, 2020

I am in favour of this project moving as rapidly as possible, the sub-projects we rely on have a slower pace. So running in private for mode is going to be a thing for a while still.

@alanz alanz merged commit 470e5d3 into haskell:master Apr 17, 2020
@lorenzo
Copy link

lorenzo commented Apr 17, 2020

@jneira @alanz the project does not compile after this change:

haskell-language-server>
haskell-language-server> /Users/lorenzo/Software/haskell-language-server/exe/Main.hs:500:13: error:
haskell-language-server>     • The constructor ‘ComponentOptions’ should have 2 arguments, but has been given 3
haskell-language-server>     • In the pattern: ComponentOptions theOpts compRoot _
haskell-language-server>       In an equation for ‘setOptions’:
haskell-language-server>           setOptions (ComponentOptions theOpts compRoot _) dflags
haskell-language-server>             = do cacheDir <- liftIO $ getCacheDir theOpts
haskell-language-server>                  (dflags', targets) <- addCmdOpts compRoot theOpts dflags
haskell-language-server>                  let dflags'' = ...
haskell-language-server>                  ....
haskell-language-server>     |
haskell-language-server> 500 | setOptions (ComponentOptions theOpts compRoot _) dflags = do
haskell-language-server>     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@jneira
Copy link
Member Author

jneira commented Apr 17, 2020

@lorenzo are you using stack? i did not update the stack.yaml files, i will do asap

After updating them the build with stack fails, cause it builds the ghcide exe component although it is no needed for hls.

PS D:\dev\ws\haskell\hls> stack build
ghcide                 > build (lib + exe)
ghcide                 > Preprocessing library for ghcide-0.1.0..
ghcide                 > Building library for ghcide-0.1.0..
ghcide                 > Preprocessing executable 'ghcide' for ghcide-0.1.0..
ghcide                 > Building executable 'ghcide' for ghcide-0.1.0..
ghcide                 > [4 of 4] Compiling Main
ghcide                 > 
ghcide                 > exe\Main.hs:442:13: error:
ghcide                 >     * The constructor `ComponentOptions' should have 3 arguments, but has been given 2
ghcide                 >     * In the pattern: ComponentOptions theOpts _
ghcide                 >       In an equation for `setOptions':
ghcide                 >           setOptions (ComponentOptions theOpts _) dflags
ghcide                 >             = do cacheDir <- liftIO $ getCacheDir theOpts
ghcide                 >                  (dflags', targets) <- addCmdOpts theOpts dflags
ghcide                 >                  let dflags'' = ...
ghcide                 >                  ....
ghcide                 >     |
ghcide                 > 442 | setOptions (ComponentOptions theOpts _) dflags = do
ghcide                 >     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
ghcide                 >

I`try to push a fix in @alanz repo

@jneira jneira deleted the patched-hie-bios branch April 19, 2020 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants