Daniel Rodríguez Troitiño
70376a15f0
[ScanDependencies] Fix JSON generation under certain circunstances. ( #67246 )
...
The code of `ScanDependencies.cpp` was creating invalid JSON since #66031
because in the case of having `extraPcmArgs` and `swiftOverlayDependencies`,
but not `bridgingHeader`, a comma will not be added at the end of
`extraPcmArgs`, creating an invalid JSON file. Additionally that same PR
added a trailing comma at the end of the `swiftOverlayDependencies`, which
valid JSON does not allow, but that bug was removed in #66366 .
Both problems are, however, present in the 5.9 branch, because #66936
included #66031 , but not #66366 .
Besides fixing the problem in `ScanDependencies.cpp` I modified every test
that uses `--scan-dependencies` to pass the produced JSON through
Python's `json.tool` in order to validate proper JSON is produced. In
most cases I was able to pipe the output of the tool into `FileCheck`,
but in some cases the validation is done by itself because the checks
depend on the exact format generated by `--scan-dependencies`. In
a couple of tests I added a call to `FileCheck` that seemed to be
missing.
Without these changes, two tests seems to be generating invalid JSON in
my machine:
- `ScanDependencies/local_cache_consistency.swift` (which outputs `Expecting ',' delimiter: line 525 column 11 (char 22799)`)
- `ScanDependencies/placholder_overlay_deps.swift`
2023-07-12 14:19:20 -07:00
..
2023-06-29 12:50:56 +08:00
2023-06-09 16:41:05 -04:00
2022-05-05 16:58:25 -07:00
2022-05-20 19:51:23 -07:00
2022-05-10 12:56:17 -04:00
2023-03-14 09:35:24 -07:00
2023-03-22 12:37:51 -07:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:13:00 -07:00
2021-10-28 14:36:36 -07:00
2023-03-02 10:09:29 -08:00
2022-11-25 18:43:40 -08:00
2022-08-04 14:19:33 -07:00
2023-01-23 17:52:37 -08:00
2023-01-23 17:52:37 -08:00
2021-09-15 12:36:17 -07:00
2022-05-09 10:08:52 -07:00
2023-01-23 18:33:25 -08:00
2022-04-15 20:13:00 -07:00
2023-05-30 13:33:26 -07:00
2023-05-30 13:33:26 -07:00
2022-04-15 20:12:59 -07:00
2022-04-15 20:12:59 -07:00
2023-05-08 13:56:52 -07:00
2022-09-01 06:41:44 +03:00
2023-04-08 22:15:41 -07:00
2021-05-18 13:21:31 -07:00
2021-08-27 14:50:56 -07:00
2021-05-14 13:04:44 -07:00
2023-07-12 14:19:20 -07:00
2023-07-12 14:19:20 -07:00
2022-04-15 20:13:00 -07:00
2023-02-15 18:13:52 -08:00
2022-04-14 15:09:36 -07:00
2022-12-21 08:52:53 +01:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:13:00 -07:00
2023-03-04 11:42:09 -08:00
2023-01-30 21:03:07 -08:00
2022-09-01 06:41:44 +03:00
2022-11-08 18:35:27 -08:00
2021-08-18 16:22:26 -04:00
2021-07-19 14:14:59 -07:00
2023-06-21 16:57:44 -07:00
2023-07-01 10:49:42 -07:00
2021-11-09 15:58:42 -08:00
2022-04-15 20:13:00 -07:00
2021-10-28 08:16:19 -07:00
2022-04-15 20:13:00 -07:00
2023-02-16 15:23:45 -08:00
2023-06-20 13:15:09 -07:00
2022-04-15 20:12:59 -07:00
2023-04-07 21:23:27 -07:00
2022-05-23 19:43:51 -07:00
2022-08-16 08:36:58 -07:00
2022-12-12 14:58:19 -08:00
2022-02-19 10:32:29 -07:00
2022-04-15 20:13:00 -07:00
2023-07-12 14:19:20 -07:00
2023-05-10 18:19:49 -07:00
2022-10-03 14:49:11 -07:00
2021-06-11 20:04:43 -07:00
2022-04-14 15:09:36 -07:00
2022-10-03 17:22:44 -07:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:13:00 -07:00
2021-05-21 14:52:10 -07:00
2023-06-12 16:53:48 -07:00
2023-02-15 10:06:39 -08:00
2023-03-13 11:37:59 -07:00
2022-06-12 20:25:16 -07:00
2022-06-12 20:25:16 -07:00
2022-04-15 20:13:00 -07:00
2023-07-12 14:19:20 -07:00
2022-04-15 20:13:00 -07:00
2022-12-19 09:50:08 -08:00
2022-04-19 21:32:33 -07:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:13:00 -07:00
2023-03-28 22:43:45 -07:00
2023-03-27 10:04:03 -07:00
2023-06-28 14:53:16 -07:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:13:00 -07:00
2022-12-04 08:20:34 +03:00
2022-11-04 11:10:59 -07:00
2023-06-21 16:57:44 -07:00
2023-05-30 09:54:31 +01:00
2023-06-21 16:57:44 -07:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:13:00 -07:00
2022-01-20 14:48:55 -08:00
2023-03-25 14:53:29 -07:00
2022-09-01 06:41:44 +03:00
2023-06-30 11:01:02 -07:00
2022-04-15 20:13:00 -07:00
2021-10-29 22:35:57 +02:00
2023-05-25 22:29:32 -07:00
2022-04-06 09:46:40 -07:00
2022-06-02 18:15:31 -04:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:13:00 -07:00
2023-05-15 23:32:52 -04:00
2022-11-07 18:38:06 -05:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:12:59 -07:00
2023-06-20 13:15:09 -07:00
2023-03-12 18:02:49 -07:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:13:00 -07:00
2022-08-16 18:31:13 -07:00
2022-04-18 09:12:35 -07:00
2022-04-15 20:13:00 -07:00
2022-07-06 22:16:16 -07:00
2022-04-15 20:13:00 -07:00
2023-02-22 12:53:10 -08:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:12:59 -07:00
2022-04-15 20:12:59 -07:00
2022-08-31 23:55:29 -07:00
2022-04-15 20:13:00 -07:00
2022-06-30 17:25:17 -07:00
2022-04-15 20:13:00 -07:00
2023-03-29 14:45:22 -07:00
2022-04-15 20:13:00 -07:00
2022-07-14 15:04:27 -07:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:13:00 -07:00
2022-04-15 20:13:00 -07:00
2023-01-27 11:37:47 -08:00
2022-05-31 08:24:49 -07:00
2022-05-09 14:10:07 -07:00
2022-04-15 20:13:00 -07:00
2023-01-02 21:22:04 -08:00
2021-05-18 11:04:04 -07:00
2023-01-02 21:22:04 -08:00
2022-08-11 11:02:57 -07:00
2021-06-11 20:04:43 -07:00