Files
Karan Lokchandani 55d75954e5 Add if let to guard transform (#2420)
fixes: https://github.com/swiftlang/sourcekit-lsp/issues/1569

mostly works but not sure what to do with many edge cases and has a todo
for switch statements, also this will probably have conflicts with
https://github.com/swiftlang/sourcekit-lsp/pull/2406 marking as draft
till that merges and i can resolve the conflicts.


https://github.com/user-attachments/assets/a6d07f9d-6f09-4330-8cd0-2d24bd6973fb

---------

Signed-off-by: Karan <karanlokchandani@protonmail.com>
2026-01-13 22:46:54 +01:00

45 lines
1.5 KiB
CMake

set(sources
Array+Safe.swift
AsyncUtils.swift
Cache.swift
CartesianProduct.swift
Collection+DropLast.swift
Collection+Only.swift
Collection+PartitionIntoBatches.swift
DisableSigpipe.swift
Duration+Seconds.swift
FileManagerExtensions.swift
LazyValue.swift
NSLock+WithLock.swift
PipeAsStringHandler.swift
Platform.swift
Process+terminate.swift
ResultExtensions.swift
RunWithCleanup.swift
Sequence+AsyncMap.swift
Sequence+ContainsAnyIn.swift
ThreadSafeBox.swift
TransitiveClosure.swift
URLExtensions.swift
)
add_library(SwiftExtensions STATIC ${sources})
set_target_properties(SwiftExtensions PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
target_link_libraries(SwiftExtensions PUBLIC
SwiftToolsProtocols::ToolsProtocolsSwiftExtensions)
target_link_libraries(SwiftExtensions PRIVATE
$<$<NOT:$<PLATFORM_ID:Darwin>>:Foundation>)
add_library(SwiftExtensionsForPlugin STATIC ${sources})
set_target_properties(SwiftExtensionsForPlugin PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
target_compile_options(SwiftExtensionsForPlugin PRIVATE
$<$<COMPILE_LANGUAGE:Swift>:
"SHELL:-module-alias ToolsProtocolsSwiftExtensions=_ToolsProtocolsSwiftExtensionsForPlugin"
>)
target_link_libraries(SwiftExtensionsForPlugin PUBLIC
SwiftToolsProtocols::_ToolsProtocolsSwiftExtensionsForPlugin)
target_link_libraries(SwiftExtensionsForPlugin PRIVATE
$<$<NOT:$<PLATFORM_ID:Darwin>>:Foundation>)