# Motivation
We want to make sure our packages build on all supported platforms.
# Modification
This PR enabled the Windows CI.
# Result
Better test coverage in our package.
Motivation:
Contributors list is nolonger being maintained
as it can be trivially derived from git history.
Modifications:
Remove script for updating contributors list.
Result:
One fewer script
CI: concurrency=complete require-explicit-sendable
Motivation:
Adopt `-Xswiftc -strict-concurrency=complete -Xswiftc
-require-explicit-sendable` in CI to lock-in concurrency-safety wins.
Modifications:
Added strict flags to pull request and scheduled GHA CI on Swift 6.0.
Result:
CI should ensure we don't regress data-race safety on Swift 6.0.
Motivation:
Now that we have cut over to GitHub Actions we can remove files
supporting the old workflow.
Modifications:
Remove docker and stubbed-out script files.
Result:
Nothing should change because GHA is now used as CI.
* Prepare repo for new GHA checks
Motivation:
Migrate to GitHub Actions reusable workflows (2)
Modifications:
* Add GHA PR label checks
* Add GHA benchmarks checks
* Satisfy soundness checks
Result:
New soundness checks should be green and ready for adoption
* review comments
Motivation:
Completing annotations helps with coverage for consuming projects.
Modifications:
Mark more things and Sendable or not.
Result:
Consuming libraries more likely to get correct usage.
Co-authored-by: Cory Benfield <lukasa@apple.com>
* Migrate to GitHub Actions reusable workflows (1)
Motivation:
Migrate to GitHub Actions reusable workflows whilst keeping CI green.
Modifications:
As the first step in migrating to use GitHub actions this PR provides
the workflows which will be used in the future, at first in disabled
state so that we can keep CI green during the changeover.
Result:
Once this PR is merged we can:
* Enable the new CI
* In a future PR neutralize the old CI scripts
* Disable the old CI via GitHub
* In a future PR Delete the old CI scripts
* add scheduled GHA CI
* Update .github/workflows/pull_request.yml
Co-authored-by: Franz Busch <privat@franz-busch.de>
* review comments
---------
Co-authored-by: Franz Busch <privat@franz-busch.de>
* Add support for CRLF line endings to `PEMDocument`
* Remove `lineEnding` as an argument and instead detect line ending automatically.
* Fix description
* Refactor
Motivation:
With the advent of Upcoming Feature Flags https://www.swift.org/blog/using-upcoming-feature-flags/ ,
we should make it a one-liner to enable feature flags.
As a follow-on to PR 63, we should enable the ExistentialAny feature flag, as
the code currently complies, and we may as well help flag any unintentional
regressions to that behavior.
Modifications:
Update Package.swift to allow for one-liner additions of new feature flags.
Enable the upcoming feature flag ExistentialAny
Result:
Better confidence that we don't break downstreams that compile this code with
ExistentialAny enabled.
Makes it (slightly) easier for future authors to modify the set of enabled feature flags.
Co-authored-by: Paul Seligman <pseligman@apple.com>
Co-authored-by: Cory Benfield <lukasa@apple.com>
Motivation:
We should feel confident that we compile clean when built in an environment
that has enabled upcoming Swift features.
When compiling swift-asn1 specifying `.enableUpcomingFeature("ExistentialAny")`
there are some minor warnings emitted by ASN1.swift.
Modifications:
Minor code changes to address surfaced warnings
Result:
Better confidence that we don't break downstreams that compile this code with
these upcoming features enabled.
Co-authored-by: Paul Seligman <pseligman@apple.com>
Motivation:
This is consistent with what underlying assert does.
Swift 6 warns about this mismatch
Modifications:
Use filePath for test assert location
Result:
Consistency in test assert location reporting
Motivation:
There is a possible overflow when computing a `Double` value for `fractionalSeconds` from an `ArraySlice` of bytes. Hence, access to this original `ArraySlice` is necessary.
Modifications:
- Add `rawFractionalSeconds` property to `GeneralizedTime`.
- Add a new `internal init` to `GeneralizedTime` that accepts `rawFractionalSeconds` instead of `fractionalSeconds` and generates the later from the former.
- Adjust the algorithm for computing `fractionalSeconds`, from a mathematical to a `String` computation. This is due to the precision mismatch between the mathematical computation and the native `Double` computation. This issue, which previously did not surface, now does, due to the newly included round-trip conversion from `fractionalSeconds` to `rawFractionalSeconds`.
Result:
- The `rawFractionalSeconds` property now provides the original `ArraySlice` from which `fractionalSeconds` was computed.
- `GeneralizedTime` can now compute `fractionalSeconds` from the provided `rawFractionalSeconds`.
Motivation
We should feel confident that we compile clean under the strict
checks of Swift 6. As this is a data-processing-only framework
it's not a surprise that it turns out to be fine, but this patch
adds the necessary docker-compose steps to ensure it continues
to work.
Modifications
- Add docker-compose file for Swift 6 nightlies
- Extend docker-compose to pass explicit sendable and strict
concurrency checks
- Add those checks to 6.0 and main nightlies
Result
Better confidence that we don't break our downstreams in Swift 6
support.
Swift requires CMake 3.19.x to build. Update the minimum supported
CMake to allow us to simplify the build rules somewhat by removing the
workarounds for older releases. Additionally, re-order and use
straightline configuration over conditional paths.
Motivation:
Now that Swift 5.9 is GM we should update the CI pipelines
Modifications:
* Add a 5.10 nightly docker compose file
* Update the 5.9 compose file to stop using nightlies
Result:
Remove add CI support for 5.10
* Support macOS 10.14.x/iOS 12.x and older again
* Revert "Support macOS 10.14.x/iOS 12.x and older again"
This reverts commit 6eeba0327f.
* Erase concrete type manually
### Motiviation
We want reduce allocations in swift-certificates and need a way to parse without allocating an intermediate `Array`.
### Modifications
add `DER.lazySet(of:identifier:rootNode)` which returns its result without allocating.
### Result
We can eliminate allocations during parsing
While this is a nice clear construction, it also has to allocate a temporary
Array, as the StrideTo type is not a BidirectionalCollection but a Sequence.