Commit Graph

13 Commits

Author SHA1 Message Date
Paolo Tranquilli
42d40900d3 Swift: reword TSP diagnostics after doc team review 2023-05-16 17:52:02 +02:00
Paolo Tranquilli
8291b2229a Swift: turn internal error into a TSP warning 2023-05-16 15:18:29 +02:00
Paolo Tranquilli
cfcd26cf0d Swift: support markdown TSP diagnostics 2023-05-15 13:48:24 +02:00
Paolo Tranquilli
03f4625b5f Swift: go back to explicit DIAGNOSE_ERROR macros 2023-05-12 06:30:58 +02:00
Paolo Tranquilli
3f2a059b3b Swift: add location support to TSP diagnostics
This required a bit of an overhaul of the original integration of
JSON diagnostics into binlog.

The problem is that it is quite hard to add a kind of metadata to
binlog entries without changing its code. Another problem is that when
wanting to avoid double evaluation of logging macro arguments one
cannot really add a separate "diagnose" step easily.

The proposed solution consists in two things:
* hook into a binlog plumbing function by providing a better overload
  resolution match, which happens after logging macro expansion,
  bypassing the problem of double evaluation
* in that hook, produce the diagnostic directly, without waiting to
  reconstruct the diagnostics entry from the binlog serialized entry.

This allows to forgo the weird category to diagnostic mapping, and now a
diagnostics emission simply happens when a diagnostic source is given
as the first argument after the log format string. A flavour of
diganostics sources with locations is then added with the same
mechanism, allowing to write something like
```cpp
LOG_ERROR("[{}] ouch!", internalError.withLocation("foo.swift", 32));
```
2023-05-11 17:52:02 +02:00
Paolo Tranquilli
8534ba0218 Swift: surface error about unsupported SPM build 2023-05-10 14:31:33 +02:00
Paolo Tranquilli
c507754324 Swift: surface error about no viable swift targets found 2023-05-10 14:31:33 +02:00
Paolo Tranquilli
08c43bc9b0 Swift: move diagnostics definition to the source file 2023-05-09 10:11:13 +02:00
Paolo Tranquilli
182a155ff2 Swift: fix autobuilder extern definition 2023-05-09 09:38:46 +02:00
Alex Denisov
44c26be2c4 Swift: make dealing with CF types typesafe 2022-10-18 09:53:06 +02:00
Alex Denisov
6d754c42d7 Swift: do not use relative include paths 2022-10-18 09:14:48 +02:00
Alex Denisov
0521855755 Swift: split Xcode autobuild 2022-10-17 11:24:20 +02:00
Alex Denisov
3040837062 Swift: introduce Xcode autobuilder 2022-10-14 12:45:48 +02:00