swiftlang / sourcekit-lsp

Language Server Protocol implementation for Swift and C-based languages
Apache License 2.0
3.3k stars 273 forks source link

Add an identifier to work done progress messages #1476

Closed plemarquand closed 3 months ago

plemarquand commented 3 months ago

Description

Work done progress messages ($/progress) contain a message and a title, but there is no id to match begin/end events up together. It is possible to use the title, but if developers want to check for specific types of work progress they'll have to key off the title and if that title ever changes in future then their code will break.

It would be nice to add an id field to these progress messages that is considered immutable. One catch is there is no id field in the protocol definition so this would be out of spec.

ahoppen commented 3 months ago

Synced to Apple’s issue tracker as rdar://129678779

ahoppen commented 3 months ago

Adding a consistent prefix to the token of the work done progress here: https://github.com/apple/sourcekit-lsp/pull/1493

For crashed sourcekitd, this will be sourcekitd-crashed.