elm/core

Compilation error building elm/core 1.0.5

kadimisetty opened this issue · 4 comments

I've found that elm/core 1.0.5 does not compile on my machine running NixOS. I have to rollback to 1.0.4 every time, due to this issue. It doesn't seem to matter where elm is installed from, the nix package manager or downloading the binary directly.

Here are the logs of an attempt to compile:

$ elm make src/Main.elm
Dependency problem!
-- PROBLEM BUILDING DEPENDENCIES -----------------------------------------------

I ran into a compilation error when trying to build the following package:

    elm/core 1.0.5

This probably means it has package constraints that are too wide. It may be
possible to tweak your elm.json to avoid the root problem as a stopgap. Head
over to https://elm-lang.org/community to get help figuring out how to take this
path!

Note: To help with the root problem, please report this to the package author
along with the following information:



If you want to help out even more, try building the package locally. That should
give you much more specific information about why this package is failing to
build, which will in turn make it easier for the package author to fix it!

How to reproduce:
Just the standard elm project setup -

  • Make new directory
  • elm init and type Y to create elm.json
  • Add src/Main.elm with quick sample code in elm guide.
  • Compile failes on elm make or via elm reactor etc.

Please let me know any more information I can provide.

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.

Finally, please be patient with the core team. They are trying their best with limited resources.

What nixpkgs commit are you on?

I tried nix-shell -p elmPackages.elm, following the instructions you gave, and get

[nix-shell:~/elm-test]$ elm make src/Main.elm 
Success! Compiled 1 module.

    Main ───> index.html

I had to add module Main exposing(..) at the top of the Main.elm as it was missing from the example code, but that's all.

This is on a fairly recent nixos-unstable commit.

  • It does fail in elm repl as well. The repl loads fine, but also shows the above elm-core compilation error when attempting something like 1+2 etc, and after changing back to 1.0.4 everything seems to work as expected.

  • My setup:

$ nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.32, NixOS, 22.05 (Quokka), 22.05pre367572.b6966d911da`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.7.0`
 - channels(sri): `"nixos"`
 - channels(root): `"nixos-22.05pre367572.b6966d911da"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Closing this issue as after switching operating systems, I'm not able to replicate this compilation error anymore.