We would previously fail to install Yams from CMake due to searching for
the swiftmodule in the wrong location. This uses the new improved
generic installation rules that I've been using in a number of other
projects to install the swift content across all the platforms.
* Add TopLevelDecoder conformance
* fixup! Add TopLevelDecoder conformance
* Support decoding `Data`
- Set `TopLevelDecoder.Input` to `Data`
- Provide `YAMLDecoder.deecode(...)` function taking `Data` as input
- Add tests for `TopLevelDecoder` and `Data` decoding
- Add `Parser.Encoding.swiftStringEncoding` member to convert between the Swift String encoding and the Yams encoding
- Fix warnings with Swift 5.3
* Add TopLevelDecoderTests to CMakeLists.txt
* Only add TopLevelDecoderTests.swift to LinuxMain.swift if Combine is available
* Completely remove TopLevelDecoderTests from LinuxMain
* Use @available attribute
* Store cancellable
* 5.3
* Force unwrap
* merge compiler conditionals
* Fixes
* Try to run TopLevelDecoderTests with Swift 5.2+
* Only report code coverage for latest Xcode version
* Update README
* Remove stored cancellable
* Add changelog entries
* Install latest SwiftLint available to Homebrew
Expand the CMake based build to support running the test suite. This
allows testing on Windows as well. Although the test suite does not
fully pass on Windows yet, this brings us closer.
With this on Windows, the following is the result:
```
Test Suite 'All tests' failed at 2020-05-14 12:11:08.871
Executed 120 tests, with 9 failures (0 unexpected) in 0.505 (0.505) seconds
```
The failures in the test suite correspond to the conversion of floating
point values in the infinity and NaN cases (either converting to
`-infe+0`, `infe+0`, or `nane+0` instead of `-inf`, `inf`, `nan`, or
converting to `NaN` instead of `nan`).
Enable building against an uninstalled copy of Foundation but do not
require it. This allows for a simpler build system. If the user wishes
to build against an out-of-tree Foundation, they can simply specify
`Foundation_DIR` and `dispatch_DIR` when configuring and CMake will
handle the rest.
Rather than have a swift module directory that you need to find for each
library, use a single global swift module directory similar to the
runtime output directory. This will be useful for a follow up change to
enable tests.
The CMake instructions in the readme didn't quite work when I tried them on macOS today.
This patch includes a few changes to `CMakeLists.txt` and the `README.md` instructions to reflect the latest steps to build.
Also add a CI job to validate that this keeps working moving forward.
Currently `YAMLDecoder` uses `Resolver.basic` instead of `Resolver.default`, since it doesn't need to resolve types. This has the side effect of not including `.merge` as an option, making `decode` fail to see anchored properties.
This adds a CMake (3.15.1) based build to enable building Yams on
platforms where s-p-m does not yet function. It also enables
cross-compilation of Yams. This is sufficient to be able to build for
Windows with the following command line:
```
cmake -H build\debug -G Ninja -DFoundation_DIR=... -DCMAKE_Swift_COMPILER=...
cmake --build build\debug
```