elm-lang / elm-reactor

Interactive development tool that makes it easy to develop and debug Elm programs.
BSD 3-Clause "New" or "Revised" License
428 stars 63 forks source link

Change watch extension from 'elm' to '.elm' #170

Closed fourcube closed 8 years ago

fourcube commented 8 years ago

For me, this fixed the problem of automatic hot-swap not working on Linux (Ubuntu 15.04).

Unfortunately, this does not fix hot-swap on MacOS (10.11). I was able to verify that this triggers sendHotSwap, but no data arrives through the WebSocket inside the browser.

See the 'hot-reload not working' part of #168.

pgaertig commented 8 years ago

@fourcube thanks for this PR! You have just saved a few linuxers from ditching Elm. This may help anyone struggling with the same issue on Linux:

  1. Prepare to build Elm from sources.
  2. Change makeRepo in BuildFromSource.hs this way:

    makeRepo root projectName version =
     do  -- get the right version of the repo
       if projectName == "elm-reactor"
         then git [ "clone", "https://github.com/fourcube/" ++ projectName ++ ".git" ]
         else git [ "clone", "https://github.com/elm-lang/" ++ projectName ++ ".git" ]
       setCurrentDirectory projectName
       git [ "checkout", version, "--quiet" ]
  3. runhaskell BuildFromSource master
  4. Freshly fixed elm-reactor is ready at /Elm-Platform/master/elm-reactor/dist/dist-sandbox-8e8030c8/build/elm-reactor/elm-reactor.

@evancz @fourcube 's PR is very trivial but practically fixes elm-reactor for Linux users. What it the problem to merge it into master, or even releasing 0.16.1?

rassie commented 8 years ago

@pgaertig In my limited testing (YMMV), hot-swapping works with this patch, but something else is broken -- e.g. the clock example stops working, i.e. the hands stop moving after hot-swapping.

rassie commented 8 years ago

Have to correct myself: seems this PR is obsolete since ab0d2cde35b9e2fcb54e24c47c55d6a6c55b244a where the missing dot has been added. Will have to test whether elm-reactor is now working in master.

@fourcube Care to close this PR to reduce confusion?

fourcube commented 8 years ago

@rassie sure, closing it right now.