rundis / elm-light

Elm language plugin for Light Table
https://rundis.gitbooks.io/elm-light-guide/content/
MIT License
133 stars 10 forks source link

Support Elm 0.16 #4

Closed ccapndave closed 9 years ago

ccapndave commented 9 years ago

Elm 0.16 now has some color codes in the results from the compiler which either need to be stripped out or (even better!) colored in inline.

Here is an example of some 0.16 output with the current version of the plugin:

The type annotation for `update` does not match its definition.
The type annotation is saying:

    Action
    -> { ..., username : ... }
    -> ( { ..., username : ... }, Effects.Effects a )

But I am inferring that the definition has this type:

    Action
    -> { a | ..., usernames : ... }
    -> ( { a | ..., usernames : ... }, Effects.Effects b )

Hint: I compared the record fields and found some potential typos.

    username <-> usernames
rundis commented 9 years ago

Should be fixed in 0.1.2 just out. Opted for the simple stripping out approach for now. Couldn't find an easy route to replicate the colouring on the command-line in LT using the primitives available.

ccapndave commented 9 years ago

I just updated through Lighttable plugin manager, but am getting this error. I am totally new to Lighttable btw, so apologies if this is my fault for updating incorrectly:

ReferenceError: React is not defined
    at component (/Users/dave/Library/Application%20Support/LightTable/plugins/elm_light/elm-light_compiled.js:81:75)
    at eval (/Users/dave/Library/Application%20Support/LightTable/plugins/elm_light/elm-light_compiled.js:8664:68)
    at eval (native)
    at c (file:///Applications/LightTable.app/Contents/Resources/app/core/node_modules/lighttable/bootstrap.js:21542:41)
    at a (file:///Applications/LightTable.app/Contents/Resources/app/core/node_modules/lighttable/bootstrap.js:21550:18)
    at Function.lt.objs.plugins.__BEH__load_js (file:///Applications/LightTable.app/Contents/Resources/app/core/node_modules/lighttable/bootstrap.js:30076:33)
    at c (file:///Applications/LightTable.app/Contents/Resources/app/core/node_modules/lighttable/bootstrap.js:6196:14)
    at a (file:///Applications/LightTable.app/Contents/Resources/app/core/node_modules/lighttable/bootstrap.js:6236:18)
    at c (file:///Applications/LightTable.app/Contents/Resources/app/core/node_modules/lighttable/bootstrap.js:20443:76)
    at a (file:///Applications/LightTable.app/Contents/Resources/app/core/node_modules/lighttable/bootstrap.js:20477:18)
rundis commented 9 years ago

DOH !

My bad, forgot to include react.js (worked on my machine because I have another plugin that already loads react). I've published a bugfix release 0.1.3.

ccapndave commented 9 years ago

Yay, it works perfectly. Thanks!