You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don’t write output file map when getting compiler arguments for SourceKit-LSP (#8075)
We currently always write the output file map when calling
`SwiftModuleBuildDescription.emitCommandLine`. This means that every
time SourceKit-LSP queries build settings for a source file, we write
the output file map. This is causing issues in SourceKit-LSP on Windows
because we might be running a build (eg. for target preparation), which
writes an output file map and at the same time try to get build settings
for that file inside SourceKit-LSP, which calls into `emitCommandLine`,
also trying to write an output file map, which fails because the output
file map is exclusively opened by the build and thus cannot also write
the output file map.
While this might seem like a more theoretical race condition, this
caused multiple tests to fail when running SourceKit-LSP tests locally
on my machine.
Work around this by adding a `writeOutputFileMap` argument to
`emitCommandLine`, which we can set to `true` for calls from
`SourceKitLSPAPI` to avoid writing out the output file map.
Works around #8038.
rdar://137963946
0 commit comments