mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
`CompilationDatabaseTests` have been flakey on Windows since https://github.com/swiftlang/sourcekit-lsp/pull/2334. This didn't really introduce the failure though - it just added tests that now catch it. The underlying cause is that `filename.isAbsolutePath` sometimes returns `true` for a relative path, which then causes the CWD to be prepended instead of the given `compileCommandsDirectory`. `PathIsRelativeW` requires a null terminated string, so presumably we were hitting junk after the initial path that sometimes turned it into an absolute path. From the Windows docs: > A pointer to a null-terminated string of maximum length MAX_PATH that contains the path to search. Fixes #2360 Resolves rdar://165006835