Skip to content
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

Color coded compile msgs doesn't work when IDE does not support colored console #269

Closed
mordrax opened this issue Sep 3, 2018 · 2 comments

Comments

@mordrax
Copy link

mordrax commented Sep 3, 2018

When getting the following type mismatch with Webstorm ( which does not highlight console outputs )

This function cannot handle the argument sent through the (|>) pipe:

59|             model
60|                 |> List.filter (\n -> n.privacyFlag /= Types.Api.Enums.FlagYes && n.priority /= Types.Api.Enums.FlagYes)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The argument is:

    List Note

But (|>) is piping it a function that expects:

    List { fields : String
        , fields : Int
        , fields : Enums.MainRefType
        , fields : String
        , fields : String
        , fields : String
        , fields : String
        , fields : Enums.BitFlag
        , fields : Maybe Date
        , fields : Maybe Date
        , fields : String
        , fields : String
        , privacyFlag : Enums.Flag                  -- this one is yellow in the terminal but not in the editor
        , fields : String
        , fields : String
        , fields : Maybe DateTime
        , fields : Enums.Flag
        , fields : String
        , fields : DateTime
        , fields : String
        , fields : Maybe DateTime
        , fields : Float
    }

0.18 was better in pointing out the fields which the compiler had problems with using text. 0.19 only works if the console being used supports color.

@norpan
Copy link

norpan commented Sep 3, 2018

Herr is what I did in vscode: elm-tooling/vscode-elm-old#251

@evancz
Copy link
Member

evancz commented Sep 6, 2018

If the editor author uses --report=json they can get the color information and display it however is necessary. An example of that lives at https://package.elm-lang.org/packages/elm/project-metadata-utils/latest/

Please inform the relevant editor plugin author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants