question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error not cleared when file is saved

See original GitHub issue

I 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.

image

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)

  1. Install extension
  2. Copy above code into editor
  3. Change line 49 to button [ onClick Incrementx ] [ text "+" ]
  4. Save the file
  5. Revert line 49 to button [ onClick Increment ] [ text "+" ]
  6. 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:closed
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
razzeeecommented, Nov 7, 2020

This should be fixed with the version from yesterday.

1reaction
mattxocommented, Oct 28, 2020

It’ll be a bit of a learning curve for me (never messed with VSCode extensions before) but I’ll have a look 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

4 Ways to Solve the Cannot Delete Files Error
Possible reasons that the "can not delete file" problem occurs · Method 1: Force to Delete a File · Method 2: Delete Files/Folders...
Read more >
Errors are not cleared on file save and sometimes fixed errors ...
Expected behaviour. Fixed errors disappear after file save and they don't come back after unrelated code changes. Actual behaviour.
Read more >
How to troubleshoot errors when you save Excel workbooks
Possible reasons why documents don't save · 3rd-party add-ins · Permissions · Document not saved · Disk space · Antivirus software · File...
Read more >
[Solved] Microsoft Excel File Error 'The document cannot be ...
Facing Microsoft Excel File Error 'The document cannot be saved' , Read this blog and get the problem solved. Step by Step Guide!...
Read more >
Fix Deleting Files Does Not Free Up Space Error in Windows ...
So how to fix the file deleted, but space not released in Windows 10 ... You may save the backup to a local...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found