swiftlang / sourcekit-lsp

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

When running tests, raise in `XCTFail` if `logger.fault` is called #1669

Closed ahoppen closed 2 days ago

ahoppen commented 1 month ago

logger.fault indicates that there was an internal error in SourceKit-LSP. We should ensure that we don’t hit any situation that causes a logger.fault while running tests by raising an XCTFail if logger.fault is called in NonDarwinLogger (which is the logger that we’re using in Swift CI).

ahoppen commented 1 month ago

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

ahoppen commented 2 days ago

Decided against this, mostly because it requires us to modify global state and even though https://github.com/swiftlang/sourcekit-lsp/pull/1703#discussion_r1776023254 shouldn’t pose an issue right now, I’m not sure if that might become problematic in the future.