Commit Graph

6 Commits

Author SHA1 Message Date
Paolo Tranquilli
bce483ddb1 Swift: rename log package to logging 2023-05-04 10:42:39 +02:00
Paolo Tranquilli
9544b96ff1 Merge branch 'main' into redsun82/swift-json 2023-05-04 10:34:11 +02:00
Paolo Tranquilli
a1cec3e970 Swift: replace assertions and prints in the file library 2023-04-18 12:16:22 +02:00
Paolo Tranquilli
a87495226a Swift: fix remapping
With the change to `std::filesystem` some path concatenations were
translated to appending, which is not the same. In case rhs is absolute
`lhs / rhs == rhs`, while concatenating treats `rhs` as if it was
relative. The same behaviour can be obtained in `std::filesystem` by
using `lhs / rhs.relative_path()`.
2022-10-28 11:16:49 +02:00
Paolo Tranquilli
521e6235b5 Swift: use std::filesystem and picoSHA2
This replaces usages of `llvm::fs` and string manipulation with
`std::filesystem`, also replacing `std::string` with
`std::filesystem::path` where it made sense.

Moreover MD5 hashing used in macOS file remapping was replaced by
SHA256 hashing using a small header-only SHA256 C++ library with an
MIT license, https://github.com/okdshin/PicoSHA2.

File contents hashing was relocated to the newly created `file` library
for later planned reuse.
2022-10-26 13:23:44 +02:00
Paolo Tranquilli
e422a4eef9 Swift: move TargetFile to a separate lib 2022-10-26 10:54:51 +02:00