Commit Graph

9 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis
233938a624 [test/SourceKit] Introduce a test that ensures a certain set of arguments allows both compiler and sourcekitd invocations to share the same module cache 2021-02-09 13:41:27 -08:00
Ben Barham
b07c06e839 [Serialization] Fix crashes when allowing compiler errors in modules 2020-11-18 12:35:21 +10:00
Ben Barham
241559dc88 [Serialization] Add an option to output modules regardless of errors
Adds a new frontend option
"-experimental-allow-module-with-compiler-errors". If any compilation
errors occur while generating the .swiftmodule, this mode will skip SIL
entirely and only serialize the (likey invalid) AST.

This existence of this option during generation is serialized into the
resulting .swiftmodule. Errors found in deserialization are only allowed
if it is set.

Primarily intended for IDE requests (eg. indexing and code completion)
to ensure robust cross-module results, despite possible errors.

Resolves rdar://69815975
2020-11-10 14:47:22 +10:00
Argyrios Kyrtzidis
4d7ee807da [sourcekitd] Make sure to put '-resource-dir' argument in front to allow overriding it by the passed in arguments
Otherwise, passing a custom '-resource-dir' option will be ignored.
rdar://45764554
2018-11-03 21:55:50 -07:00
Rintaro Ishizaki
930d4342cd [SourceKit] Defensive guard for invalid offset and length in edit request
Otherwise, hits assertion, or crashes in no-assertion build.

Added 'EditableTextBuffer::getSize()' for getting size after previous updates
without actually applying them.

rdar://problem/34206143
2018-08-01 20:02:15 +09:00
Ben Langmuir
b78daf5959 [sourcekitd-test] Add options to repeat a request and ignore its output
This provides a very rudimentary way to check the end-to-end performance
of simple sourcekitd requests. A sample invocation might be

```
sourcekitd-test -time-request -repeat-request=10 -dont-print-response -req= ...
```
2018-04-19 10:46:07 -07:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Argyrios Kyrtzidis
95ee932e0c [SourceKit] For sourcekitd_variant_json_description_copy, make sure to not escape the unicode characters in a string.
Otherwise it will be invalid json.
rdar://24617070
2016-02-15 10:37:56 -08:00
Argyrios Kyrtzidis
943c20dffa [sourcekit] Introduce 'sourcekitd_variant_json_description_copy' for getting a json format out of a variant object.
rdar://24280139
2016-01-22 13:29:32 -08:00