Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reindexing schedules on every "Go to Definition" #215

Open
josemigallas opened this issue Feb 7, 2024 · 6 comments
Open

Reindexing schedules on every "Go to Definition" #215

josemigallas opened this issue Feb 7, 2024 · 6 comments
Labels
πŸ› bug Defect / Bug

Comments

@josemigallas
Copy link

josemigallas commented Feb 7, 2024

πŸ‘“ 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

@kieran-ryan kieran-ryan added the 🍼 incomplete Blocked until more information is provided label Feb 10, 2024
@kieran-ryan
Copy link
Member

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)
      }
    })

@josemigallas
Copy link
Author

  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

@kieran-ryan kieran-ryan added πŸ› bug Defect / Bug and removed 🍼 incomplete Blocked until more information is provided labels Feb 27, 2024
@kieran-ryan
Copy link
Member

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.

reindexing.mov

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 kieran-ryan changed the title Reindexing scheduled on every "Go to Definition" Schedules reindexing on every "Go to Definition" Feb 27, 2024
@josemigallas
Copy link
Author

My pleasure!

@kieran-ryan kieran-ryan changed the title Schedules reindexing on every "Go to Definition" Reindexing schedules on every "Go to Definition" Jul 15, 2024
@GameDevMarco
Copy link

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

@josemigallas
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
πŸ› bug Defect / Bug
Projects
None yet
Development

No branches or pull requests

3 participants