It was discovered that Swift Linux containers do not contain git-lfs, which makes it impossible to restore cache on linux jobs. By caching test files directly we will not need git-lfs.
Apparently, Swift Package Index is trying to build SWC on these two platforms as well. While we do not currently support them, we can try to at least fix some issues.
This is a temporary measure to "fix" compilation errors in Swift 6 language mode. Ultimately, this is a global variable which is not really concurrency-safe, so the entire custom extra field management system should be rethought.
Since we have to download simulators for some configurations every time, we hit the default timeout of 60 minutes. Increasing the timeout to 90 minutes should help.
Removing DEVELOPER_DIR variable should make CI use the default version of Xcode. Since recently AZP became more aggressive with removing older versions of Xcode from its CI images, relying on default version of Xcode will simplify maintenance of the CI configuration.
The LZMA dictionary size was being read from only 3 bytes (indices 1-3)
instead of the full 4 bytes (indices 1-4) specified in the LZMA format.
This caused decompression to fail with LZMAError.notEnoughToRepeat for
archives using dictionary sizes >= 16MB (e.g., LZMA:24 = 2^24 = 16MB),
because the high byte was not read and the dictionary size defaulted
to the minimum 4096 bytes.
Change: `for i in 1..<4` → `for i in 1..<5`
This seems to have a positive impact on the performance of Deflate and BZip2 decompression and compression. It is unclear to me why these two were declared as classes in the first place.
These are related to situation described in issue #57. We should now either properly throw an error, or in rare cases (when only literals are inside the block) produce an output.
In a dynamic Huffman block if either previous or zero code length is copied too many times, it could cause a crash or lead to inconsistent state. These situations are checked now.