vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Reindexing schedules on every "Go to Definition"

Open josemigallas opened this issue 1 year ago • 6 comments
trafficstars

👓 What did you see?

Every time I "go to definition" of a step, a reindexing is scheduled which completely blocks VS code features, making it unusable.

✅ What did you expect to see?

Reindexing should happen when a step definition file changes, or on window reload or on demand. For larger projects I would prefer the indexation happening once when the editor starts and it can be reindexed manually with "Reload window".

📦 Which tool/library version are you using?

Visual Studio Code: 1.85.2
[email protected]
[email protected]

🔬 How could we reproduce it?

Open output channel for "Cucumber Language Server" Right-click over a feature step and select "Go to Definition", alternatively click the step while pressing down cmd key.

cucumber

josemigallas avatar Feb 07 '24 09:02 josemigallas

Thanks for the report @josemigallas!

Could you advise:

  1. In the attached gif, are you holding the command key and just hovering over the lines? Or also clicking?
  2. The reindexing is scheduled via the Language Server on file changes, are there any other extensions you are using or extensions that may be triggering file saves or formatting while carrying out this action?
    // The content of a text document has changed. This event is emitted
    // when the text document is first opened or when its content has changed.
    documents.onDidChangeContent(async (change) => {
      this.scheduleReindexing()
      if (change.document.uri.match(/\.feature$/)) {
        await this.sendDiagnostics(change.document)
      }
    })

kieran-ryan avatar Feb 10 '24 19:02 kieran-ryan

  1. In the attached gif, are you holding the command key and just hovering over the lines? Or also clicking?

Holding the command key while hovering.

  1. The reindexing is scheduled via the Language Server on file changes, are there any other extensions you are using or extensions that may be triggering file saves or formatting while carrying out this action?

I don't think so but here's the list just in case:

bierner.emojisense
bierner.github-markdown-preview
bierner.markdown-checkbox
bierner.markdown-emoji
bierner.markdown-footnotes
bierner.markdown-mermaid
bierner.markdown-preview-github-styles
bierner.markdown-yaml-preamble
castwide.solargraph
codezombiech.gitignore
CucumberOpen.cucumber-official
dbaeumer.vscode-eslint
denoland.vscode-deno
donjayamanne.githistory
eamodio.gitlens
elia.erb-formatter
fabiospampinato.vscode-open-in-github
firsttris.vscode-jest-runner
formulahendry.auto-close-tag
formulahendry.auto-rename-tag
hbenl.vscode-test-explorer
janisdd.vscode-edit-csv
kaiwood.endwise
LinusU.auto-dark-mode
LoranKloeze.ruby-rubocop-revived
ms-vscode.test-adapter-converter
ms-vsliveshare.vsliveshare
ms-vsliveshare.vsliveshare-pack
RobbOwen.synthwave-vscode
seatonjiang.gitmoji-vscode
shd101wyy.markdown-preview-enhanced
Shopify.ruby-lsp
sianglim.slim
sibiraj-s.vscode-scss-formatter
sissel.shopify-liquid
stevejpurves.cucumber
streetsidesoftware.code-spell-checker
stylelint.vscode-stylelint
SUPERTSY5.line-length-checker-vscode
Tyriar.lorem-ipsum
wix.vscode-import-cost

josemigallas avatar Feb 13 '24 08:02 josemigallas

Thanks for detail @josemigallas - genuine bug!

Reason I could not initially reproduce, is once you click 'Go to Definition' and repeat the behaviour, it no longer continuously reindexes.

https://github.com/cucumber/vscode/assets/5904340/4652d4ee-902c-4dac-b880-582655d73924

We will at least need to reassess the event triggering the reindexing in the Cucumber Language Server to understand whether we can eliminate unnecessary reindexing calls. Feel free to take a look at the code as well in case you spot a fix - all inputs welcome.

Thanks again!

kieran-ryan avatar Feb 27 '24 21:02 kieran-ryan

My pleasure!

josemigallas avatar Mar 04 '24 08:03 josemigallas

Any update on this issue please? I have the same issue and reindexing takes about 45 seconds in my project, so it really would help a lot of this issue could be fixed. Thanks

Am using VSCode version 1.93, Cucumber 1.10, Cucumber with TypeScript, disabled all other extensions

GameDevMarco avatar Oct 03 '24 13:10 GameDevMarco

Any update on this issue please? I have the same issue and reindexing takes about 45 seconds in my project, so it really would help a lot of this issue could be fixed. Thanks Am using VSCode version 1.93, Cucumber 1.10, Cucumber with TypeScript, disabled all other extensions

Meanwhile this bug is fixed, I am using Cucumber (Gherkin) Full Support: https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete

It has its own issues but it may work better for you.

josemigallas avatar Oct 11 '24 07:10 josemigallas