We must disambiguate `Double.pow(_: Double, _: Double) -> Double` and
`__C.pow(_: Double, _: Double) -> Double` as the Swift for TensorFlow
branch adds the former into the standard library. The explicit module
dispatch ensures that we make the overload resolution unambiguous
allowing building Yams.
Fixes https://github.com/jpsim/Yams/issues/263 by only constructing integer and floating point values from scalars if those scalars are in the `plain` "flow" style. It additionally allows through scalars with no styling information (`any`).
Due to https://bugs.swift.org/browse/TF-1203, there's a build failure
without this patch:
```
error: static member 'pow' cannot be used on instance of type 'Double'
```
```
error: static member 'pow' cannot be used on instance of type 'Double'
```
When building Yams with the TensorFlow toolchain, this crops us. Simply
add the explicit type annotation.
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.