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

2.0.0 release is broken #218

Closed
justinmanley opened this Issue Apr 20, 2015 · 10 comments

Comments

Projects
None yet
2 participants
@justinmanley

justinmanley commented Apr 20, 2015

Running elm-make with this very simple program:

module Main where

import Graphics.Element (empty)

main = empty

downloads the latest release of elm-core (currently 2.0.0), then fails with a syntax error. Fixing the version of elm-core to be >= 1.1.0 fixes the issue.

Running tests/run-test.sh yields the same error:

Packages configured successfully!
Linking elm-stuff/packages/elm-lang/core/1.1.1 to /home/justin/p/elm-core
(line 31, column 15):
unexpected "e"
expecting whitespace, a newline, reserved word 'as' or "("

I imagine this is a syntax error somewhere in the Elm source, but there's no source file identified, and I wasn't able to track it down by inspection.

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Apr 20, 2015

Member

Have you cleared out elm-stuff/? The error message you gave says you are building with elm-lang/core 1.1.1 which is not updated for the new import syntax

Member

evancz commented Apr 20, 2015

Have you cleared out elm-stuff/? The error message you gave says you are building with elm-lang/core 1.1.1 which is not updated for the new import syntax

@justinmanley

This comment has been minimized.

Show comment
Hide comment
@justinmanley

justinmanley Apr 21, 2015

Nope, that's not the issue. This is from a fresh clone of the repo. I thought that the 1.1.1 might be coming from the test elm-package.json, but that hypothesis doesn't totally make sense, since the version there is 1.1.0, not 1.1.1.

justinmanley commented Apr 21, 2015

Nope, that's not the issue. This is from a fresh clone of the repo. I thought that the 1.1.1 might be coming from the test elm-package.json, but that hypothesis doesn't totally make sense, since the version there is 1.1.0, not 1.1.1.

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Apr 21, 2015

Member

Wait, what are you trying to do? The testing stuff in elm-lang/core is messed up right now, and I have not gotten a chance to go through and fix it. When you say "2.0.0 is broken" do you mean that the tests are failing? Or do you mean that you are having trouble using it in a typical case?

Member

evancz commented Apr 21, 2015

Wait, what are you trying to do? The testing stuff in elm-lang/core is messed up right now, and I have not gotten a chance to go through and fix it. When you say "2.0.0 is broken" do you mean that the tests are failing? Or do you mean that you are having trouble using it in a typical case?

@justinmanley

This comment has been minimized.

Show comment
Hide comment
@justinmanley

justinmanley Apr 21, 2015

I mean both.

I started out trying to write a very simple elm program to demonstrate a minimal failing example for a different elm issue, but I found that when I compiled using the Elm Reactor or using elm-make, I got the error above.

Since there was no file identified in the error message, and my source file only had about five lines (the error is at line 31), I figured that the error must be somewhere in the elm core libraries. This made sense, since I saw that there was a new release of the core libraries this morning. I figured that I'd check out the core libraries and run the unit tests to see what the failure was, since I noticed that the build had failed on Travis CI. When I ran the tests using tests/run-test.sh, I got exactly the same error.

justinmanley commented Apr 21, 2015

I mean both.

I started out trying to write a very simple elm program to demonstrate a minimal failing example for a different elm issue, but I found that when I compiled using the Elm Reactor or using elm-make, I got the error above.

Since there was no file identified in the error message, and my source file only had about five lines (the error is at line 31), I figured that the error must be somewhere in the elm core libraries. This made sense, since I saw that there was a new release of the core libraries this morning. I figured that I'd check out the core libraries and run the unit tests to see what the failure was, since I noticed that the build had failed on Travis CI. When I ran the tests using tests/run-test.sh, I got exactly the same error.

@justinmanley

This comment has been minimized.

Show comment
Hide comment
@justinmanley

justinmanley Apr 21, 2015

In case it helps, here's what I got when I tried to compile the very simple program I described above, in my first comment:

$ elm-make Main.elm
Some new packages are needed. Here is the upgrade plan.

  Install:
    elm-lang/core 2.0.0

Do you approve of this plan? (y/n) y
Downloading elm-lang/core
Packages configured successfully!
(line 31, column 15):
unexpected "e"
expecting whitespace, a newline, reserved word 'as' or "("

justinmanley commented Apr 21, 2015

In case it helps, here's what I got when I tried to compile the very simple program I described above, in my first comment:

$ elm-make Main.elm
Some new packages are needed. Here is the upgrade plan.

  Install:
    elm-lang/core 2.0.0

Do you approve of this plan? (y/n) y
Downloading elm-lang/core
Packages configured successfully!
(line 31, column 15):
unexpected "e"
expecting whitespace, a newline, reserved word 'as' or "("
@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Apr 21, 2015

Member

Okay, so you are in a fresh directory, no previous Elm stuff running the following code:

module Main where

import Graphics.Element exposing (empty)

main = empty

Notice that this is not exactly the same as what you wrote initially. The import syntax has changed, so you need to add the word exposing. I was thrown off by the error message you gave, because import issues should print out a message talking about how the new imports should look.

When you run the command elm and elm-make --help what does it give out? I can imagine your terminal is pointing to old executables. Also, what OS are you on and how did you install?

Member

evancz commented Apr 21, 2015

Okay, so you are in a fresh directory, no previous Elm stuff running the following code:

module Main where

import Graphics.Element exposing (empty)

main = empty

Notice that this is not exactly the same as what you wrote initially. The import syntax has changed, so you need to add the word exposing. I was thrown off by the error message you gave, because import issues should print out a message talking about how the new imports should look.

When you run the command elm and elm-make --help what does it give out? I can imagine your terminal is pointing to old executables. Also, what OS are you on and how did you install?

@justinmanley

This comment has been minimized.

Show comment
Hide comment
@justinmanley

justinmanley Apr 21, 2015

Ok. Running that stuff in a fresh directory, I get the same error as above. Also:

$ elm --version
No command 'elm' found, did you mean:
  Command 'elq' from package 'qmail' (universe)
  ...
$ elm-make --version
elm-make 0.1.1, (c) Evan Czaplicki 2014
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.10
Release:    14.10
Codename:   utopic

I used the BuildFromSource.hs installer.

justinmanley commented Apr 21, 2015

Ok. Running that stuff in a fresh directory, I get the same error as above. Also:

$ elm --version
No command 'elm' found, did you mean:
  Command 'elq' from package 'qmail' (universe)
  ...
$ elm-make --version
elm-make 0.1.1, (c) Evan Czaplicki 2014
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.10
Release:    14.10
Codename:   utopic

I used the BuildFromSource.hs installer.

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Apr 21, 2015

Member

Okay, we found the issue! Running elm should give you this:

$ elm
Elm Platform 0.15 - a way to run all Elm tools

Usage: elm <command> [<args>]

Available commands include:

  make      Compile an Elm file or project into JS or HTML
  package   Manage packages from <http://package.elm-lang.org>
  reactor   Develop with compile-on-refresh and time-travel debugging
  repl      A REPL for running individual expressions

You can learn more about a specific command by running things like:

  elm make --help
  elm package --help
  elm <command> --help

In all these cases we are simply running 'elm-<command>' so if you create an
executable named 'elm-foobar' you will be able to run it as 'elm foobar' as
long as it appears on your PATH.

And running elm-make --help should do this:

$ elm-make --help
elm-make 0.1.2 (Elm Platform 0.15)

Usage: elm-make [FILES...] [--output FILE] [--yes]
  build Elm projects

Available options:
  -h,--help                Show this help text
  --output FILE            Write output to FILE.
  --yes                    Reply 'yes' to all automated prompts.

To learn more about a particular command run:
    elm-make COMMAND --help

It looks like your PATH is not set up correctly. When you run which elm-make it should point to an executable in Elm-Platform/0.15/bin and you cannot move that directory around after you create it with the BuildFromSource.hs program.

Member

evancz commented Apr 21, 2015

Okay, we found the issue! Running elm should give you this:

$ elm
Elm Platform 0.15 - a way to run all Elm tools

Usage: elm <command> [<args>]

Available commands include:

  make      Compile an Elm file or project into JS or HTML
  package   Manage packages from <http://package.elm-lang.org>
  reactor   Develop with compile-on-refresh and time-travel debugging
  repl      A REPL for running individual expressions

You can learn more about a specific command by running things like:

  elm make --help
  elm package --help
  elm <command> --help

In all these cases we are simply running 'elm-<command>' so if you create an
executable named 'elm-foobar' you will be able to run it as 'elm foobar' as
long as it appears on your PATH.

And running elm-make --help should do this:

$ elm-make --help
elm-make 0.1.2 (Elm Platform 0.15)

Usage: elm-make [FILES...] [--output FILE] [--yes]
  build Elm projects

Available options:
  -h,--help                Show this help text
  --output FILE            Write output to FILE.
  --yes                    Reply 'yes' to all automated prompts.

To learn more about a particular command run:
    elm-make COMMAND --help

It looks like your PATH is not set up correctly. When you run which elm-make it should point to an executable in Elm-Platform/0.15/bin and you cannot move that directory around after you create it with the BuildFromSource.hs program.

@justinmanley

This comment has been minimized.

Show comment
Hide comment
@justinmanley

justinmanley Apr 21, 2015

It took a while, but I finally got 0.15 of the elm platform installed. And that fixed it! Thanks, @evancz!

What was the issue?

justinmanley commented Apr 21, 2015

It took a while, but I finally got 0.15 of the elm platform installed. And that fixed it! Thanks, @evancz!

What was the issue?

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Apr 21, 2015

Member

Ohh, I think I get it. I assumed you had updated to 0.15 and was having issues. It seems that you were in fact using 0.14 and trying to use core 2.0.0 which is not compatible with 0.14. As of the new release, there is a constraint on what versions of Elm are supported, but it does not help with 0.14

In any case, sorry for the trouble and glad it's working now!

Member

evancz commented Apr 21, 2015

Ohh, I think I get it. I assumed you had updated to 0.15 and was having issues. It seems that you were in fact using 0.14 and trying to use core 2.0.0 which is not compatible with 0.14. As of the new release, there is a constraint on what versions of Elm are supported, but it does not help with 0.14

In any case, sorry for the trouble and glad it's working now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment