Giter Site home page Giter Site logo

elm-lang / elm-platform Goto Github PK

View Code? Open in Web Editor NEW
762.0 59.0 126.0 19.23 MB

Bundle of all core development tools for Elm

License: BSD 3-Clause "New" or "Revised" License

Shell 10.71% NSIS 27.90% Visual Basic 3.83% Haskell 28.44% Batchfile 1.65% JavaScript 27.48%
elm install platform compiler repl

elm-platform's Introduction

elm-platform's People

Contributors

agazso avatar alexcoventry avatar apanatshka avatar cored avatar eeue56 avatar evancz avatar frontierpsychiatrist avatar gilesbowkett avatar jpierson avatar jvoigtlaender avatar kevinsuttle avatar krisajenkins avatar kylefinley avatar mordrax avatar passy avatar potomak avatar process-bot avatar psagers avatar rehno-lindeque avatar tim-bezhashvyly avatar vschoettke avatar warry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elm-platform's Issues

Tracking installation issues

This issue exists to collect data on the number of people having problems installing Elm and which platforms they have the issues on. The current know routes are recorded here:

route OS Version bits status
installer Windows * *
OSX * *
npm * * * elm-reactor needs ELM_HOME
Ubuntu * 32 binary is 64-bit
from source * * * cabal hell

Based on website traffic, we can roughly guess that 50% of users are on OSX, 30% are on windows, and 20% are on some flavor of Linux.

I have removed the npm installer from the typical install path, so right now, Linux folks are building from source. I'd be interested to get the breakdown of users within Linux. I have a suspicion that Ubuntu or variations of Debian account for the majority of folks there.

If that is true, my priority would be trying to get npm install -g elm working there without the ELM_HOME issue. I think this is nicer than apt-get install in certain ways. I have made some updates to elm-reactor such that ELM_HOME will no longer be needed by anyone anywhere. I have also taken basic steps to see if I can build the compiler on a 32-bit version of Debian or Ubuntu, but ran into issues getting GHC and cabal in order (surprise!)

Reporting Additional Information for this Issue

If you are having issues that are not captured by this table, please post:

  • Your OS with the version number
  • Number of bits
  • Your installation method
  • The error encountered

For example,

  • OS: Ubuntu 13.04
  • bits: 32
  • route: BuildFromSource.hs
  • error: ENOENT not found /usr/lib/elm/vendor/elm-make

As per elm-lang/elm-plans#21

BuildFromSource.hs process puts interfaces.data in unexpected place

BuildFromSource.hs installed successfully for me. However, after setting my ELM_HOME to .../Elm-Platform/0.13/Elm/, running elm Foo.elm produces the error Unable to find file .../Elm-Platform/0.13/Elm/compiler/interfaces.data for deserialization!.

I believe this issue is distinct from elm/compiler#325, but that issue suggests that this problem is an artifact of the BuildFromSource.hs process.

I was able to silence the error by running:

ln -s .../Elm-Platform/0.13/Elm/data/interfaces.data .../Elm-Platform/0.13/Elm/compiler

elm-server: Seg fault

Platform: Mac OS X 10.7.5

Installation:

  • first, using the Mac installer
  • second, using cabal

Both times, I encountered this problem when attempting to run elm-server:
/usr/local/bin/elm-server: line 6: 85772 Segmentation fault: 11 /usr/local/bin/elm-server-unwrapped $*

Cabal sandboxing confusion

In the build script, you currently do one cabal sandbox init at the beginning, then other cabal sandbox inits later on. You are creating two different sandboxes that way!

The first cabal sandbox init, in the root directory, creates a sandbox root/.cabal-sandbox, so its build results would go into root/.cabal-sandbox/bin etc.

Then, later, in subdirectories of root you do cabal sandbox init --sandbox ... This is not reusing the earlier created sandbox. Instead, you are telling cabal to create a new sandbox that will use directories like root/bin etc.

This is possibly a reason for issue #62.

Moreover, it is possibly a reason for why you don't see the success in #63 that you expect there. That @garyLockyer and @mgold have different versions of aeson in their build plans indicates that your cabal.config version constraints do not get taken into account. The reason is possibly where you put it, and which sandboxes actually get used. In my experiments with https://www.stackage.org/lts/cabal.config, I always put the cabal.config file into the directory of the project currently being built. So cabal.config should then be in root/elm-compiler, in root/elm-repl etc., not only in root itself. Maybe there is a way to have cabal pick it up from the root location, via sandbox sharing. But the current way is obviously not working. (As said above, all the project builds do not actually use the sandbox you created at the very beginning. Instead, that one is completely ignored, instead the first project build makes another new one, and that one is used by all later project builds.)

Installing Elm using Platform Agnostic method on Cygwin

There's a problem with installing Elm on Cygwin.

After installing the Haskell Platform (portable) and then exporting these 2 paths:

    export PATH="$HOME/Haskell Platform/bin:$PATH"
    export PATH="$HOME/Haskell Platform/lib/extralibs/bin:$PATH"

And then running:

cabal update
cabal install elm elm-server elm-repl elm-get

This is the end output:

...
Installed elm-repl-0.2.2.1
cabal.exe: Error: some packages failed to install:
elm-get-0.1.2 depends on streaming-commons-0.1.4.2 which failed to install.
elm-server-0.11.0.1 depends on unix-compat-0.4.1.3 which failed to install.
http-client-0.3.8 depends on streaming-commons-0.1.4.2 which failed to
install.
http-client-tls-0.2.2 depends on streaming-commons-0.1.4.2 which failed to
install.
snap-core-0.9.6.3 depends on unix-compat-0.4.1.3 which failed to install.
snap-server-0.9.4.5 depends on unix-compat-0.4.1.3 which failed to install.
streaming-commons-0.1.4.2 failed during the building phase. The exception was:
ExitFailure 1
unix-compat-0.4.1.3 failed during the configure step. The exception was:
ExitFailure 1

It seems there was some problems with compiling certain binaries above, such as:

Building streaming-commons-0.1.4.2...
Preprocessing library streaming-commons-0.1.4.2...
Win32File.hsc:34:19: fatal error: Share.h: No such file or directory
compilation terminated.
compiling dist\build\System\Win32File_hsc_make.c failed (exit code 1)
command was: C:\cygwin64\bin\gcc.exe -c dist\build\System\Win32File_hsc_make.c -o dist\build\System\Win32File_hsc_make.o -D__GLASGOW_HASKELL__=708 -Dmingw32_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dmingw32_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -Iinclude -DWINDOWS -IC:\Users\CMCDragonkai\Haskell Platform\lib\extralibs\zlib-0.5.4.1\include -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -IC:\Users\CMCDragonkai\Haskell Platform\lib\process-1.2.0.0\include -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -IC:\Users\CMCDragonkai\Haskell Platform\lib\extralibs\network-2.4.2.3\include -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -IC:\Users\CMCDragonkai\Haskell Platform\lib\directory-1.2.1.0\include -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -IC:\Users\CMCDragonkai\Haskell Platform\lib\time-1.4.2\include -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -IC:\Users\CMCDragonkai\Haskell Platform\lib\Win32-2.3.0.2\include -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -IC:\Users\CMCDragonkai\Haskell Platform\lib\bytestring-0.10.4.0\include -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -IC:\Users\CMCDragonkai\Haskell Platform\lib\base-4.7.0.1\include -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -IC:\Users\CMCDragonkai\Haskell Platform\lib\integer-gmp-0.5.1.0\include -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -IC:\Users\CMCDragonkai\Haskell Platform\lib/include -Idist\build\autogen -include dist\build\autogen\cabal_macros.h -IC:\Users\CMCDragonkai\Haskell Platform/lib/include/

I'm guessing this is because its using Cygwin's gcc to compile and not the bundled mingw. Should I be overwriting the PATH to use mingy gcc instead?

Is there any way for it to work with just Cygwin's gcc? Or use Cygwin installed mingw and not the bundled mingw? One can install mingw directly via Cygwin, would there be a way for the installer to detect if its in a cygwin environment and switch to using Cygwin specific mingw for the builds?

ELM_HOME not set by BuildFromSource.hs

I ran BuildFromSource.hs.

After successful installation, I ran elm Foo.elm and got the following error:

elm: user error (Unable to find the ELM_HOME environment variable when searching
for the interfaces.data file.

If you installed Elm Platform with the Mac or Windows installer, it looks like
ELM_HOME was not set automatically. Look up how to set environment variables
on your platform and set ELM_HOME to the directory that contains Elm's static
files:

  * On Mac it is /usr/local/share/elm
  * On Windows it is one of the following:
      C:/Program Files/Elm Platform/0.13/share
      C:/Program Files (x86)/Elm Platform/0.13/share

If it seems like a more complex issue, please report it here:
    <https://github.com/elm-lang/elm-platform/issues>
)

Shouldn't BuildFromSource at least output something like:

Please add
`export ELM_HOME="foo/Elm-Platform/0.13/Elm/"`
to your shell config.

?

Can't install elm-server on ubuntu : oom

Hi there!
memory (2G) and swap (2G) are full on compiling "Text.Pandoc.Writers.Docx", then installation fail due to lack of memory. Well, 4G is not that few, I guess, any idea?
I precise that's my first use of cabal. :)
I'm on cabal 1.16.0 and ghc 7.6.3.

Windows Installer writes the wrong "type" of string to PATH

See #38 (comment) for full description of the root bug.

I use variables in my local PATH like so:

BIN=C:\bin
SCRIPTS=C:\scripts
...
PATH=%BIN%;%SCRIPTS%;C:\SomeFolder\bin

If I open up a cmd window, I see something like:

C:\Users\murrayh>echo %PATH%
C:\Windows\system32;...;C:\bin;C:\Scripts;C:\SomeFolder\bin

After installing Elm, I see something like this:

C:\Users\murrayh>echo %PATH%
C:\Windows\system32;...;C:\Elm Platform\0.14.1\bin;%BIN%;%SCRIPTS%;C:\SomeFolder\bin

The work around is for me to open up the PATH variable (as in, go to edit it) and then press OK without changing anything. This action expands the variables.

FYI I created an NSIS installer the other month and as far as I can tell there is no robust way to modify the PATH environment :-(. I went with the large string build (http://nsis.sourceforge.net/Special_Builds) and the patched EnvVarUpdate script (http://nsis.sourceforge.net/Environmental_Variables:_append,_prepend,_and_remove_entries), but my app has a very narrow distribution and a different class of user -- incomparable to Elm (the 0.1% of users with PATH.length > 8192 are probably all developers). I don't know of any solutions.

Direct-install from brew?

Wouldn't this be good or is there a reason we don't want to support it?

⧑ brew install elm-platform

Error: No available formula for elm-platform
Searching formulae...
Searching taps...
Caskroom/cask/elm-platform

404 error installing from npm

ryan@DevPC-LX:~/stuff$ sudo npm install --global elm
/usr/bin/elm -> /usr/lib/node_modules/elm/bin/elm
/usr/bin/elm-make -> /usr/lib/node_modules/elm/bin/elm-make
/usr/bin/elm-package -> /usr/lib/node_modules/elm/bin/elm-package
/usr/bin/elm-reactor -> /usr/lib/node_modules/elm/bin/elm-reactor
/usr/bin/elm-repl -> /usr/lib/node_modules/elm/bin/elm-repl

> [email protected] postinstall /usr/lib/node_modules/elm
> node lib/install.js

  ✖ https://github.com/kevva/elm-bin/raw/2.0.0/vendor/linux/x64/elm-platform-linux-x64.tar.gz response code is 404 (Not Found)
  ✖ elm pre-build test failed
  ✖ https://github.com/kevva/elm-bin/raw/2.0.0/vendor/linux/x64/elm-platform-linux-x64.tar.gz response code is 404 (Not Found)
  ✖ elm-make pre-build test failed
  ✖ https://github.com/kevva/elm-bin/raw/2.0.0/vendor/linux/x64/elm-platform-linux-x64.tar.gz response code is 404 (Not Found)
  ✖ elm-package pre-build test failed
  ✖ https://github.com/kevva/elm-bin/raw/2.0.0/vendor/linux/x64/elm-platform-linux-x64.tar.gz response code is 404 (Not Found)
  ✖ elm-reactor pre-build test failed
  ✖ https://github.com/kevva/elm-bin/raw/2.0.0/vendor/linux/x64/elm-platform-linux-x64.tar.gz response code is 404 (Not Found)
  ✖ elm-repl pre-build test failed

[email protected] /usr/lib/node_modules/elm
├── [email protected]
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
ryan@DevPC-LX:~/stuff$ 

ELM_HOME not set by npm install -g elm

This causes the symptom that if you do npm install -g elm and then run elm-reactor, it 500s when attempting to fetch resources, with the following message:

A web handler threw an exception. Details:
user error (Unable to find the ELM_HOME environment variable when searching
for the _reactor/debug.js file.

If you installed Elm Platform with the Mac or Windows installer, it looks like
ELM_HOME was not set automatically. Look up how to set environment variables
on your platform and set ELM_HOME to the directory that contains Elm's static
files:

  * On Mac it is /usr/local/share/elm
  * On Windows it is one of the following:
      C:/Program Files/Elm Platform/0.15/share
      C:/Program Files (x86)/Elm Platform/0.15/share

If it seems like a more complex issue, please report it here:
    <https://github.com/elm-lang/elm-platform/issues>
)

After uninstalling the npm version and using the Mac installer, it worked as expected.

Proposal: elm test warning

If you do npm install -g elm-test you'll be able to run elm test and have it work nicely.

However, if you have installed the Elm Platform but have not installed elm-test via npm, you may be surprised to find that running elm test Tests.elm yields an error. The error message won't give you much clue what the problem is, though; it'll just say that it doesn't know how to elm test.

I propose that we improve this user experience by making the elm binary aware of this likely problem. It could have a special-case error message for the case where the user requests elm test but no elm-test binary is found on the PATH. It could say something like:

elm test is not currently installed. To install it, please see these instructions:
    http://elm-lang.org/testing

Tracking installation issues

This is a meta issue to track installation struggles. If you have potentially relevant info, open a separate issue. Do not use comments for this. Opening a separate issue helps us organize things better.

The current state of affairs (as far as we know) is like this:

route OS Version bits status
installer Windows * *
OSX * *
npm * * * kevva/elm-bin#22
debian variants * 32 binary is 64-bit
other linux * * ?
from source * * * cabal hell

Based on website traffic, we can roughly guess that 50% of users are on OSX, 30% are on windows, and 20% are on some flavor of Linux.

Folks with struggles: 20%

Reporting a New Issue

If you are having issues that are not captured by this table, please open a separate issue that states:

  • Your OS with the version number
  • Number of bits
  • Your installation method
  • The error encountered

For example,

  • OS: Ubuntu 13.04
  • bits: 32
  • route: BuildFromSource.hs
  • error: ENOENT not found /usr/lib/elm/vendor/elm-make

If you can flesh out the particulars of the error, we can figure out if that is our-problem and try to fix it in the next release or not-our-problem and try to route you to a fix anyway. If it is our-problem we will add it to this table.

Alleviating Struggles

npm

I have removed the npm installer from the typical install path. It seemed that lots of beginners had a particularly confusing time with ELM_HOME being messed up since a lot of resources say use elm-reactor as the first thing. This is particularly tragic for folks on OSX or Windows who don't have to have problems if they use the official distribution.

Thanks to some changes in elm-reactor no one will need to use ELM_HOME at all in the next release. I also plan to build 32-bit binaries on a Debian variant so we resolve that corner case.

Improving "build from source"

Without npm working, all Linux folks are building from source. This is probably worse than the npm problems. Issue #63 is tracking progress on a potentially more reliable way to build 0.15.1 from source.

Avoid "build from source" more often

I'd be interested to get the breakdown of users within Linux. I have a suspicion that Ubuntu or variations of Debian account for the majority of folks there.

If that is true, my priority would be trying to get npm install -g elm working there without the ELM_HOME issue. I think this is nicer than apt-get install in certain ways.

After that, I am not sure how to take additional steps. I don't know anything about arch or nix or whatever. My goal would be for the Elm Platform to be distributed in the same way that python or gcc or any other typical package is distributed. I don't know what steps I need to take to make that happen.

elm not building.

git [ "clone", "https://github.com/elm-lang/" ++ projectName ++ ".git" ]

has been changed to

git [ "clone", "--depth=1", "https://github.com/elm-lang/" ++ projectName ++ ".git" ]

in src/BuildFromSource.hs and now elm no longer builds:

$ runhaskell BuildFromSource.hs 0.13
Writing a default package environment file to
/usr/local/src/elm-platform/build/Elm-Platform/0.13/cabal.sandbox.config
Creating a new sandbox at /usr/local/src/elm-platform/build/Elm-Platform/0.13
Cloning into 'Elm'...
remote: Counting objects: 128, done.
remote: Compressing objects: 100% (111/111), done.
remote: Total 128 (delta 0), reused 70 (delta 0)
Receiving objects: 100% (128/128), 169.53 KiB | 0 bytes/s, done.
Checking connectivity... done.
error: pathspec '0.13' did not match any file(s) known to git.
Already up-to-date.
[ blah blah blah ]

$ ls */*/bin
aeson-pretty  cheapskate  elm-doc  elm-package  glsl-pprint

$

Deleting --depth=1 builds elm:

$ runhaskell ../src/BuildFromSource.hs 0.13
Writing a default package environment file to
/usr/local/src/elm-platform/junk/Elm-Platform/0.13/cabal.sandbox.config
Creating a new sandbox at /usr/local/src/elm-platform/junk/Elm-Platform/0.13
Cloning into 'Elm'...
remote: Counting objects: 17889, done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 17889 (delta 36), reused 0 (delta 0)
Receiving objects: 100% (17889/17889), 5.47 MiB | 1.27 MiB/s, done.
Resolving deltas: 100% (10149/10149), done.
Checking connectivity... done.
Note: checking out '0.13'.

You are in 'detached HEAD' state. You can look around, make experimental
[ blah blah blah ]

$ ls */*/bin
aeson-pretty  cheapskate  elm  elm-doc    elm-get  elm-reactor  elm-repl  glsl-pprint

$

Elm 0.14 fails to build from source on OS X 10.9

Using the command from the install instructions, on OS X 10.9 with Haskell Platform 2014.2.0.0 installed, cabal fails to find a valid build plan:

$ cabal install -j elm-package-0.2 elm-make-0.1 elm-repl-0.4 elm-reactor-0.2
regex-base-0.93.2 (reinstall) changes: mtl-2.1.3.1 -> 2.2.1
regex-posix-0.95.2 (reinstall)
...
cabal: The following packages are likely to be broken by the reinstalls:
regex-compat-0.95.1
Use --force-reinstalls if you want to install anyway.

Adding a constraint on mtl fixes this (random googling pointed me to @feuerbach suggesting a similar issue in another project could indicate an upstream issue with cabal, but I'm out of my depth regarding the probability of that being the case here). My cabal-version is current:

$ cabal --version
cabal-install version 1.20.0.3
using version 1.20.0.2 of the Cabal library

My relevant global packages, all from Haskell-Platform:

$ ghc-pkg --global list | grep regex
    regex-base-0.93.2
    regex-compat-0.95.1
    regex-posix-0.95.2

Here's my added constraint:

$ cabal install -j elm-package-0.2 elm-make-0.1 elm-repl-0.4 elm-reactor-0.2 --constraint mtl==2.1.3.1

This succeeds with a build plan, but fails later (I am guessing it's due to elm-make not being in the path (yet) but that's a very wild guess)

Linking dist/dist-sandbox-c2357961/build/elm-reactor/elm-reactor ...
Custom build step: compiling debuggerInterface.elm
setup: elm-make: does not exist
Installed elm-package-0.2
Downloading elm-make-0.1...
Downloading elm-repl-0.4...
Configuring elm-repl-0.4...
Configuring elm-make-0.1...
Building elm-repl-0.4...
Building elm-make-0.1...
Installed elm-repl-0.4
Installed elm-make-0.1
cabal: Error: some packages failed to install:
elm-reactor-0.2 failed during the building phase. The exception was:
ExitFailure 1

I think I can tackle that one separately though. Please pardon me if this is the inappropriate repository for reporting the above issue, or if it's actually an issue that's local to my machine (I'm still very new to Elm). Thanks!

npm install -g elm

I don't think this has been captured in an issue yet, but the title says it all!

JS developers would definitely appreciate if the instructions for getting Elm could be as simple as running npm install -g elm - like CoffeeScript does on its homepage.

BuildFromSource.hs should first `cabal update`

I just tried runhaskell BuildFromSource.hs 0.13 on a fresh install and it downloaded repos but didn't actually build anything.

Then I did cabal update and repeated the runhaskell.... and it works.

New thoughts on a Mac PKG installer

Hey Evan. I did the original mac pkg installer, but fell out of touch.

Since then, I've studied the pkg installers (and package management in general on the Mac) and I see a new common practice for programming language installers. Instead of using the Unix FHS and hardcoding paths:

  • All directories go into /usr/local/language-name
  • No hardcoded paths (bin/binary looks for "../etc/config")
  • $PATH is updated by /etc/paths.d/ (a text file called language-name, no extension, with the line /usr/local/language/bin

Additionally, I've created my own system of symlinking with provides multiple versions. Off the top of my head:

  • Language-0.1.1 installer installs to /usr/local/language/0.1.1
  • All binaries are ln -sf to /usr/local/language/bin/
  • All binaries are ln -sf to /usr/local/language/bin as binary-0.1.1

For example, here's the Nimrod postinstall.sh I made:

#!/usr/bin/env bash

NIMROD_DIR=/usr/local/nimrod
VERSION=0.9.4

mkdir -p $NIMROD_DIR/bin
ln -sf $NIMROD_DIR/$VERSION/bin/nimrod  $NIMROD_DIR/bin/nimrod-$VERSION
ln -sf $NIMROD_DIR/$VERSION/bin/nimgrep $NIMROD_DIR/bin/nimgrep-$VERSION
ln -sf $NIMROD_DIR/$VERSION/bin/babel   $NIMROD_DIR/bin/babel-$VERSION
ln -sf $NIMROD_DIR/$VERSION/bin/c2nim   $NIMROD_DIR/bin/c2nim-$VERSION

ln -sf $NIMROD_DIR/$VERSION/bin/babel   $NIMROD_DIR/bin/babel
ln -sf $NIMROD_DIR/$VERSION/bin/c2nim   $NIMROD_DIR/bin/c2nim
ln -sf $NIMROD_DIR/$VERSION/bin/nimrod  $NIMROD_DIR/bin/nimrod
ln -sf $NIMROD_DIR/$VERSION/bin/nimgrep $NIMROD_DIR/bin/nimgrep

This lets multiple version co-exist, all in $PATH, with the last installed version having the shorter, "unqualified" executable name.

Finally, the package installer can offer a sub-package (placed before the "Install 0.1.1" package, unchecked by default) that runs an uninstall script (rm -rf /usr/local/bin/language; rm /etc/paths.d/language):

[ ] Uninstall All Version
[x] Install Language 1.0.2

Assessing the new build route

I want to track what platforms can successfully use the new build route. This is primarily meant for Linux users, but it should work for Mac users as well. Windows people, just use the installer.

OS GHC cabal status
OSX 10.10 7.8.3 1.20.0.1
Ubuntu 14.04 7.6.3 1.20.0.3

Resolution: turns out that a cabal.config file pins down base and it turns out that certain compilers need certain versions of base. So for any given version of GHC, you need a different cabal.config file. I believe this route is doomed given how things currently work.

No licence information in the Windows installer

Hi,
I noticed that the windows installer do not show any license information.
It also do not create any license file.
Not sure if that is deliberate or just a mistake but I suppose it is just an omission.
Note, that for certain institutions using a software with no licensing information might be problematic (or not acceptable) and thus might potentially prevent adoption because of formal reasons (although I am not sure how probable such a situation really is).

Tabs

When doing the "Over 9000" tutorial on conditionals, I discovered that indenting the second line with spaces (or keeping on the same line in the first place) has no problems, but not indenting at all or indenting with tabs return the errors

[1 of 1] Compiling Main                ( Main.elm )
Parse error at (line 2, column 1):
unexpected "e"
expecting newline or spaces

and

[1 of 1] Compiling Main                ( Main.elm )
Parse error at (line 2, column 1):
unexpected "\t"
expecting newline or spaces

respectively.

On an unrelated note, the "'" (apostrophe) gets rendered as "'".

Elm doesn't build due to inconsistent dependencies

With most recent Cabal, updated to full, in a sandbox:

zekka@zekka-yk:~/code/elm$ cabal install elm
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: Elm-0.12.1.3 (user goal)
trying: transformers-0.4.1.0 (dependency of Elm-0.12.1.3)
trying: pandoc-1.12.4.2 (dependency of Elm-0.12.1.3)
next goal: yaml (dependency of pandoc-1.12.4.2)
rejecting: yaml-0.8.8.2 (conflict: transformers==0.4.1.0, yaml =>
transformers>=0.1 && <0.4)
rejecting: yaml-0.8.8.1, 0.8.8, 0.8.7.2, 0.8.7.1, 0.8.7, 0.8.6.2, 0.8.6.1,
0.8.6, 0.8.5.4, 0.8.5.3, 0.8.5.2, 0.8.5.1, 0.8.5, 0.8.4.1, 0.8.4, 0.8.3,
0.8.2.4, 0.8.2.3, 0.8.2.2, 0.8.2.1, 0.8.2, 0.8.1.2, 0.8.1.1, 0.8.1, 0.8.0.2,
0.8.0.1, 0.8.0, 0.7.0.4, 0.7.0.3, 0.7.0.2, 0.7.0.1, 0.7.0, 0.6.1, 0.6.0,
0.5.2, 0.5.1.2, 0.5.1.1, 0.5.1, 0.5.0.1, 0.5.0, 0.4.1.2, 0.4.1.1, 0.4.1,
0.4.0, 0.3.0, 0.2.1, 0.2.0, 0.0.4, 0.0.3, 0.0.2, 0.0.1, 0.0.0 (conflict:
pandoc => yaml>=0.8.8.2 && <0.9)
Backjump limit reached (change with --max-backjumps).

Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.

Update Npm Package

Can we get 0.15 on npm? It has been very hard to install elm on my linux machine. Just installing a somewhat recent version of haskell/cabal on ubuntu is just aweful.

Linux: elm-make expected to be in system $PATH

On Ubuntu, installing the elm-* binaries in someplace like ~/.cabal/bin results in crashes with both elm-repl (evaluating anything, e.g. x = 1) and elm-reactor (opening an .elm file):

elm-make: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

I'm not sure how to read that error; I think it is failing to find elm-make.

The runInteractiveProcess docs/source claim that it looks in the directories specified by $PATH. In the interactive shell I'm running from, elm-make is on $PATH. I assume that something is changing the environment variables in this context, but I don't know what it is. I'm not sufficiently at home in POSIX to suggest a resolution.

Moving the elm-make binary to /usr/local/bin fixes the problem, but that's not really a good solution; at any rate that's not what the Elm docs suggest.

For what it's worth, trying to set the path in ~/.profile rather than ~/.bashrc (as suggested by this StackOverflow answer) doesn't seem to change anything.

Windows installer overwrites system PATH variable

Ran the installer from DropBox (as provided on the Elm mailing list)
Target machine is running Window 7, with UAC turned to minimal and a Windows Domain account with local admin rights.

Platform installed correctly without warnings.

After installation, the system PATH variable was set to "C:\Program Files (x86)\Elm Platform\0.12\bin", rendering most shell/cmdline commands inoperative.

Symantec antivirus installed and running, but set to temporarily disabled.

Installation Failure: Resource Vanished Downloading Zipball

  • OS: Antergos (Arch 4.1.6-1)
  • Bits: 64
  • Path: BuildFromSource
  • Error: see below
  • GHC: 7.10.1
  • Cabal: 1.22.2.0

Trying to install 0.15.1, I make it as far as building elm-reacto-0.3.2 but the process fails with the following:

Linking dist/dist-sandbox-6432d1ce/build/elm-reactor/elm-reactor ...
Failed to build SideBar.elm

Downloading elm-lang/core
failed with 'InternalIOException recv: resource vanished (Connection reset by peer)' when sending request to
    <http://github.com/elm-lang/core/zipball/2.1.0/>

Custom build step: creating and collecting all static resources
cabal: Error: some packages failed to install:
elm-reactor-0.3.2 failed during the building phase. The exception was:
ExitFailure 1

There are also a few warnings while compling backend/Compile.hs, but I imagine they're not relevant.

Unable to install on Linux using npm

$ uname -a
Linux apollo 3.10.0-229.7.2.el7.x86_64 #1 SMP Tue Jun 23 22:06:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ npm --version
1.3.6

$ npm install elm
npm http GET https://registry.npmjs.org/elm
npm http 304 https://registry.npmjs.org/elm
npm http GET https://registry.npmjs.org/logalot
npm http GET https://registry.npmjs.org/async-each-series
... (alot more)

[email protected] postinstall /home/user/node_modules/elm
node lib/install.js

✖ Request to https://github.com/kevva/elm-bin/raw/2.0.0/vendor/linux/x64/elm-platform-linux-x64.tar.gz failed
✖ elm pre-build test failed
✖ Request to https://github.com/kevva/elm-bin/raw/2.0.0/vendor/linux/x64/elm-platform-linux-x64.tar.gz failed
✖ elm-make pre-build test failed
✖ Request to https://github.com/kevva/elm-bin/raw/2.0.0/vendor/linux/x64/elm-platform-linux-x64.tar.gz failed
✖ elm-package pre-build test failed
✖ Request to https://github.com/kevva/elm-bin/raw/2.0.0/vendor/linux/x64/elm-platform-linux-x64.tar.gz failed
✖ elm-reactor pre-build test failed
✖ Request to https://github.com/kevva/elm-bin/raw/2.0.0/vendor/linux/x64/elm-platform-linux-x64.tar.gz failed
✖ elm-repl pre-build test failed

[email protected] node_modules/elm
├── [email protected]
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

I found a similar issue kevva/elm-bin#26, but it is stated that the problem has been fixed.

I have tried to wget this file and it works. I am sitting behind corporate proxy firewall, can this be an issue?

Any help is appreciated.
Thanks!

installation: nixos

I recently installed elm on nixos. Currently on nixos there are a couple of elm related packages available (which I don't quite remember), but not elm-repl or the other stuff that comes with the elm-platform.

A while back I tried the npm install method on nixos, but I had trouble. One issue there, perhaps, is that global npm installation is not possible on nixos, only local. At any rate I don't remember what the problem was, exactly.

This time, I decided to install from source. I initially built version 0.15. However, I had problems with the elm-architecture tutorial project. On the email list it was suggested that elm-architecture requires 0.15.1.

Installing 0.15.1 resulted in package conflicts with ghc 7.8.4 and with 7.10.2, I tried both compiler versions. this was with the "runhaskell BuildFromSource.hs 0.15.1" method. I blew away my ~/.ghc and ~/.cabal directories several times during these attempts, as well as the "0.15.1" directory.

Going back to 7.8.4, I was again able to compile elm 0.15 again. Now my approach will be to find a version of the elm-architecture project that works with 0.15, and just try working with 0.15 for a while.

elm executable flags

The elm command line tool doesn't respond to --help (although it provides help anyway) or --version flags. I found it explaining the command line to a student using Elm.

Elm not installing on MacOSX

Just via cabal, can't speak for the built .pkg:

Panda 福 ~
10010 ◯ : cabal install elm elm-server elm-repl elm-get
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: Elm-0.12.3 (user goal)
trying: yaml-0.8.8.3 (dependency of Elm-0.12.3)
trying: attoparsec-0.12.1.0 (dependency of yaml-0.8.8.3)
trying: parsec-3.1.5/installed-967... (dependency of Elm-0.12.3)
next goal: pandoc (dependency of Elm-0.12.3)
rejecting: pandoc-1.12.4.2, 1.12.4 (conflict: attoparsec==0.12.1.0, pandoc =>
attoparsec>=0.10 && <0.12)
rejecting: pandoc-1.12.3.3, 1.12.3.2, 1.12.3.1, 1.12.3, 1.12.2.1, 1.12.2,
1.12.1, 1.12.0.2, 1.12.0.1, 1.12, 1.11.1, 1.11, 1.10.1, 1.10.0.5, 1.10.0.4,
1.10.0.3, 1.10.0.2, 1.10.0.1, 1.10 (conflict: parsec =>
mtl==2.2.1/installed-4df..., pandoc => mtl>=1.1 && <2.2)
rejecting: pandoc-1.9.4.5, 1.9.4.4, 1.9.4.3, 1.9.4.2, 1.9.4.1, 1.9.4, 1.9.3,
1.9.2, 1.9.1.2, 1.9.1.1, 1.9.1, 1.9.0.5, 1.9.0.4, 1.9.0.3, 1.9.0.2, 1.9,
1.8.2.1, 1.8.2, 1.8.1.2, 1.8.1.1, 1.8.1, 1.8.0.3, 1.8.0.2, 1.8.0.1, 1.8,
1.6.0.1, 1.6, 1.5.1.1, 1.5.1, 1.5.0.1, 1.5, 1.4, 1.3, 1.2.1, 1.2, 1.1,
1.0.0.1, 1.0, 0.46, 0.45, 0.44, 0.43, 0.42, 0.41, 0.4 (conflict: Elm =>
pandoc>=1.10)
Backjump limit reached (change with --max-backjumps).

Anyone got a workaround?

BuildFromSource.hs 0.15 fails

So I am trying to build from source so I can have elm on linux, but having trouble.

cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library 

I've also done my best to reset my environment with

rm -r ~/.cabal ~/.ghc
cabal update

but no dice. Every time I get the following error

Failed to install terminfo-0.4.0.1
Last 10 lines of the build log ( /home/isaac/.cabal/logs/terminfo-0.4.0.1.log
):
checking for unistd.h... yes
checking ncurses.h usability... no
checking ncurses.h presence... no
checking for ncurses.h... no
checking curses.h usability... no
checking curses.h presence... no
checking for curses.h... no
configure: error: in `/tmp/terminfo-0.4.0.1-36426/terminfo-0.4.0.1':
configure: error: curses headers could not be found, so this package cannot be
built
See `config.log' for more details
cabal: Error: some packages failed to install:
elm-repl-0.4 depends on terminfo-0.4.0.1 which failed to install.
haskeline-0.7.2.1 depends on terminfo-0.4.0.1 which failed to install.
terminfo-0.4.0.1 failed during the configure step. The exception was:
ExitFailure 1

any idea what's wrong?

Ubuntu: System.Console.CmdArgs.Implicit, unexpected repeated names: v version

I followed the setup instructions at
https://github.com/elm-lang/elm-lang.org#set-up

however when I try:

me@myleptop:~/somepath/elm-lang.org$ ./dist/build/run-elm-website/run-elm-website

I get a long list of:
elm: System.Console.CmdArgs.Implicit, unexpected repeated names: v version
which ends with:
run-elm-website: build: getDirectoryContents: does not exist (No such file or directory)

Trying to run the hello world example at https://github.com/elm-lang/elm-platform/blob/master/README.md#my-first-project returns the elm: System.Console.CmdArgs.Implicit, unexpected repeated names: v version error too.
I'm on Ubuntu 14.04 LTS.

Any suggestions? Thank you.

Deprecate GHC 7.8 builds for compatibility with next OS X release

Building with GHC 7.8 results in Elm binaries that do not work with the upcoming release of OS X ("El Capitan" - slated for a "fall 2015" release although Apple may announce a formal release date at a press event scheduled for September 9). My coworker has already experienced this; he is running the El Capitan preview and the latest 0.15.1 Elm binaries do not work for him.

Building with GHC 7.10 evidently fixes this, but the fix will not be backported to GHC 7.8.

This repo's README currently says:

Developers typically build with GHC 7.8 but as of 0.15.1 things should build with GHC 7.10 as well.

Considering this will soon result in incompatible OS X binaries, it certainly appears that it will become necessary to mandate building with GHC 7.10 only. Perhaps beginning in the 0.16 release?

Switching to 7.10-only builds should fix elm-lang/elm-package#109

On windows elm-reactor: failed with 'CreateDirectory

full message: failed with 'CreateDirectory "C:\Users\allenwh\AppData\Roaming\elm\package\elm-lang\core\1.1.1": invalid argument (The system cannot find the path specified.)' when sending request to

I tried creating the directories by hand but got: elm-make: CreateDirectory "C:\Users\allenwh\AppData\Roaming\elm\package": invalid argument (Cannot create a file when that file already exists.)

This all worked fine on OSX, but I'm forced to use windows at my work.

Elm not installing on Arch linux

Using the arch-specific directions, installing haskell-elm from the AUR fails in the linking stage after compilation, with the error:

usr/bin/ld: cannot find -lHSunion-find-0.2
/usr/bin/ld: cannot find -lHSconcatenative-1.0.1
collect2: error: ld returned 1 exit status

Cannot build elm-compiler after elm-package was built

I can build the current master versions of elm-compiler and elm-package (and elm-make, elm-repl). After I make some changes in elm-compiler I want to rebuild it.

But when I go back to rebuild elm-compiler, cabal complains that elm-package is broken:

> cabal sandbox init --sandbox=.
> cd elm-compiler
> cabal sandbox init --sandbox=..
> cabal install -j
> cd ../elm-package
> cabal sandbox init --sandbox=..
> cabal install -j
> cd ../elm-compiler
> cabal install -j


Resolving dependencies...
cabal: Could not resolve dependencies:
trying: elm-compiler-0.15 (user goal)
next goal: elm-package (user goal)
rejecting: elm-package-0.5/installed-9a4... (package is broken)
[...]
Dependency tree exhaustively searched.

Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.

I am no cabal expert, so I have no clue how to fix it.
I can only workaround by deleting all build artifacts and build from scratch.

It worked in 0.14.1.

Elm-make failing on OSX using Elm-Platform-0.15.pkg

Installed Elm from Elm-Platform-0.15.pkg on OSX 10.10.2.

When attempting to build,

HelloWorld.elm
main = plainText "Hello World!"

with elm-make HelloWorld.elm --output HelloWorld.html

I'm getting,

No versions of package 'elm-lang/core' were found!
Is it spelled correctly?

Elm-repl, and elm-package also fail with the same error message.

Additional notes: using ghc 7.10.1 and cabal 1.22.0.0 (https://ghcformacosx.github.io/) as Haskell Platform for osx 10.10 seems to be nearly unusable.

Elm not installing on Windows 7. Error Code: 80070002

I just downloaded the Elm installer and tried to install it.

When I did so, the following error messages came up (in this order):

elm error message
elm error message 02

It then said Elm had successfully installed. But there's no shortcuts on desktop or any folder or icons in my start menu. There is a folder in my Program Files (x86) that contains a folder called Elm Platform, but the only thing I could get to open on that was elm-reactor and it wouldn't let me type anything.

Fix elm-doc

cd installers/mac; ./make-installer.sh master fails:

Installed elm-repl-0.4.1
Updating documentation index /Users/thsoft/Library/Haskell/doc/index.html
cp: Elm-Platform/master/bin/elm-doc: No such file or directory

Versions:

  • OS X 10.10.3
  • ghc 7.10.1
  • elm-platform 5134bbb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.