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

TH splice changeWorkingDirectory: does not exist when cross compiling elm to musl64 #1617

Closed
ParetoOptimalDev opened this issue Aug 25, 2022 · 7 comments
Labels
bug Something isn't working wontfix

Comments

@ParetoOptimalDev
Copy link

ParetoOptimalDev commented Aug 25, 2022

I followed the haskell.nix cross compliation tutorial, but had to adapt some things to flakes. That could very well be where my error is if this isn't a bug.

Here is my repo for reproducing this:

https://github.com/ParetoOptimalDev/compiler/tree/multi-arch-static-bins-with-nix

From x86_64-linux cross compiling tomusl64 I get:

changeWorkingDirectory: does not exist (No such file or directory)
error: builder for '/nix/store/s7fzmnaswifs287kq8axmvbkzma0n6v5-elm-exe-elm-0.19.1.drv' failed with exit code 1;
       last 10 log lines:
       > terminal/src/Develop/StaticFiles.hs:91:3: error:
       >      Exception when trying to run compile-time code:
       >         reactor: changeWorkingDirectory: does not exist (No such file or directory)
       >       Code: (bsToExp =<< runIO Build.buildReactorFrontEnd)
       >      In the untyped splice:
       >         $(bsToExp =<< runIO Build.buildReactorFrontEnd)
       >    |
       > 91 |   $(bsToExp =<< runIO Build.buildReactorFrontEnd)
       >    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       > [131 of 132] Compiling Bump             ( terminal/src/Bump.hs, dist/build/elm/elm-tmp/Bump.o, dist/build/elm/elm-tmp/Bump.dyn_o )

Using flake.nix:

{
  description = "A very basic flake";
  inputs.haskellNix.url = "github:input-output-hk/haskell.nix";
  inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
  inputs.flake-utils.url = "github:numtide/flake-utils";
  outputs = { self, nixpkgs, flake-utils, haskellNix }:
    flake-utils.lib.eachSystem [ "aarch64-linux" "aarch64-darwin" "x86_64-linux" ] (system:
      let
        overlays = [ haskellNix.overlay
                     (final: prev: {
                       elmProject =
                         final.haskell-nix.project' {
                           src = ./.;
                           compiler-nix-name = "ghc902";
                           shell.tools = {
                             cabal = {};
                             hlint = {};
                             haskell-language-server = {};
                           };
                           shell.crossPlatforms = p: [ p.musl64 ];
                         };
                     })
                   ];
        pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; 
                                nixpkgsArgs = {
                                  crossSystem = { config = "musl64"; };
                                };
                              };
        flake = pkgs.elmProject.flake {};
      in flake // {
        crossPlatforms = p: [p.musl64];
        flkPackages = pkgs;
        hnix = haskellNix;
        
        # trying to follow pattern at
        # https://input-output-hk.github.io/haskell.nix/tutorials/cross-compilation.html
        # with a couple differences:
        #
        # - using a flake
        # - using pkgsStatic overlay instead of setting static flags manually
        #
        # defaultPackage = musl64.pkgs.pkgsStatic.haskellPackages.executables.components.exes.elm;
        # elmAarch64Multi = aarch64MultiMusl.pkgsStatic.haskellPackages.executables.components.exes.elm;
        defaultPackage = flake.packages."elm:exe:elm";
        # packages.${system}.default = flake.packages."compiler:exe:compiler";
        myFlake = flake;
      });
}

Here's the command line log:

$ nix build
error: builder for '/nix/store/s7fzmnaswifs287kq8axmvbkzma0n6v5-elm-exe-elm-0.19.1.drv' failed with exit code 1;
       last 10 log lines:
       > terminal/src/Develop/StaticFiles.hs:91:3: error:
       >     • Exception when trying to run compile-time code:
       >         reactor: changeWorkingDirectory: does not exist (No such file or directory)
       >       Code: (bsToExp =<< runIO Build.buildReactorFrontEnd)
       >     • In the untyped splice:
       >         $(bsToExp =<< runIO Build.buildReactorFrontEnd)
       >    |
       > 91 |   $(bsToExp =<< runIO Build.buildReactorFrontEnd)
       >    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       > [131 of 132] Compiling Bump             ( terminal/src/Bump.hs, dist/build/elm/elm-tmp/Bump.o, dist/build/elm/elm-tmp/Bump.dyn_o )
       For full logs, run 'nix log /nix/store/s7fzmnaswifs287kq8axmvbkzma0n6v5-elm-exe-elm-0.19.1.drv'.
@hamishmack
Copy link
Collaborator

Try ParetoOptimalDev/compiler#1

@ParetoOptimalDev
Copy link
Author

ParetoOptimalDev commented Aug 26, 2022

@hamishmack Thanks for the help an PR!

Sadly it still fails using 745193251225967951c7e33d9ac52b12d153555b.

Here's my full build log showing git status is clean and displaying the commit above is used:

$ git status && git log --oneline -n1 && nix build
On branch multi-arch-static-bins-with-nix
nothing to commit, working tree clean
74519325 (HEAD -> multi-arch-static-bins-with-nix, origin/multi-arch-static-bins-with-nix) Merge pull request #1 from hamishmack/patch-1
error: builder for '/nix/store/lwcgskvrd9zbsyhhzq4nlizf1978ykdz-elm-exe-elm-0.19.1.drv' failed with exit code 1;
       last 10 log lines:
       >
       > CallStack (from HasCallStack):
       >   error, called at terminal/src/Develop/StaticFiles/Build.hs:68:15 in main:Develop.StaticFiles.Build
       >       Code: (bsToExp =<< runIO Build.buildReactorFrontEnd)
       >     • In the untyped splice:
       >         $(bsToExp =<< runIO Build.buildReactorFrontEnd)
       >    |
       > 91 |   $(bsToExp =<< runIO Build.buildReactorFrontEnd)
       >    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       > [131 of 132] Compiling Bump             ( terminal/src/Bump.hs, dist/build/elm/elm-tmp/Bump.o, dist/build/elm/elm-tmp/Bump.dyn_o )
       For full logs, run 'nix log /nix/store/lwcgskvrd9zbsyhhzq4nlizf1978ykdz-elm-exe-elm-0.19.1.drv'.

Here's more context on the error:

[129 of 132] Compiling Develop.StaticFiles ( terminal/src/Develop/StaticFiles.hs, dist/build/elm/elm-tmp/Develop/StaticFiles.o, dist/build/elm/elm-tmp/Develop/StaticFiles.dyn_o )

terminal/src/Develop/StaticFiles.hs:91:3: error:
    • Exception when trying to run compile-time code:
        
--------------------------------------------------------
Error in Develop.StaticFiles.Build.buildReactorFrontEnd
Compile with `elm make` directly to figure it out faster
--------------------------------------------------------

CallStack (from HasCallStack):
  error, called at terminal/src/Develop/StaticFiles/Build.hs:68:15 in main:Develop.StaticFiles.Build
      Code: (bsToExp =<< runIO Build.buildReactorFrontEnd)
    • In the untyped splice:
        $(bsToExp =<< runIO Build.buildReactorFrontEnd)
   |
91 |   $(bsToExp =<< runIO Build.buildReactorFrontEnd)
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
full log using nix log
$ PAGER=cat nix log /nix/store/lwcgskvrd9zbsyhhzq4nlizf1978ykdz-elm-exe-elm-0.19.1.drv
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/vqxd9npcawyxfrxqq32ksc07zcw8v9fm-source-root-exe-elm
source root is source-root-exe-elm
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
Configure flags:
--prefix=/nix/store/3zvdmrhxrh3hbyxck3s886nj99g47n1v-elm-exe-elm-0.19.1 exe:elm --package-db=clear --package-db=/nix/store/0lzvl0c5r5rr3amhmy5yjhh98118mwvd-elm-exe-elm-0.19.1-config/lib/ghc-9.0.2/package.conf.d --flags=-dev --exact-configuration --dependency=ansi-terminal=ansi-terminal-0.8.2-6is4WVhb8uPhalIoozOHM --dependency=ansi-wl-pprint=ansi-wl-pprint-0.6.8.2-II8Ry01jnoL8y1JZ0Po6Fh --dependency=binary=binary-0.8.9.1-AIQSHAKHjIV9SxBQ32fKFm --dependency=bytestring=bytestring-0.10.12.1-HaPuleuPg5U8ZDqkRwyetU --dependency=containers=containers-0.5.11.0-3gNTHw8Ji7UBQXEl5ZZ0sj --dependency=directory=directory-1.3.6.2-CvenxACzsgV9G0rn3g2LhE --dependency=edit-distance=edit-distance-0.2.2.1-LpLyfqfi06r9km6nXsqyCA --dependency=file-embed=file-embed-0.0.15.0-ttiOeqRluJCHfw7STLuCx --dependency=filelock=filelock-0.1.1.5-Dq7rjFFXGu3HXjQlQYh8Xj --dependency=filepath=filepath-1.4.2.1-7V2ZiO2ZGhl3UwHl1viv3z --dependency=haskeline=haskeline-0.8.2-27jx7sgY4b8F8g1kKbfZFr --dependency=HTTP=HTTP-4000.3.16-FRCrSZHuElz4BkF6GQFLTs --dependency=http-client=http-client-0.6.4.1-8IrJFaP4c4CJSx4ljWEd2R --dependency=http-client-tls=http-client-tls-0.3.5.3-322Jjnzh3pk4w5ebwf7Pkw --dependency=http-types=http-types-0.12.3-ExxC5fJfy1IFS2lBfiZuUb --dependency=language-glsl=language-glsl-0.3.0-4vkA127k63aFnw9OkwSfEB --dependency=mtl=mtl-2.2.2-9vpIzAj95GK8VcMMgbTxuf --dependency=network=network-2.6.3.6-5yGGfmZiX96GJVIdgo6yS2 --dependency=parsec=parsec-3.1.15.1-E7IzOcCOZvb1HOu7YzYwRp --dependency=process=process-1.6.13.2-EUsuPMTpIOWIUHpouBEygK --dependency=raw-strings-qq=raw-strings-qq-1.1-5JX2MsccvhkIJjYAJJnkbD --dependency=scientific=scientific-0.3.7.0-4NdPurMG6dJDC7jB066vIP --dependency=SHA=SHA-1.6.4.4-FzjX8IfyryK34SbimIF3Fm --dependency=snap-core=snap-core-1.0.5.0-DbV4tfGumEn2C4p3RxIbsl --dependency=snap-server=snap-server-1.1.2.0-7BzMFOZeBns4Ciqvdd4PKJ --dependency=time=time-1.9.3-4QADtHlAqaxHrrZdcJt0iS --dependency=unordered-containers=unordered-containers-0.2.19.1-HikkUdtlHUfEHW3ProiPMM --dependency=utf8-string=utf8-string-1.0.2-FLFKc8W9JEDK9mWDjmbJAi --dependency=vector=vector-0.12.3.1-ILPMj0YZWhG29BpvoRYNT2 --dependency=zip-archive=zip-archive-0.4.2.1-ACoM7y8T6mz85HwiSwlUJW --dependency=array=array-0.5.4.0 --dependency=base=base-4.15.1.0 --dependency=deepseq=deepseq-1.4.5.0 --dependency=ghc-bignum=ghc-bignum-1.1 --dependency=ghc-boot-th=ghc-boot-th-9.0.2 --dependency=ghc-prim=ghc-prim-0.7.0 --dependency=integer-gmp=integer-gmp-1.1 --dependency=pretty=pretty-1.1.3.6 --dependency=rts=rts --dependency=template-haskell=template-haskell-2.17.0.0 --with-ghc=ghc --with-ghc-pkg=ghc-pkg --with-hsc2hs=hsc2hs --with-gcc=cc --with-ld=ld.gold --ghc-option=-optl-fuse-ld=gold --ld-option=-fuse-ld=gold --with-ar=ar --with-strip=strip --disable-executable-stripping --disable-library-stripping --disable-library-profiling --disable-profiling --enable-static --enable-shared --disable-coverage --enable-library-for-ghci --datadir=/nix/store/j0idriscwnwwa3acmq3nklrha7d2rkkv-elm-exe-elm-0.19.1-data/share/ghc-9.0.2 --enable-split-sections 
Configuring executable 'elm' for elm-0.19.1..
Warning: Packages using 'cabal-version: >= 1.10' and before 'cabal-version:
3.4' must specify the 'default-language' field for each component (e.g.
Haskell98 or Haskell2010). If a component uses different languages in
different modules then list the other ones in the 'other-languages' field.
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Preprocessing executable 'elm' for elm-0.19.1..
Building executable 'elm' for elm-0.19.1..
[  1 of 132] Compiling AST.Utils.Binop  ( compiler/src/AST/Utils/Binop.hs, dist/build/elm/elm-tmp/AST/Utils/Binop.o, dist/build/elm/elm-tmp/AST/Utils/Binop.dyn_o )
[  2 of 132] Compiling Data.Bag         ( compiler/src/Data/Bag.hs, dist/build/elm/elm-tmp/Data/Bag.o, dist/build/elm/elm-tmp/Data/Bag.dyn_o )
[  3 of 132] Compiling Data.Index       ( compiler/src/Data/Index.hs, dist/build/elm/elm-tmp/Data/Index.o, dist/build/elm/elm-tmp/Data/Index.dyn_o )
[  4 of 132] Compiling Data.Map.Utils   ( compiler/src/Data/Map/Utils.hs, dist/build/elm/elm-tmp/Data/Map/Utils.o, dist/build/elm/elm-tmp/Data/Map/Utils.dyn_o )
[  5 of 132] Compiling Data.NonEmptyList ( compiler/src/Data/NonEmptyList.hs, dist/build/elm/elm-tmp/Data/NonEmptyList.o, dist/build/elm/elm-tmp/Data/NonEmptyList.dyn_o )
[  6 of 132] Compiling Data.OneOrMore   ( compiler/src/Data/OneOrMore.hs, dist/build/elm/elm-tmp/Data/OneOrMore.o, dist/build/elm/elm-tmp/Data/OneOrMore.dyn_o )
[  7 of 132] Compiling Elm.Magnitude    ( compiler/src/Elm/Magnitude.hs, dist/build/elm/elm-tmp/Elm/Magnitude.o, dist/build/elm/elm-tmp/Elm/Magnitude.dyn_o )
[  8 of 132] Compiling File             ( builder/src/File.hs, dist/build/elm/elm-tmp/File.o, dist/build/elm/elm-tmp/File.dyn_o )
[  9 of 132] Compiling BackgroundWriter ( builder/src/BackgroundWriter.hs, dist/build/elm/elm-tmp/BackgroundWriter.o, dist/build/elm/elm-tmp/BackgroundWriter.dyn_o )
[ 10 of 132] Compiling Generate.JavaScript.Functions ( compiler/src/Generate/JavaScript/Functions.hs, dist/build/elm/elm-tmp/Generate/JavaScript/Functions.o, dist/build/elm/elm-tmp/Generate/JavaScript/Functions.dyn_o )
[ 11 of 132] Compiling Paths_elm        ( dist/build/elm/autogen/Paths_elm.hs, dist/build/elm/elm-tmp/Paths_elm.o, dist/build/elm/elm-tmp/Paths_elm.dyn_o )
[ 12 of 132] Compiling Reporting.Annotation ( compiler/src/Reporting/Annotation.hs, dist/build/elm/elm-tmp/Reporting/Annotation.o, dist/build/elm/elm-tmp/Reporting/Annotation.dyn_o )
[ 13 of 132] Compiling Parse.Primitives ( compiler/src/Parse/Primitives.hs, dist/build/elm/elm-tmp/Parse/Primitives.o, dist/build/elm/elm-tmp/Parse/Primitives.dyn_o )
[ 14 of 132] Compiling Data.Utf8        ( compiler/src/Data/Utf8.hs, dist/build/elm/elm-tmp/Data/Utf8.o, dist/build/elm/elm-tmp/Data/Utf8.dyn_o )
[ 15 of 132] Compiling Elm.String       ( compiler/src/Elm/String.hs, dist/build/elm/elm-tmp/Elm/String.o, dist/build/elm/elm-tmp/Elm/String.dyn_o )
[ 16 of 132] Compiling Elm.Float        ( compiler/src/Elm/Float.hs, dist/build/elm/elm-tmp/Elm/Float.o, dist/build/elm/elm-tmp/Elm/Float.dyn_o )
[ 17 of 132] Compiling Data.Name        ( compiler/src/Data/Name.hs, dist/build/elm/elm-tmp/Data/Name.o, dist/build/elm/elm-tmp/Data/Name.dyn_o )
[ 18 of 132] Compiling Parse.Symbol     ( compiler/src/Parse/Symbol.hs, dist/build/elm/elm-tmp/Parse/Symbol.o, dist/build/elm/elm-tmp/Parse/Symbol.dyn_o )
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
[ 19 of 132] Compiling Json.String      ( compiler/src/Json/String.hs, dist/build/elm/elm-tmp/Json/String.o, dist/build/elm/elm-tmp/Json/String.dyn_o )
[ 20 of 132] Compiling Json.Encode      ( compiler/src/Json/Encode.hs, dist/build/elm/elm-tmp/Json/Encode.o, dist/build/elm/elm-tmp/Json/Encode.dyn_o )

compiler/src/Json/Encode.hs:31:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
31 | import Data.Monoid ((<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
[ 21 of 132] Compiling Generate.Html    ( compiler/src/Generate/Html.hs, dist/build/elm/elm-tmp/Generate/Html.o, dist/build/elm/elm-tmp/Generate/Html.dyn_o )
[ 22 of 132] Compiling Develop.Generate.Help ( terminal/src/Develop/Generate/Help.hs, dist/build/elm/elm-tmp/Develop/Generate/Help.o, dist/build/elm/elm-tmp/Develop/Generate/Help.dyn_o )

terminal/src/Develop/Generate/Help.hs:12:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
12 | import Data.Monoid ((<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
[ 23 of 132] Compiling AST.Utils.Shader ( compiler/src/AST/Utils/Shader.hs, dist/build/elm/elm-tmp/AST/Utils/Shader.o, dist/build/elm/elm-tmp/AST/Utils/Shader.dyn_o )
[ 24 of 132] Compiling AST.Source       ( compiler/src/AST/Source.hs, dist/build/elm/elm-tmp/AST/Source.o, dist/build/elm/elm-tmp/AST/Source.dyn_o )
[ 25 of 132] Compiling Parse.Variable   ( compiler/src/Parse/Variable.hs, dist/build/elm/elm-tmp/Parse/Variable.o, dist/build/elm/elm-tmp/Parse/Variable.dyn_o )
[ 26 of 132] Compiling Parse.Keyword    ( compiler/src/Parse/Keyword.hs, dist/build/elm/elm-tmp/Parse/Keyword.o, dist/build/elm/elm-tmp/Parse/Keyword.dyn_o )
[ 27 of 132] Compiling Json.Decode      ( compiler/src/Json/Decode.hs, dist/build/elm/elm-tmp/Json/Decode.o, dist/build/elm/elm-tmp/Json/Decode.dyn_o )
[ 28 of 132] Compiling Elm.Version      ( compiler/src/Elm/Version.hs, dist/build/elm/elm-tmp/Elm/Version.o, dist/build/elm/elm-tmp/Elm/Version.dyn_o )
[ 29 of 132] Compiling Http             ( builder/src/Http.hs, dist/build/elm/elm-tmp/Http.o, dist/build/elm/elm-tmp/Http.dyn_o )
[ 30 of 132] Compiling Elm.Constraint   ( compiler/src/Elm/Constraint.hs, dist/build/elm/elm-tmp/Elm/Constraint.o, dist/build/elm/elm-tmp/Elm/Constraint.dyn_o )
[ 31 of 132] Compiling Reporting.Suggest ( compiler/src/Reporting/Suggest.hs, dist/build/elm/elm-tmp/Reporting/Suggest.o, dist/build/elm/elm-tmp/Reporting/Suggest.dyn_o )
[ 32 of 132] Compiling Elm.Package      ( compiler/src/Elm/Package.hs, dist/build/elm/elm-tmp/Elm/Package.o, dist/build/elm/elm-tmp/Elm/Package.dyn_o )

compiler/src/Elm/Package.hs:37:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
37 | import Data.Monoid ((<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
[ 33 of 132] Compiling Reporting.Doc    ( compiler/src/Reporting/Doc.hs, dist/build/elm/elm-tmp/Reporting/Doc.o, dist/build/elm/elm-tmp/Reporting/Doc.dyn_o )

compiler/src/Reporting/Doc.hs:49:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
49 | import Data.Monoid ((<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
[ 34 of 132] Compiling Reporting.Report ( compiler/src/Reporting/Report.hs, dist/build/elm/elm-tmp/Reporting/Report.o, dist/build/elm/elm-tmp/Reporting/Report.dyn_o )
[ 35 of 132] Compiling Reporting.Render.Code ( compiler/src/Reporting/Render/Code.hs, dist/build/elm/elm-tmp/Reporting/Render/Code.o, dist/build/elm/elm-tmp/Reporting/Render/Code.dyn_o )
[ 36 of 132] Compiling Elm.ModuleName   ( compiler/src/Elm/ModuleName.hs, dist/build/elm/elm-tmp/Elm/ModuleName.o, dist/build/elm/elm-tmp/Elm/ModuleName.dyn_o )
[ 37 of 132] Compiling Reporting.Render.Type.Localizer ( compiler/src/Reporting/Render/Type/Localizer.hs, dist/build/elm/elm-tmp/Reporting/Render/Type/Localizer.o, dist/build/elm/elm-tmp/Reporting/Render/Type/Localizer.dyn_o )

compiler/src/Reporting/Render/Type/Localizer.hs:20:1: warning: [-Wunused-imports]
    The import of ‘Reporting.Doc’ is redundant
      except perhaps to import instances from ‘Reporting.Doc’
    To import instances alone, use: import Reporting.Doc()
   |
20 | import Reporting.Doc ((<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 38 of 132] Compiling Reporting.Error.Syntax ( compiler/src/Reporting/Error/Syntax.hs, dist/build/elm/elm-tmp/Reporting/Error/Syntax.o, dist/build/elm/elm-tmp/Reporting/Error/Syntax.dyn_o )
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
[ 39 of 132] Compiling Reporting.Error.Docs ( compiler/src/Reporting/Error/Docs.hs, dist/build/elm/elm-tmp/Reporting/Error/Docs.o, dist/build/elm/elm-tmp/Reporting/Error/Docs.dyn_o )

compiler/src/Reporting/Error/Docs.hs:19:1: warning: [-Wunused-imports]
    The import of ‘Reporting.Doc’ is redundant
      except perhaps to import instances from ‘Reporting.Doc’
    To import instances alone, use: import Reporting.Doc()
   |
19 | import Reporting.Doc ((<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 40 of 132] Compiling Parse.Space      ( compiler/src/Parse/Space.hs, dist/build/elm/elm-tmp/Parse/Space.o, dist/build/elm/elm-tmp/Parse/Space.dyn_o )
[ 41 of 132] Compiling Parse.Type       ( compiler/src/Parse/Type.hs, dist/build/elm/elm-tmp/Parse/Type.o, dist/build/elm/elm-tmp/Parse/Type.dyn_o )
[ 42 of 132] Compiling Parse.Shader     ( compiler/src/Parse/Shader.hs, dist/build/elm/elm-tmp/Parse/Shader.o, dist/build/elm/elm-tmp/Parse/Shader.dyn_o )
[ 43 of 132] Compiling Parse.Number     ( compiler/src/Parse/Number.hs, dist/build/elm/elm-tmp/Parse/Number.o, dist/build/elm/elm-tmp/Parse/Number.dyn_o )
[ 44 of 132] Compiling Parse.String     ( compiler/src/Parse/String.hs, dist/build/elm/elm-tmp/Parse/String.o, dist/build/elm/elm-tmp/Parse/String.dyn_o )
[ 45 of 132] Compiling Parse.Pattern    ( compiler/src/Parse/Pattern.hs, dist/build/elm/elm-tmp/Parse/Pattern.o, dist/build/elm/elm-tmp/Parse/Pattern.dyn_o )
[ 46 of 132] Compiling Parse.Expression ( compiler/src/Parse/Expression.hs, dist/build/elm/elm-tmp/Parse/Expression.o, dist/build/elm/elm-tmp/Parse/Expression.dyn_o )
[ 47 of 132] Compiling Parse.Declaration ( compiler/src/Parse/Declaration.hs, dist/build/elm/elm-tmp/Parse/Declaration.o, dist/build/elm/elm-tmp/Parse/Declaration.dyn_o )
[ 48 of 132] Compiling Reporting.Error.Import ( compiler/src/Reporting/Error/Import.hs, dist/build/elm/elm-tmp/Reporting/Error/Import.o, dist/build/elm/elm-tmp/Reporting/Error/Import.dyn_o )
[ 49 of 132] Compiling Generate.JavaScript.Name ( compiler/src/Generate/JavaScript/Name.hs, dist/build/elm/elm-tmp/Generate/JavaScript/Name.o, dist/build/elm/elm-tmp/Generate/JavaScript/Name.dyn_o )

compiler/src/Generate/JavaScript/Name.hs:22:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
22 | import Data.Monoid ((<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
[ 50 of 132] Compiling Generate.JavaScript.Builder ( compiler/src/Generate/JavaScript/Builder.hs, dist/build/elm/elm-tmp/Generate/JavaScript/Builder.o, dist/build/elm/elm-tmp/Generate/JavaScript/Builder.dyn_o )

compiler/src/Generate/JavaScript/Builder.hs:21:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
21 | import Data.Monoid ((<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
[ 51 of 132] Compiling Elm.Compiler.Imports ( compiler/src/Elm/Compiler/Imports.hs, dist/build/elm/elm-tmp/Elm/Compiler/Imports.o, dist/build/elm/elm-tmp/Elm/Compiler/Imports.dyn_o )
[ 52 of 132] Compiling Parse.Module     ( compiler/src/Parse/Module.hs, dist/build/elm/elm-tmp/Parse/Module.o, dist/build/elm/elm-tmp/Parse/Module.dyn_o )
[ 53 of 132] Compiling AST.Canonical    ( compiler/src/AST/Canonical.hs, dist/build/elm/elm-tmp/AST/Canonical.o, dist/build/elm/elm-tmp/AST/Canonical.dyn_o )
[ 54 of 132] Compiling Reporting.Render.Type ( compiler/src/Reporting/Render/Type.hs, dist/build/elm/elm-tmp/Reporting/Render/Type.o, dist/build/elm/elm-tmp/Reporting/Render/Type.dyn_o )

compiler/src/Reporting/Render/Type.hs:24:36: warning: [-Wunused-imports]
    The import of ‘<>’ from module ‘Reporting.Doc’ is redundant
   |
24 | import Reporting.Doc ( Doc, (<+>), (<>) )
   |                                    ^^^^
[ 55 of 132] Compiling Elm.Compiler.Type ( compiler/src/Elm/Compiler/Type.hs, dist/build/elm/elm-tmp/Elm/Compiler/Type.o, dist/build/elm/elm-tmp/Elm/Compiler/Type.dyn_o )
[ 56 of 132] Compiling Reporting.Error.Canonicalize ( compiler/src/Reporting/Error/Canonicalize.hs, dist/build/elm/elm-tmp/Reporting/Error/Canonicalize.o, dist/build/elm/elm-tmp/Reporting/Error/Canonicalize.dyn_o )

compiler/src/Reporting/Error/Canonicalize.hs:29:35: warning: [-Wunused-imports]
    The import of ‘<>’ from module ‘Reporting.Doc’ is redundant
   |
29 | import Reporting.Doc (Doc, (<+>), (<>))
   |                                   ^^^^
[ 57 of 132] Compiling Reporting.Error.Main ( compiler/src/Reporting/Error/Main.hs, dist/build/elm/elm-tmp/Reporting/Error/Main.o, dist/build/elm/elm-tmp/Reporting/Error/Main.dyn_o )
[ 58 of 132] Compiling Optimize.DecisionTree ( compiler/src/Optimize/DecisionTree.hs, dist/build/elm/elm-tmp/Optimize/DecisionTree.o, dist/build/elm/elm-tmp/Optimize/DecisionTree.dyn_o )
[ 59 of 132] Compiling Nitpick.PatternMatches ( compiler/src/Nitpick/PatternMatches.hs, dist/build/elm/elm-tmp/Nitpick/PatternMatches.o, dist/build/elm/elm-tmp/Nitpick/PatternMatches.dyn_o )
[ 60 of 132] Compiling Reporting.Error.Pattern ( compiler/src/Reporting/Error/Pattern.hs, dist/build/elm/elm-tmp/Reporting/Error/Pattern.o, dist/build/elm/elm-tmp/Reporting/Error/Pattern.dyn_o )

compiler/src/Reporting/Error/Pattern.hs:13:1: warning: [-Wunused-imports]
    The import of ‘Reporting.Doc’ is redundant
      except perhaps to import instances from ‘Reporting.Doc’
    To import instances alone, use: import Reporting.Doc()
   |
13 | import Reporting.Doc ((<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 61 of 132] Compiling AST.Utils.Type   ( compiler/src/AST/Utils/Type.hs, dist/build/elm/elm-tmp/AST/Utils/Type.o, dist/build/elm/elm-tmp/AST/Utils/Type.dyn_o )
[ 62 of 132] Compiling Elm.Kernel       ( compiler/src/Elm/Kernel.hs, dist/build/elm/elm-tmp/Elm/Kernel.o, dist/build/elm/elm-tmp/Elm/Kernel.dyn_o )
[ 63 of 132] Compiling Elm.Interface    ( compiler/src/Elm/Interface.hs, dist/build/elm/elm-tmp/Elm/Interface.o, dist/build/elm/elm-tmp/Elm/Interface.dyn_o )
[ 64 of 132] Compiling Deps.Website     ( builder/src/Deps/Website.hs, dist/build/elm/elm-tmp/Deps/Website.o, dist/build/elm/elm-tmp/Deps/Website.dyn_o )
[ 65 of 132] Compiling AST.Optimized    ( compiler/src/AST/Optimized.hs, dist/build/elm/elm-tmp/AST/Optimized.o, dist/build/elm/elm-tmp/AST/Optimized.dyn_o )
[ 66 of 132] Compiling Optimize.Names   ( compiler/src/Optimize/Names.hs, dist/build/elm/elm-tmp/Optimize/Names.o, dist/build/elm/elm-tmp/Optimize/Names.dyn_o )
exprType TYPE: Name
exprType TYPE: Name
[ 67 of 132] Compiling Optimize.Port    ( compiler/src/Optimize/Port.hs, dist/build/elm/elm-tmp/Optimize/Port.o, dist/build/elm/elm-tmp/Optimize/Port.dyn_o )
[ 68 of 132] Compiling Optimize.Case    ( compiler/src/Optimize/Case.hs, dist/build/elm/elm-tmp/Optimize/Case.o, dist/build/elm/elm-tmp/Optimize/Case.dyn_o )
[ 69 of 132] Compiling Optimize.Expression ( compiler/src/Optimize/Expression.hs, dist/build/elm/elm-tmp/Optimize/Expression.o, dist/build/elm/elm-tmp/Optimize/Expression.dyn_o )
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
exprType TYPE: Name
[ 70 of 132] Compiling Nitpick.Debug    ( compiler/src/Nitpick/Debug.hs, dist/build/elm/elm-tmp/Nitpick/Debug.o, dist/build/elm/elm-tmp/Nitpick/Debug.dyn_o )
[ 71 of 132] Compiling Elm.Compiler.Type.Extract ( compiler/src/Elm/Compiler/Type/Extract.hs, dist/build/elm/elm-tmp/Elm/Compiler/Type/Extract.o, dist/build/elm/elm-tmp/Elm/Compiler/Type/Extract.dyn_o )
[ 72 of 132] Compiling Generate.Mode    ( compiler/src/Generate/Mode.hs, dist/build/elm/elm-tmp/Generate/Mode.o, dist/build/elm/elm-tmp/Generate/Mode.dyn_o )
[ 73 of 132] Compiling Generate.JavaScript.Expression ( compiler/src/Generate/JavaScript/Expression.hs, dist/build/elm/elm-tmp/Generate/JavaScript/Expression.o, dist/build/elm/elm-tmp/Generate/JavaScript/Expression.dyn_o )
[ 74 of 132] Compiling Generate.JavaScript ( compiler/src/Generate/JavaScript.hs, dist/build/elm/elm-tmp/Generate/JavaScript.o, dist/build/elm/elm-tmp/Generate/JavaScript.dyn_o )
[ 75 of 132] Compiling Elm.Licenses     ( compiler/src/Elm/Licenses.hs, dist/build/elm/elm-tmp/Elm/Licenses.o, dist/build/elm/elm-tmp/Elm/Licenses.dyn_o )
[ 76 of 132] Compiling Reporting.Task   ( builder/src/Reporting/Task.hs, dist/build/elm/elm-tmp/Reporting/Task.o, dist/build/elm/elm-tmp/Reporting/Task.dyn_o )
[ 77 of 132] Compiling Reporting.Warning ( compiler/src/Reporting/Warning.hs, dist/build/elm/elm-tmp/Reporting/Warning.o, dist/build/elm/elm-tmp/Reporting/Warning.dyn_o )

compiler/src/Reporting/Warning.hs:11:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
11 | import Data.Monoid ((<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
[ 78 of 132] Compiling Reporting.Result ( compiler/src/Reporting/Result.hs, dist/build/elm/elm-tmp/Reporting/Result.o, dist/build/elm/elm-tmp/Reporting/Result.dyn_o )
[ 79 of 132] Compiling Elm.Docs         ( compiler/src/Elm/Docs.hs, dist/build/elm/elm-tmp/Elm/Docs.o, dist/build/elm/elm-tmp/Elm/Docs.dyn_o )
[ 80 of 132] Compiling Canonicalize.Environment.Dups ( compiler/src/Canonicalize/Environment/Dups.hs, dist/build/elm/elm-tmp/Canonicalize/Environment/Dups.o, dist/build/elm/elm-tmp/Canonicalize/Environment/Dups.dyn_o )
[ 81 of 132] Compiling Canonicalize.Environment ( compiler/src/Canonicalize/Environment.hs, dist/build/elm/elm-tmp/Canonicalize/Environment.o, dist/build/elm/elm-tmp/Canonicalize/Environment.dyn_o )
[ 82 of 132] Compiling Canonicalize.Type ( compiler/src/Canonicalize/Type.hs, dist/build/elm/elm-tmp/Canonicalize/Type.o, dist/build/elm/elm-tmp/Canonicalize/Type.dyn_o )
[ 83 of 132] Compiling Canonicalize.Pattern ( compiler/src/Canonicalize/Pattern.hs, dist/build/elm/elm-tmp/Canonicalize/Pattern.o, dist/build/elm/elm-tmp/Canonicalize/Pattern.dyn_o )
[ 84 of 132] Compiling Canonicalize.Environment.Local ( compiler/src/Canonicalize/Environment/Local.hs, dist/build/elm/elm-tmp/Canonicalize/Environment/Local.o, dist/build/elm/elm-tmp/Canonicalize/Environment/Local.dyn_o )
[ 85 of 132] Compiling Canonicalize.Environment.Foreign ( compiler/src/Canonicalize/Environment/Foreign.hs, dist/build/elm/elm-tmp/Canonicalize/Environment/Foreign.o, dist/build/elm/elm-tmp/Canonicalize/Environment/Foreign.dyn_o )
[ 86 of 132] Compiling Canonicalize.Effects ( compiler/src/Canonicalize/Effects.hs, dist/build/elm/elm-tmp/Canonicalize/Effects.o, dist/build/elm/elm-tmp/Canonicalize/Effects.dyn_o )
[ 87 of 132] Compiling Optimize.Module  ( compiler/src/Optimize/Module.hs, dist/build/elm/elm-tmp/Optimize/Module.o, dist/build/elm/elm-tmp/Optimize/Module.dyn_o )
[ 88 of 132] Compiling Canonicalize.Expression ( compiler/src/Canonicalize/Expression.hs, dist/build/elm/elm-tmp/Canonicalize/Expression.o, dist/build/elm/elm-tmp/Canonicalize/Expression.dyn_o )
[ 89 of 132] Compiling Canonicalize.Module ( compiler/src/Canonicalize/Module.hs, dist/build/elm/elm-tmp/Canonicalize/Module.o, dist/build/elm/elm-tmp/Canonicalize/Module.dyn_o )
[ 90 of 132] Compiling Stuff            ( builder/src/Stuff.hs, dist/build/elm/elm-tmp/Stuff.o, dist/build/elm/elm-tmp/Stuff.dyn_o )
[ 91 of 132] Compiling Terminal.Internal ( terminal/impl/Terminal/Internal.hs, dist/build/elm/elm-tmp/Terminal/Internal.o, dist/build/elm/elm-tmp/Terminal/Internal.dyn_o )
[ 92 of 132] Compiling Terminal.Error   ( terminal/impl/Terminal/Error.hs, dist/build/elm/elm-tmp/Terminal/Error.o, dist/build/elm/elm-tmp/Terminal/Error.dyn_o )
[ 93 of 132] Compiling Terminal.Chomp   ( terminal/impl/Terminal/Chomp.hs, dist/build/elm/elm-tmp/Terminal/Chomp.o, dist/build/elm/elm-tmp/Terminal/Chomp.dyn_o )
[ 94 of 132] Compiling Terminal         ( terminal/impl/Terminal.hs, dist/build/elm/elm-tmp/Terminal.o, dist/build/elm/elm-tmp/Terminal.dyn_o )
[ 95 of 132] Compiling Type.Error       ( compiler/src/Type/Error.hs, dist/build/elm/elm-tmp/Type/Error.o, dist/build/elm/elm-tmp/Type/Error.dyn_o )

compiler/src/Type/Error.hs:23:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
23 | import Data.Monoid ((<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
[ 96 of 132] Compiling Reporting.Error.Type ( compiler/src/Reporting/Error/Type.hs, dist/build/elm/elm-tmp/Reporting/Error/Type.o, dist/build/elm/elm-tmp/Reporting/Error/Type.dyn_o )

compiler/src/Reporting/Error/Type.hs:24:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
24 | import Data.Monoid ((<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
[ 97 of 132] Compiling Reporting.Error  ( compiler/src/Reporting/Error.hs, dist/build/elm/elm-tmp/Reporting/Error.o, dist/build/elm/elm-tmp/Reporting/Error.dyn_o )
[ 98 of 132] Compiling Reporting.Exit.Help ( builder/src/Reporting/Exit/Help.hs, dist/build/elm/elm-tmp/Reporting/Exit/Help.o, dist/build/elm/elm-tmp/Reporting/Exit/Help.dyn_o )
[ 99 of 132] Compiling Reporting.Error.Json ( compiler/src/Reporting/Error/Json.hs, dist/build/elm/elm-tmp/Reporting/Error/Json.o, dist/build/elm/elm-tmp/Reporting/Error/Json.dyn_o )
[100 of 132] Compiling Reporting.Exit   ( builder/src/Reporting/Exit.hs, dist/build/elm/elm-tmp/Reporting/Exit.o, dist/build/elm/elm-tmp/Reporting/Exit.dyn_o )
[101 of 132] Compiling Reporting        ( builder/src/Reporting.hs, dist/build/elm/elm-tmp/Reporting.o, dist/build/elm/elm-tmp/Reporting.dyn_o )
[102 of 132] Compiling Elm.Outline      ( builder/src/Elm/Outline.hs, dist/build/elm/elm-tmp/Elm/Outline.o, dist/build/elm/elm-tmp/Elm/Outline.dyn_o )
[103 of 132] Compiling Deps.Registry    ( builder/src/Deps/Registry.hs, dist/build/elm/elm-tmp/Deps/Registry.o, dist/build/elm/elm-tmp/Deps/Registry.dyn_o )
[104 of 132] Compiling Terminal.Helpers ( terminal/impl/Terminal/Helpers.hs, dist/build/elm/elm-tmp/Terminal/Helpers.o, dist/build/elm/elm-tmp/Terminal/Helpers.dyn_o )
[105 of 132] Compiling Deps.Solver      ( builder/src/Deps/Solver.hs, dist/build/elm/elm-tmp/Deps/Solver.o, dist/build/elm/elm-tmp/Deps/Solver.dyn_o )
[106 of 132] Compiling Init             ( terminal/src/Init.hs, dist/build/elm/elm-tmp/Init.o, dist/build/elm/elm-tmp/Init.dyn_o )
[107 of 132] Compiling Deps.Bump        ( builder/src/Deps/Bump.hs, dist/build/elm/elm-tmp/Deps/Bump.o, dist/build/elm/elm-tmp/Deps/Bump.dyn_o )
[108 of 132] Compiling Deps.Diff        ( builder/src/Deps/Diff.hs, dist/build/elm/elm-tmp/Deps/Diff.o, dist/build/elm/elm-tmp/Deps/Diff.dyn_o )
[109 of 132] Compiling Type.UnionFind   ( compiler/src/Type/UnionFind.hs, dist/build/elm/elm-tmp/Type/UnionFind.o, dist/build/elm/elm-tmp/Type/UnionFind.dyn_o )
[110 of 132] Compiling Type.Type        ( compiler/src/Type/Type.hs, dist/build/elm/elm-tmp/Type/Type.o, dist/build/elm/elm-tmp/Type/Type.dyn_o )
[111 of 132] Compiling Type.Instantiate ( compiler/src/Type/Instantiate.hs, dist/build/elm/elm-tmp/Type/Instantiate.o, dist/build/elm/elm-tmp/Type/Instantiate.dyn_o )
[112 of 132] Compiling Type.Constrain.Pattern ( compiler/src/Type/Constrain/Pattern.hs, dist/build/elm/elm-tmp/Type/Constrain/Pattern.o, dist/build/elm/elm-tmp/Type/Constrain/Pattern.dyn_o )
[113 of 132] Compiling Type.Constrain.Expression ( compiler/src/Type/Constrain/Expression.hs, dist/build/elm/elm-tmp/Type/Constrain/Expression.o, dist/build/elm/elm-tmp/Type/Constrain/Expression.dyn_o )
[114 of 132] Compiling Type.Constrain.Module ( compiler/src/Type/Constrain/Module.hs, dist/build/elm/elm-tmp/Type/Constrain/Module.o, dist/build/elm/elm-tmp/Type/Constrain/Module.dyn_o )
[115 of 132] Compiling Type.Occurs      ( compiler/src/Type/Occurs.hs, dist/build/elm/elm-tmp/Type/Occurs.o, dist/build/elm/elm-tmp/Type/Occurs.dyn_o )
[116 of 132] Compiling Type.Unify       ( compiler/src/Type/Unify.hs, dist/build/elm/elm-tmp/Type/Unify.o, dist/build/elm/elm-tmp/Type/Unify.dyn_o )
[117 of 132] Compiling Type.Solve       ( compiler/src/Type/Solve.hs, dist/build/elm/elm-tmp/Type/Solve.o, dist/build/elm/elm-tmp/Type/Solve.dyn_o )
[118 of 132] Compiling Compile          ( compiler/src/Compile.hs, dist/build/elm/elm-tmp/Compile.o, dist/build/elm/elm-tmp/Compile.dyn_o )
[119 of 132] Compiling Elm.Details      ( builder/src/Elm/Details.hs, dist/build/elm/elm-tmp/Elm/Details.o, dist/build/elm/elm-tmp/Elm/Details.dyn_o )
[120 of 132] Compiling Install          ( terminal/src/Install.hs, dist/build/elm/elm-tmp/Install.o, dist/build/elm/elm-tmp/Install.dyn_o )
[121 of 132] Compiling Develop.Generate.Index ( terminal/src/Develop/Generate/Index.hs, dist/build/elm/elm-tmp/Develop/Generate/Index.o, dist/build/elm/elm-tmp/Develop/Generate/Index.dyn_o )
[122 of 132] Compiling Build            ( builder/src/Build.hs, dist/build/elm/elm-tmp/Build.o, dist/build/elm/elm-tmp/Build.dyn_o )
[123 of 132] Compiling Publish          ( terminal/src/Publish.hs, dist/build/elm/elm-tmp/Publish.o, dist/build/elm/elm-tmp/Publish.dyn_o )
[124 of 132] Compiling Generate         ( builder/src/Generate.hs, dist/build/elm/elm-tmp/Generate.o, dist/build/elm/elm-tmp/Generate.dyn_o )
[125 of 132] Compiling Repl             ( terminal/src/Repl.hs, dist/build/elm/elm-tmp/Repl.o, dist/build/elm/elm-tmp/Repl.dyn_o )

terminal/src/Repl.hs:32:1: warning: [-Wunused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
32 | import Data.Monoid ((<>))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
-- PROBLEM LOADING PACKAGE LIST ------------------------------------------------

I need the list of published packages to verify your dependencies, so I tried to
fetch:

    https://package.elm-lang.org/all-packages

But my HTTP library is giving me the following error message:

    ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [AI_ADDRCONFIG], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = <assumed to be undefined>, addrCanonName = <assumed to be undefined>}, host name: Just "package.elm-lang.org", service name: Just "443"): does not exist (Temporary failure in name resolution)

Are you somewhere with a slow internet connection? Or no internet? Does the link
I am trying to fetch work in your browser? Maybe the site is down? Does your
internet connection have a firewall that blocks certain domains? It is usually
something like that!

[126 of 132] Compiling Make             ( terminal/src/Make.hs, dist/build/elm/elm-tmp/Make.o, dist/build/elm/elm-tmp/Make.dyn_o )
[127 of 132] Compiling Diff             ( terminal/src/Diff.hs, dist/build/elm/elm-tmp/Diff.o, dist/build/elm/elm-tmp/Diff.dyn_o )

terminal/src/Diff.hs:30:23: warning: [-Wunused-imports]
    The import of ‘<>’ from module ‘Reporting.Doc’ is redundant
   |
30 | import Reporting.Doc ((<>), (<+>))
   |                       ^^^^
[128 of 132] Compiling Develop.StaticFiles.Build ( terminal/src/Develop/StaticFiles/Build.hs, dist/build/elm/elm-tmp/Develop/StaticFiles/Build.o, dist/build/elm/elm-tmp/Develop/StaticFiles/Build.dyn_o )
[129 of 132] Compiling Develop.StaticFiles ( terminal/src/Develop/StaticFiles.hs, dist/build/elm/elm-tmp/Develop/StaticFiles.o, dist/build/elm/elm-tmp/Develop/StaticFiles.dyn_o )

terminal/src/Develop/StaticFiles.hs:91:3: error:
    • Exception when trying to run compile-time code:
        
--------------------------------------------------------
Error in Develop.StaticFiles.Build.buildReactorFrontEnd
Compile with `elm make` directly to figure it out faster
--------------------------------------------------------

CallStack (from HasCallStack):
  error, called at terminal/src/Develop/StaticFiles/Build.hs:68:15 in main:Develop.StaticFiles.Build
      Code: (bsToExp =<< runIO Build.buildReactorFrontEnd)
    • In the untyped splice:
        $(bsToExp =<< runIO Build.buildReactorFrontEnd)
   |
91 |   $(bsToExp =<< runIO Build.buildReactorFrontEnd)
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[131 of 132] Compiling Bump             ( terminal/src/Bump.hs, dist/build/elm/elm-tmp/Bump.o, dist/build/elm/elm-tmp/Bump.dyn_o )

@ParetoOptimalDev
Copy link
Author

I'm not sure if this is a problem, but it looks like in the full logs before that failure elm is trying to fetch something and failing:

I need the list of published packages to verify your dependencies, so I tried to
fetch:

    https://package.elm-lang.org/all-packages

But my HTTP library is giving me the following error message:

    ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [AI_ADDRCONFIG], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = <assumed to be undefined>, addrCanonName = <assumed to be undefined>}, host name: Just "package.elm-lang.org", service name: Just "443"): does not exist (Temporary failure in name resolution)

Are you somewhere with a slow internet connection? Or no internet? Does the link
I am trying to fetch work in your browser? Maybe the site is down? Does your
internet connection have a firewall that blocks certain domains? It is usually
something like that!

@ParetoOptimalDev
Copy link
Author

ParetoOptimalDev commented Aug 26, 2022

I also added the builder directory like you added the reactor one:

modified   flake.nix
@@ -19,7 +19,7 @@
                            };
                            shell.crossPlatforms = p: [ p.musl64 ];
                            modules = [{
-                             packages.elm.package.extraSrcFiles = ["reactor/**"];
+                             packages.elm.package.extraSrcFiles = ["reactor/**" "builder/**"];
                              packages.elm.components.exes.elm.preBuild = ''
                                HOME=$(mktemp -d)
                              '';

An error still happened, so now I'm suspicious of bsToExp in the problematic splice $(bsToExp =<< runIO Build.buildReactorFrontEnd) . There was similar discussion about file-embedin #1077 (comment)

However it looks like you and @purefn fixed things here? I'll start inspecting the components/sources of the elm project to make sure I guess.

@ParetoOptimalDev
Copy link
Author

I'm println debugging the template Haskell splice now to see how far it gets. This should narrow things down.

@ParetoOptimalDev
Copy link
Author

ParetoOptimalDev commented Aug 26, 2022

Everything builds fine If I remove that call:

modified   terminal/src/Develop/StaticFiles.hs
@@ -87,8 +87,7 @@ sansFontPath =
 
 
 elm :: BS.ByteString
-elm =
-  $(bsToExp =<< runIO Build.buildReactorFrontEnd)
+elm = mempty

It seems to need network access for something... still tracking down what.

Actually maybe nixpkgs handles this for elm since they successfully build it....

And of course... @domenkozar has detailed exactly that in nixpkgs documentation for compiling/updating elm:

The elm binary embeds a piece of pre-compiled elm code, used by 'elm reactor'. This means that the build process for 'elm' effectively executes 'elm make'. that in turn expects to retrieve the elm dependencies of that code (elm/core, etc.) from package.elm-lang.org, as well as a cached bit of metadata (versions.dat).

The makeDotElm function lets us retrieve these dependencies in the standard nix way. we have to copy them in (rather than symlink) and make them writable because the elm compiler writes other .dat files alongside the source code. versions.dat was produced during an impure build of this same code; the build complains that it can't update this cache, but continues past that warning.

Finally, we set ELM_HOME to point to these pre-fetched artifacts so that the default of ~/.elm isn't used.

More: https://blog.hercules-ci.com/elm/2019/01/03/elm2nix-0.1/

It'll take a second to digest how to replicate this with Haskell.nix.

It looks like I'll have to bring in makeDotElm and override cabal.preConfigure with to run fetchElmDeps.

@yvan-sraka yvan-sraka added the bug Something isn't working label Sep 20, 2022
@stale
Copy link

stale bot commented Jan 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix
Projects
None yet
Development

No branches or pull requests

3 participants