Skip to content
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

Build Error for 8.10.4 (maybe only under Windows) #1372

Closed
CarstenKoenig opened this issue Feb 15, 2021 · 9 comments · Fixed by #1399
Closed

Build Error for 8.10.4 (maybe only under Windows) #1372

CarstenKoenig opened this issue Feb 15, 2021 · 9 comments · Fixed by #1399
Assignees
Labels
build tool: stack CI Continuous integration os: windows type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@CarstenKoenig
Copy link

CarstenKoenig commented Feb 15, 2021

Your environment

please note: that is after I fixed the issue with the workaround I added bellow

haskell-language-server version: 0.9.0.0 (GHC: 8.10.4) (PATH: C:\Users\cakoeni1\AppData\Roaming\local\bin\haskell-language-server.exe) (GIT hash: 4d431e9a7c51ab1b817476c1fec45c6cbaa676e8)
Tool versions found on the $PATH
cabal:          Not found
stack:          2.5.1
ghc:            Not found

only stack should matter here though - it's a windows OS

Steps to reproduce

git clone https://github.com/haskell/haskell-language-server --recurse-submodules
cd haskell-language-server
stack ./install.hs hls-8.10.4

Expected behaviour

haskell-language-server.exe and haskell-language-server-wrapper.exe is build and installed

Actual behaviour

error

with-utf8 > app\utf8-troubleshoot\Main.hs:23:31: error:
with-utf8 >     Module `GHC.IO.Encoding.Iconv' does not export `localeEncodingName'
with-utf8 >    |
with-utf8 > 23 | import GHC.IO.Encoding.Iconv (localeEncodingName)

see serokell/haskell-with-utf8#9

work around

add this to extra-deps in stack-8.10.4.yaml:

  - github: f-f/haskell-with-utf8
    commit: 8ae743ac6503a4c494ea3bd52f1fe7d72f9f125d
@CarstenKoenig CarstenKoenig changed the title Build Error for 8.10.4 (maybe only for windwos) Build Error for 8.10.4 (maybe only under Windows) Feb 15, 2021
@Ailrun Ailrun added CI Continuous integration build tool: stack type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. type: setup os: windows labels Feb 15, 2021
@Ailrun
Copy link
Member

Ailrun commented Feb 15, 2021

It looks like indeed it happens only in Windows, as GHC.IO.Encoding.Iconv does not export them only when !defined(mingw32_HOST_OS).

@jneira
Copy link
Member

jneira commented Feb 16, 2021

Ugh, we dont have builds in ci for stack+windows, thanks for report the issue, we will try to fix asap

@jneira
Copy link
Member

jneira commented Feb 16, 2021

only stack should matter here though - it's a windows OS

i use mostly cabal in windows (and our ci is building and testing using cabal in ci) 😉

@jneira jneira self-assigned this Feb 16, 2021
@CarstenKoenig
Copy link
Author

only stack should matter here though - it's a windows OS

i use mostly cabal in windows (and our ci is building and testing using cabal in ci) 😉

sorry the comment was probably very poorly worded - I did not want to express that only stack matters on windows - I wanted to express that the only information that IMO mattered in that console log was the stack-version.

The template for the issue here asked me to include the output and the following comments around it was me trying to say that this was using the tooling with my "temp-fix" applied and that it AFAIK should not really matter for the issue at hand.

@Ailrun
Copy link
Member

Ailrun commented Feb 16, 2021

Yeah I also believe that the usage of the tool stack should not matter. It's more like how that dependency is broken in Windows OS.

@jneira
Copy link
Member

jneira commented Feb 16, 2021

But it works in cabal and windows, without using any source-repository-package... to investigate

@jneira
Copy link
Member

jneira commented Feb 18, 2021

@CarstenKoenig it turns out that using last with-utf8 fixes the issue, as 1.0.2.2 has a patch for it
cabal, which uses version ranges, has picked the patched version automatically but stack using fixed versions needed manual changes in stack.yaml to get it

@CarstenKoenig
Copy link
Author

Thank you for the info and you all for your work - HLS and the VS.code extension is quite amazing

I guess it's ok to close the issue in this case.

Do you want me to do it?

@jneira
Copy link
Member

jneira commented Feb 18, 2021

Thank you for trying it and take some time to report the issue.
The merging of the pr will close it automatically.

@mergify mergify bot closed this as completed in #1399 Feb 19, 2021
mergify bot added a commit that referenced this issue Feb 19, 2021
* Use last with-utf8

* Use last with-utf8 in all stack.yamls

* Remove duplicate with-utf8 entry

* Update default stack.yaml

* Remove duplicate entry for 8.8.2 too

Co-authored-by: Junyoung/Clare Jang <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build tool: stack CI Continuous integration os: windows type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants