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.

Writes random jumble on save when an error exists

See original GitHub issue

Describe the bug Sometimes, when saving, the lsp writes seemingly random stuff where there is an error, The text is written before the lsp recognises that the error is fixed, so it creates and error and writes again.

To Reproduce Steps to reproduce the behavior: Have an error, spam save, (works on my end)

            <button class="btn-icon delete">
              <Icon data="{icons.trash}" />
            </button>

turns into

            <button class="btn-icon delete">
              <Icon data="{icons.rashtrrrrrr}" />
            </button>

Expected behavior Not writing anything and/or waiting to complete analysis before doing so

Screenshots example 1 example 2

After a few saves, the example 2 turns into example 3

before saving example before saving after saving example after saving

System (please complete the following information):

  • OS: Linux (5.11.16-arch1-1)
  • IDE: VSCode
  • Plugin/Package: “Svelte for VSCode” - v104.10.2

Additional context The only way to work around this issue is to kill the lsp, write and save before it completly starts, and then it works fine until the bugs appears again.

I don’t really understand how this works. With logging to verbose, the extension logs

[Trace - 10:12:53] Sending request 'textDocument/codeAction - (959)'.
Params: {
    "textDocument": {
        "uri": "file:///home/karitham/Projects/STM/Front/src/components/Table/Table.svelte"
    },
    "range": {
        "start": {
            "line": 79,
            "character": 44
        },
        "end": {
            "line": 79,
            "character": 44
        }
    },
    "context": {
        "diagnostics": []
    }
}

for the example 1 (the first picture)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
dummdidummcommented, Apr 27, 2021

I can reproduce this now given your complete file, thanks. I’ll investigate.

1reaction
Karithamcommented, Apr 27, 2021

Yep, haven’t had any issue since installing the new version, thanks a lot for the cybernetically enhanced reactivity

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is this C code giving me a bus error? - Stack Overflow
Randomly pick a word, jumble it and try to guess it. I know how to do all of that. So anyway, each line...
Read more >
CIS 201 Test 4 Flashcards - Quizlet
When using the open function to open a file for output (i.e., using 'w' as the mode string), if the file does not...
Read more >
Bugs in PHYLIP, known or recently fixed
Treedist was giving wrong answers when asked to compute all distances between trees in two files that had unequal numbers of trees. This...
Read more >
sql server - What is the best way to get a random ordering?
ORDER BY NEWID() will sort the records randomly. An example here. SELECT * FROM Northwind..Orders ORDER BY NEWID().
Read more >
shuffle - Manual - PHP
Description ¶ This function shuffles (randomizes the order of the elements in) an array. This function does not generate cryptographically secure values, and ......
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