Error not cleared when file is saved
See original GitHub issueI installed the extension (v1.5.2), copied and pasted this into Main.elm
module Main exposing (..)
-- Press buttons to increment and decrement a counter.
--
-- Read how it works:
-- https://guide.elm-lang.org/architecture/buttons.html
--
import Browser
import Html exposing (Html, button, div, text)
import Html.Events exposing (onClick)
import Html.Attributes exposing (..)
-- MAIN
main : Program () Model Msg
main = Browser.sandbox { init = init, update = update, view = view }
-- MODEL
type alias Model = Int
init : Model
init =
0
-- UPDATE
type Msg
= Increment
| Decrement
update : Msg -> Model -> Model
update msg model =
case msg of
Increment ->
model + 1
Decrement ->
model - 1
-- VIEW
view : Model -> Html Msg
view model =
div []
[ button [ class "red", onClick Decrement ] [ text "-" ]
, div [] [ text (String.fromInt model) ]
, button [ onClick Increment ] [ text "+" ]
]
into VSCode, then changed button [ onClick Increment ] [ text "+" ]
to button [ onClick Incrementx ] [ text "+" ]
to induce an error, which works as expected. However, changing the line back and saving still leaves the line underlined in red and the old error message still in the Problems tab of VSCode.
Expected Behavior
The error message should disappear.
Current Behavior
The error message does not disappear.
I tested this with elm-spa-example-master
as well but couldn’t replicate the error.
Steps to Reproduce (for bugs)
- Install extension
- Copy above code into editor
- Change line 49 to
button [ onClick Incrementx ] [ text "+" ]
- Save the file
- Revert line 49 to
button [ onClick Increment ] [ text "+" ]
- Save the file
Context
I’m starting a new job and ELM is part of the stack. Hard to learn the language when the IDE is telling me lies!
Your Environment
-
Version used: elmtooling.elm-ls-vscode 1.5.2
-
Editor name and version (e.g. VSCode 1.36.1): Version: 1.50.1 (user setup) Commit: d2e414d9e4239a252d1ab117bd7067f125afd80a Date: 2020-10-13T15:06:15.712Z Electron: 9.2.1 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Windows_NT x64 10.0.18363
-
Environment name and version (e.g. node.js 5.4): As above
-
Operating System and version: As above
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (5 by maintainers)
Top GitHub Comments
This should be fixed with the version from yesterday.
It’ll be a bit of a learning curve for me (never messed with VSCode extensions before) but I’ll have a look 😃