Skip to content

Commit

Permalink
fix: do not purge the code action cache in language server before the…
Browse files Browse the repository at this point in the history
… action is resolved by the client [IDE-134] (#5062)

This version provides a fix for code action handling in language server. Resolvable Code Actions are working in a two-step modus in language server: First, the action is created with a callback function stored in language server. The second step is the code action resolution. When a client calls language server with the codeaction/resolve request, the stored callback function is looked up in the cache and executed.

Previously, this cache was purged on each code action request call. This is not working well, if code action information is retained by the IDE. Therefore, the cache entry for the callback function is now only purged when the action is resolved.
  • Loading branch information
bastiandoetsch committed Feb 21, 2024
1 parent cc7545b commit 4bf4333
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cliv2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/snyk/go-application-framework v0.0.0-20240111143643-fa847b8a9a3b
github.com/snyk/go-httpauth v0.0.0-20231117135515-eb445fea7530
github.com/snyk/snyk-iac-capture v0.6.5
github.com/snyk/snyk-ls v0.0.0-20240212152311-5c619762aff6
github.com/snyk/snyk-ls v0.0.0-20240221091704-22d907524170
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
Expand Down
4 changes: 2 additions & 2 deletions cliv2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,8 @@ github.com/snyk/policy-engine v0.22.0 h1:od9pduGrXyfWO791X+8M1qmnvWUxaIXh0gBzGKq
github.com/snyk/policy-engine v0.22.0/go.mod h1:Vvy/9VMXoABS3JlLqhTlAPWkB5LgbLh7LGn3gBwAqdY=
github.com/snyk/snyk-iac-capture v0.6.5 h1:992DXCAJSN97KtUh8T5ndaWwd/6ZCal2bDkRXqM1u/E=
github.com/snyk/snyk-iac-capture v0.6.5/go.mod h1:e47i55EmM0F69ZxyFHC4sCi7vyaJW6DLoaamJJCzWGk=
github.com/snyk/snyk-ls v0.0.0-20240212152311-5c619762aff6 h1:8kfK8OfLw+NOUGmuRxSbAJnE4+Yfp10wo9iWIUfnHkw=
github.com/snyk/snyk-ls v0.0.0-20240212152311-5c619762aff6/go.mod h1:seSz3zGy2NPbSdNq6zq4NFnD2gPteeMDnpLpzfi3qTU=
github.com/snyk/snyk-ls v0.0.0-20240221091704-22d907524170 h1:8E+HKO1n5Wi0xai4n7zJUcyLp3t1IoeDZWOjuwE8wM8=
github.com/snyk/snyk-ls v0.0.0-20240221091704-22d907524170/go.mod h1:seSz3zGy2NPbSdNq6zq4NFnD2gPteeMDnpLpzfi3qTU=
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
github.com/sourcegraph/go-lsp v0.0.0-20200429204803-219e11d77f5d h1:afLbh+ltiygTOB37ymZVwKlJwWZn+86syPTbrrOAydY=
Expand Down

0 comments on commit 4bf4333

Please sign in to comment.