Skip to content

Incremental caching support for large codebases#125

Open
karoisuzvards wants to merge 13 commits intocucumber:mainfrom
karoisuzvards:incremental-cache
Open

Incremental caching support for large codebases#125
karoisuzvards wants to merge 13 commits intocucumber:mainfrom
karoisuzvards:incremental-cache

Conversation

@karoisuzvards
Copy link

@karoisuzvards karoisuzvards commented Feb 25, 2026

🤔 What's changed?

Implement incremental caching support - when file is saved - incremental change is calculated instead of doing full reindex

⚡️ What's your motivation?

cucumber/vscode#152

Current Cucumber VScode plugin syncs in a loop when large codebase is present

🏷️ What kind of change is this?

  • 💥 Breaking change (incompatible changes to the API)

Based on changes in cucumber/language-service#285 - use the new API that returns Map instead of Array so only changed parts should be recalculated instead of full reindex

♻️ Anything particular you want feedback on?

Typescript is not my daily "bread and butter" language so feel free to suggest improvements :)

Maybe it would make sense to move forward with new class and to add new method for retrieving parameterLinks and friends there to avoid utility methods?

private getExpressionsFromLinks(): readonly CucumberExpressions.Expression[] 

private getLocationLinksFromLinks(): readonly LocationLink[] 

private getNewExpressionsFromLinks(): readonly CucumberExpressions.Expression[] 

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

Related:

cucumber/language-service#285
cucumber/vscode#304


This text was originally generated from a template, then edited by hand. You can modify the template here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant