reflex-frp/reflex-dom-semui

Error upon building

k-bx opened this issue · 6 comments

k-bx commented

Hi

I would really appreciate if you'd help me building the project. I started a bug here originally ghcjs/ghcjs#529 , but I think this is a better place to resolve it.

Repo with the project in case you're interested in reproducing: https://github.com/k-bx/play-reflex-semui

stack build output:

➜  play-reflex-semui  stack build
Ignoring that the GHCJS boot package "aeson" has a different version, 0.11.2.0, than the resolver's wanted version, 0.11.2.1
Ignoring that the GHCJS boot package "attoparsec" has a different version, 0.13.0.2, than the resolver's wanted version, 0.13.1.0
Ignoring that the GHCJS boot package "unordered-containers" has a different version, 0.2.7.0, than the resolver's wanted version, 0.2.7.1
Ignoring that the GHCJS boot package "scientific" has a different version, 0.3.4.7, than the resolver's wanted version, 0.3.4.9
Ignoring that the GHCJS boot package "case-insensitive" has a different version, 1.2.0.6, than the resolver's wanted version, 1.2.0.7
Ignoring that the GHCJS boot package "mtl" has a different version, 2.2.2, than the resolver's wanted version, 2.2.1
Ignoring that the GHCJS boot package "dlist" has a different version, 0.7.1.2, than the resolver's wanted version, 0.8.0.2
play-reflex-semui-0.1.0.0: build

--  While building package play-reflex-semui-0.1.0.0 using:
      /Users/kb/.stack/setup-exe-cache/x86_64-osx/setup-Simple-Cabal-1.24.0.0-ghcjs-0.2.0_ghc-8.0.1 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.0.0_ghcjs build exe:play-reflex-semui --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
    Logs have been written to: /Users/kb/workspace/play-reflex-semui/.stack-work/logs/play-reflex-semui-0.1.0.0.log

    Preprocessing executable 'play-reflex-semui' for play-reflex-semui-0.1.0.0...
    [1 of 1] Compiling Main             ( src/Main.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.0.0_ghcjs/build/play-reflex-semui/play-reflex-semui-tmp/Main.js_o )
    Failed to load interface for ‘Reflex.Dom.SemanticUI.Button’
    Perhaps you haven't installed the "js" libraries for package ‘reflex-dom-semui-0.1’?
    Use -v to see a list of the files searched for.

Thank you!

spl commented

I don't know what your reported problem is, but I tried building k-bx/play-reflex-semui@75f529e with the following stack.yaml (GHCJS from here) and got the error below. dca375a built successfully.

resolver: lts-7.1
compiler: ghcjs-0.2.1.9007001_ghc-8.0.1
compiler-check: match-exact

setup-info:
  ghcjs:
    source:
      ghcjs-0.2.1.9007001_ghc-8.0.1:
        url: http://tolysz.org/ghcjs/ghc-8.0-2016-09-26-lts-7.1-9007001-mem.tar.gz
        sha1: e640724883238593e2d2f7f03991cb413ec0347b

packages:
- '.'

- location:
    git: https://github.com/reflex-frp/reflex.git
    commit: 50d298cb1b5ed850ec017e2aab10ffa1fb5466b0
  extra-dep: true

- location:
    git: https://github.com/reflex-frp/reflex-dom.git
    commit: 083977ea24e223c339626f52054222a7497a279b
  extra-dep: true

- location:
    git: https://github.com/reflex-frp/reflex-dom-semui.git
    commit: dca375a2427df7ebd4f20e0eebcde0ac8a72fc75
  extra-dep: true

extra-deps:
- ref-tf-0.4.0.1
- ghcjs-dom-0.2.4.0
- zenc-0.1.1
~/play-reflex-semui $ stack build
reflex-0.5.0: configure
reflex-0.5.0: build
ghcjs-dom-0.2.4.0: configure
ghcjs-dom-0.2.4.0: build
reflex-0.5.0: copy/register
zenc-0.1.1: configure
zenc-0.1.1: build
zenc-0.1.1: copy/register
ghcjs-dom-0.2.4.0: copy/register
reflex-dom-0.4: configure
reflex-dom-0.4: build
reflex-dom-0.4: copy/register
reflex-dom-semui-0.1: configure
reflex-dom-semui-0.1: build
reflex-dom-semui-0.1: copy/register
play-reflex-semui-0.1.0.0: configure
Configuring play-reflex-semui-0.1.0.0...
play-reflex-semui-0.1.0.0: build
Preprocessing executable 'play-reflex-semui' for play-reflex-semui-0.1.0.0...
[1 of 1] Compiling Main             ( src/Main.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0_ghcjs/build/play-reflex-semui/play-reflex-semui-tmp/Main.js_o )

~/play-reflex-semui/src/Main.hs:11:18: error:
    • Couldn't match expected type ‘UiButton’
                  with actual type ‘Dynamic t0 a0’
    • In the expression: constDyn def :: UiButton
      In an equation for ‘btnDyn’: btnDyn = constDyn def :: UiButton
      In the second argument of ‘($)’, namely
        ‘do { let btnDyn = ...;
              text "hahaha";
              return () }’
Completed 6 action(s).

--  While building package play-reflex-semui-0.1.0.0 using:
      ~/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.24.0.0-ghcjs-0.2.1.9007001_ghc-8.0.1 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.24.0.0_ghcjs build exe:play-reflex-semui --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1

@k-bx I didn't respond to this earlier because I don't use stack and hadn't gotten around to trying to reproduce your report. But I suspect the problem has something to do with your stack/GHCJS setup. The message the GHCJS boot package "mtl" has a different version, 2.2.2, than the resolver's wanted version, 2.2.1 seems to suggest that there is some kind of a mismatch between GHCJS and stack.

k-bx commented

@mightybyte those messages are just warnings which happen all the time and our work-project works well with them (just in case you're interested in details).

Ahh good to know, thanks.

spl commented

Yes, those “Ignoring that the GHCJS boot package” from stack are not necessarily problematic. But the fact that I was able to build reflex-dom-semui with a different GHCJS still indicates there might be a problem with your setup. You might try using the latest commits in your stack.yaml.

k-bx commented

@spl yes, thank you, I definitely plan to do that, sorry for not updating on this. I'll write an update as soon as I'll do more experementation with different builds. I also will try different OS with my build and maybe some cleanups etc.