You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No errors shown in the editor when passing from a case of to a function with the wrong type. It doesn't matter if it is with <| pipe or with parentheses. If you look in the Output log you will get the Received an invalid json, skipping error. warning. With parentheses at least you get an error by the language server, but still none from elm make.
Expected Behavior
Showing the error which is provided by elm make.
Current Behavior
The errors are not shown and instead in the Output log of the extension is the warning Received an invalid json, skipping error. written 3 times directly after the elm make command. Also the language server itself seems to not detect the type mismatch.
Possible Solution
As i found out after sending this issue, the problem came from the missing elm-test tool. After installing it, the log entry and the missing errors got visible.
Steps to Reproduce (for bugs)
Open Visual Studio Code create a new module with following text in a new elm project:
moduleTestexposing (..)
type Tree=Treetree:Treetree =Treenode:String->Treenode _ =Debug.todo "node"combine:Tree->Treecombine value =-- If you change <| to parentheses the "Received an invalid json, skipping error."-- is still there, but now the tree gets a red squiggle
node <|case value ofTree->
tree
After saving there are no red squiggles, but the code is not compiling.
The output from elm make for the example is:
{
"type": "compile-errors",
"errors": [
{
"path": "D:\\temp\\elm\\test-project\\src\\Test.elm",
"name": "Test",
"problems": [
{
"title": "TYPE MISMATCH",
"region": {
"start": {
"line": 21,
"column": 9
},
"end": {
"line": 23,
"column": 21
}
},
"message": [
"I cannot send this through the (<|) pipe:\n\n20| node <|\r\n21|",
{
"bold": false,
"underline": false,
"color": "RED",
"string": ">"
},
" case value of\r\n22|",
{
"bold": false,
"underline": false,
"color": "RED",
"string": ">"
},
" Tree ->\r\n23|",
{
"bold": false,
"underline": false,
"color": "RED",
"string": ">"
},
" tree\r\n\nThe argument is:\n\n",
{
"bold": false,
"underline": false,
"color": "yellow",
"string": "Tree"
},
"\n\nBut (<|) is piping it to a function that expects:\n\n",
{
"bold": false,
"underline": false,
"color": "yellow",
"string": "String"
},
""
]
}
]
}
]
}
Context
I was refactoring some code where i replaced a simple String with a specific type like a Tree. I noticed, that my code was not compiling, but in Visual Studio Code were no red squiggles. I looked in the Output log of the extension and noticed three Received an invalid json, skipping error..
Submitted the issue too early. It looks like the warning is generated by the output of the missing elm-test. If i install it, the errors from elm make are shown and the warnings are gone. I didn't noticed that elm-test is missing, because i thought it is getting installed by the elm-tooling.json anyway, but this is not the case and not supported. Was also not expecting that a missing elm-test will hide the errors from elm make and was not thinking that far.
No errors shown in the editor when passing from a
case of
to a function with the wrong type. It doesn't matter if it is with <| pipe or with parentheses. If you look in theOutput
log you will get theReceived an invalid json, skipping error.
warning. With parentheses at least you get an error by the language server, but still none fromelm make
.Expected Behavior
Showing the error which is provided by
elm make
.Current Behavior
The errors are not shown and instead in the
Output
log of the extension is the warningReceived an invalid json, skipping error.
written 3 times directly after theelm make
command. Also the language server itself seems to not detect the type mismatch.Possible Solution
As i found out after sending this issue, the problem came from the missing
elm-test
tool. After installing it, the log entry and the missing errors got visible.Steps to Reproduce (for bugs)
The output from elm make for the example is:
Context
I was refactoring some code where i replaced a simple
String
with a specific type like aTree
. I noticed, that my code was not compiling, but in Visual Studio Code were no red squiggles. I looked in theOutput
log of the extension and noticed threeReceived an invalid json, skipping error.
.Your Environment
The text was updated successfully, but these errors were encountered: