lsp-test: add setIgnoringProgressNotifications
Based on discussion on matrix: https://matrix.to/#/!caZLxGrrbiQktNWBbz:matrix.org/$UdbEDn7KYgUdGHo4rVHUeoGjtRBpm0q0XlRBBzpXTYg?via=matrix.org&via=envs.net&via=maralorn.de
Did this achieve what you wanted in the tests?
Not sure yet. I have a PR in hls repo with upgrade of hls to master version of lsp: https://github.com/haskell/haskell-language-server/pull/4166 I have a PR in my fork which uses this PR branch: https://github.com/jhrcek/haskell-language-server/pull/8
Both have test failures, but I didn't have time yet to look into those. Will check them later this week.
I'll probably just revert to your idea of rebasing the lsp PR on some commit before the metamodel update to make it easier for myself.
It would be nice to know since I'll probably release the packages soon so that HLS can adapt to the changes you helpfully fixed :)
@michaelpj Give me one more day. I'll try to fix up test failures in https://github.com/jhrcek/haskell-language-server/pull/9, which uses lsp patch applied before metamodel update to minimize the amount of breakage that other recent lsp changes seems to have introduced.
To be clear, when I say "soon" I don't mean that soon. Maybe next week or something.
Status update: we decided not to merge it yet, because it would require enabling progress notifications in many hls tests.
Here's a test PR that makes the hls tests pass by enabling listening to progress notifications within "waitForProgress" helper functions. But this strategy feels too brittle (e.g. it probably allows for races where notification is sent sooner than waitForProgress is called). Probably more robust approach would require enabling progress notifications in session config of all tests that actually need to wait for progress to be completed OR refactoring some of those tests not to rely on progress.