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

Log warnings as WARN #9

Open
francisdb opened this issue Nov 21, 2016 · 0 comments
Open

Log warnings as WARN #9

francisdb opened this issue Nov 21, 2016 · 0 comments

Comments

@francisdb
Copy link
Contributor

It's quite overwhelming to see a huge amount of error output
Since errors are separated from warnings we could try to parse the output and log them at the appropriate levels.

Strange that the warning block appears in between other errors

[error] (testerElm/web-assets:elmMake) Failed to parse `elm` output. This is the original `elm` output:
[error] -- TYPE MISMATCH - /Users/francisdbtester-elm/app/assets/elm/RestClient.elm
[error]
[error] The definition of `postMessage` does not match its type annotation.
[error]
[error] 21| postMessage : String -> String -> Task Error String
[error] 22| postMessage domain message =
[error] 23|>    let
[error] 24|>        request =
[error] 25|>            Http.post (postUrl domain) (Http.stringBody "application/json" message) string
[error] 26|>    in
[error] 27|>        Http.send request
[error]
[error] The type annotation for `postMessage` says it always returns:
[error]
[error]     Task Error String
[error]
[error] But the returned value (shown above) is a:
[error]
[error]     Request a -> Cmd (Http.Internal.Request String)
[error]
[error] Hint: It looks like a function needs 1 more argument.
[error]
[error] -- TYPE MISMATCH - /Users/francisdbtester-elm/app/assets/elm/RestClient.elm
[error]
[error] The argument to function `send` is causing a mismatch.
[error]
[error] 27|         Http.send request
[error]                       ^^^^^^^
[error] Function `send` is expecting the argument to be:
[error]
[error]     Result Error a -> Http.Internal.Request String
[error]
[error] But it is:
[error]
[error]     Request String
[error]
[error] Hint: It looks like a function needs 1 more argument.
[error]
[error] =================================== WARNINGS ===================================
[error]
[error] -- missing type annotation - /Users/francisdbtester-elm/app/assets/elm/Model.elm
[error]
[error] Top-level value `defaultCommand` does not have a type annotation.
[error]
[error] 35| defaultCommand =
[error]     ^^^^^^^^^^^^^^
[error] I inferred the type annotation so you can copy it into your code:
[error]
[error] defaultCommand : Value
[error]
[error] -- missing type annotation - /Users/francisdbtester-elm/app/assets/elm/Model.elm
[error]
[error] Top-level value `defaultCommandInput` does not have a type annotation.
[error]
[error] 41| defaultCommandInput =
[error]     ^^^^^^^^^^^^^^^^^^^
[error] I inferred the type annotation so you can copy it into your code:
[error]
[error] defaultCommandInput : String
[error]
[error] -- missing type annotation - /Users/francisdbtester-elm/app/assets/elm/Model.elm
[error]
[error] Top-level value `defaultEvent` does not have a type annotation.
[error]
[error] 24| defaultEvent =
[error]     ^^^^^^^^^^^^
[error] I inferred the type annotation so you can copy it into your code:
[error]
[error] defaultEvent : Value
[error]
[error] -- missing type annotation - /Users/francisdbtester-elm/app/assets/elm/Model.elm
[error]
[error] Top-level value `defaultEventInput` does not have a type annotation.
[error]
[error] 31| defaultEventInput =
[error]     ^^^^^^^^^^^^^^^^^
[error] I inferred the type annotation so you can copy it into your code:
[error]
[error] defaultEventInput : String
[error]
[error] -- missing type annotation - /Users/francisdbtester-elm/app/assets/elm/Model.elm
[error]
[error] Top-level value `defaultResource` does not have a type annotation.
[error]
[error] 20| defaultResource =
[error]     ^^^^^^^^^^^^^^^
[error] I inferred the type annotation so you can copy it into your code:
[error]
[error] defaultResource : String
[error]
[error] -- missing type annotation - /Users/francisdbtester-elm/app/assets/elm/Model.elm
[error]
[error] Top-level value `defaultModel` does not have a type annotation.
[error]
[error] 50| defaultModel =
[error]     ^^^^^^^^^^^^
[error] I inferred the type annotation so you can copy it into your code:
[error]
[error] defaultModel : Model
[error]
[error] ==================================== ERRORS ====================================
[error]
[error] -- NAMING ERROR - /Users/francisdbtester-elm/app/assets/elm/Main.elm
[error]
[error] Cannot find variable `parseQuery`
[error]
[error] 41|             parseQuery queryString
[error]                 ^^^^^^^^^^
[error]
[error]
[error] Detected errors in 2 modules.
[error] Total time: 1 s, completed Nov 21, 2016 10:29:18 PM
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

1 participant