p4lang / p4analyzer

A Language Server Protocol (LSP) compliant analyzer for the P4 language
Apache License 2.0
19 stars 3 forks source link

Fix broken `main` #32

Closed timjroberts closed 1 year ago

timjroberts commented 1 year ago

This PR fixes the break that has been introduced into main from the merging of #20 and #24.

I forgot to rebase my branch (via #24) and GitHub showed no conflicts. However, some of the code in #20 became broken because I refactored await some of the dependent API. This PR fixes that.

The main change is that Workspaces can no longer close the underlying channel used to schedule background loading. Instead this is all now achieved through a custom trait. To close the underlying channel used by the background loader, I've implemented Drop for State instead and closed the channel when State is dropped.