Commit Graph

8 Commits

Author SHA1 Message Date
Steven Wu 5bddf886bb [ConstExtract][Caching] Remap file path in ConstExtract JSON
Fix that the `file` fields in ConstExtract JSON output are all prefix
mapped path when caching and prefix mapping are all enabled. This can
cause the consumers of the output failed to find the source file.

Now the JSON file is correct updated with the correct source file
location when caching is on. This allows both un-prefix-mapped source
location and relocatable source file location. As a bonus, now CAS
stores the compact version of the JSON file to save space without
affecting the pretty formatted final output file.

rdar://173736094
2026-04-02 10:15:54 -07:00
Steven Wu 1852967fcf [Caching] Support -const-gather-protocols-file correctly
Previously, const-values output is not supported correctly as it is not
captured correctly as a dependency. The load of the input JSON file is
loaded via file system directly, that can cause issues like:
* False cache hit when the file is changed
* Cannot be prefix mapped to allow distributed caching

Try to support the input file by:
* Correctly capture the input
* Create a new driver flag `-const-gather-protocols-list` that can do
  path remapping correctly in swift-driver

rdar://169109358
2026-01-30 13:14:33 -08:00
Zhiyu Zhu/朱智语 6d3017cde3 [Compile Time Constant Extraction] Extract from extensions of types not declared in the same file/module (#70081)
Resolves rdar://118904022
2023-11-29 09:07:52 -08:00
Steven Wu 8fb0d5f803 Virtualize swiftconstvalues output
Virtualize swiftconstvalues output so it can be cached inside CAS.
2023-06-12 13:22:10 -07:00
James Paolantonio 7832de07f9 [Compile Time Constant Extraction] Add extraction of initialization calls (#62365) 2022-12-06 08:44:57 -05:00
Quinn Taylor 43a126c28a [Compile Time Constant Extraction] Add valueKind property to JSON output.
For computed Swift properties where `valueKind` is `"Runtime"`, exclude the `value` JSON property.
2022-11-29 13:58:30 -05:00
Artem Chikin 5a38d65fb3 Move 'ConstExtract' request from TypeCheckRequest into its own component's collection of requests. 2022-10-28 13:55:09 -07:00
Artem Chikin 6e7f3076b8 Add rudimentary emission of compile-time-known default-initialized property values of specific conformances. 2022-08-01 11:06:59 -07:00