Commit Graph

16 Commits

Author SHA1 Message Date
Alex Hoppen
7baf991603 Merge pull request #1578 from ahoppen/6.0/import-free
[6.0] Import `Darwin` in files that use `free`
2024-07-18 13:59:43 -07:00
Alex Hoppen
a044f680a3 Import Darwin in files that use free
rdar://131965190
2024-07-18 11:30:12 -07:00
Finagolfin
3f00eba475 Import new Bionic module from Android overlay instead where possible 2024-07-10 20:42:04 +05:30
Finagolfin
9ca2942abd Import new Android overlay 2024-07-04 19:39:38 +05:30
Alex Hoppen
f1b34b1c9b Make SKD{Request,Response}{Dictionary,Array} Sendable 2024-03-20 11:48:50 +01:00
Alex Hoppen
f5fb23ad4c Rename sourcekitd_ to sourcekitd_api_ and add nullability annotations to sourcekit_functions.h
Naming types in sourcekitd_functions.h `sourcekit_api_` instead of `sourcekitd_` indicates that these are types to be used with dynamically loaded sourcekitd libraries. It avoids confusion if sourcekitd is also linked, which adds the `sourcekitd_` symbols.

Adding nullability annotations to it is also just nice.

And some improved formatting never hurts.
2024-02-23 09:13:42 -08:00
Alex Hoppen
6f98029ff7 Rename SKDValue to SKDRequestValue
`SKDValue` is only used for requests and the name should reflect that.
2024-02-15 21:30:29 -08:00
Alex Hoppen
3991fae867 Define methods on SourceKitD to create arrays and dictionaries instead of using skd postfix syntax 2024-01-08 18:06:31 -08:00
Alex Hoppen
f901cc9250 Support creation of SKDRequest(Dictionary|Array) from literals
IMO this makes it a lot clearer which keys are present in the request dictionaries because we are no longer mutating them on the fly.
2023-12-22 22:29:11 -08:00
Alex Hoppen
34a36b44e6 Refactor rename to support index-based discovery of rename locations 2023-12-12 17:34:34 -08:00
Alex Hoppen
777f1dc463 Add support for rename within the current file
rdar://117822427
2023-12-09 08:35:13 -08:00
Alex Hoppen
d0fc00ce98 Format using swift-format
Add `.swift-format` to the repo and format the repo with `swift-format`.

This commit does not add any automation to enforce formatting of sourcekit-lsp in CI. The goal of this commit is to get the majority of source changes out of the way so that the diff of actually enforcing formatting will have fewer changes or conflicts.
2023-10-10 13:44:47 -07:00
Max Desiatov
66f1c0dbf2 Add support for Musl libc with canImport(Musl) checks (#772)
Since Musl is sufficiently different from Glibc (see https://wiki.musl-libc.org/functional-differences-from-glibc.html), it requires a different import, which now should be applied to files that have `import Glibc` in them.

Musl is a low footprint libc that's used in Linux distributions such as Alpine Linux, which allows producing fairly small container images. Additionally, unlike Glibc, musl allows full static linking, meaning apps can be easily distributed to an arbitrary Linux distribution that may have a version of Glibc incompatible with the one that Swift is usually built with or no Glibc installed at all.
2023-07-18 22:51:26 +01:00
YR Chen
031a0913e0 Import CRT to resolve free on Windows 2022-03-14 05:18:28 +08:00
Marcel Hlopko
3f506c5725 Import glibc 2020-12-15 17:24:37 +01:00
Ben Langmuir
f9d26d6bcf [sourcekitd] Move SourceKitD to its own module and lightly refactor 2020-06-03 14:51:03 -07:00