Commit Graph
61 Commits
Author SHA1 Message Date
George Barnett 36880de810 Update pod generation script
Motivation:

To workaround https://github.com/apple/swift-nio/issues/2073 we must
list all transitive dependencies when building podspecs.

Modifications:

- Copy over `list_transitive_dependencies.py` from the NIO repo.
- Include transitive dependencies in the build_podspec script
- Bump C++ language standard from 11 to 14
- Ignore non-modular header warnings
- Be more precise when specifying 'CNIOBoringSSL*' targets
- Use python3 in build-asm.py (The soundness script includes the
  shebang as part of the 'hash' when checking for license headers and
  only allows for one shebang per extension so we cannot use both Python
  2 and 3 in the same repo.)

Result:

Podspec generation script includes transitive dependencies.
2022-05-04 10:59:20 +01:00
George Barnett 876748fde7 Update BoringSSL to f299342e38fd34b589604ef5b730623da13ee235 (#356)
* Update BoringSSL to f299342e38fd34b589604ef5b730623da13ee235

* Add a note about stray xcodeproj
2022-04-22 10:24:36 +01:00
Fabian Fett e018a45ee1 Drop support for Swift 5.2 and 5.3 (#353)
As outlined in a [Swift forums post in November ’21](https://forums.swift.org/t/swiftnio-swift-version-support/53232), SwiftNIO will only support the latest non-patch Swift release and the 2 immediately prior non-patch versions.

- drop support for Swift 5.2 and 5.3
- update CI for Swift 5.4 to run on bionic instead of focal to ensure that we still test bionic
2022-04-20 08:55:29 +02:00
Franz Busch 1750965a1c Use SPM API diff checker (#351)
### Motivation:

SPM has built in functionality to check the API of modules against a target git treeish. We can use this to simplify our `check_no_api_breakages.sh` script. Closes https://github.com/apple/swift-nio/issues/1239

### Modifications:

This PR, exchanges the direct calls to Swift's API checker with the new SPM `diagnose-api-breaking-changes` tool. This allows us to get rid of the manual module parsing, build invocations and result comparisons.

### Result:

We are now using SPMs `diagnose-api-breaking-changes` to check for breaking changes.
2022-03-24 11:35:22 -07:00
Cory Benfield b5260a31c2 Update BoringSSL to 8bbefbfeee609b17622deedd100163c12f5c95dc (#350) 2022-03-22 15:10:36 +00:00
David Nadoba 3604f9db82 Make 2022 a valid year in licence headers (#346) 2022-03-09 10:15:06 -08:00
George Barnett 76164f0237 Update doc generation script (#335)
Motivation:

The docs haven't been generated for a while.

See also: https://github.com/apple/swift-nio/pull/2013

Modifications:

- Pass `--spm` flag to sourcekitten
- Update source location of sourcekitten
- Fix link to NIO docs

Result:

Docs build.
2021-12-17 04:07:58 -08:00
Cory Benfield 08e701df9a Add x509_vfy.h to umbrella header 2021-11-10 09:09:23 +00:00
Cory Benfield c359ba56f7 Clean up imports and dependencies (#319)
Motivation:

With NIO 2.32.0 we broke the core NIO module up into modules that split
apart the POSIX layer and the core abstractions. As a result, this
package no longer needs to express a hard dependency on the POSIX layer.

Modifications:

- Rewrote imports of NIO to NIOCore.
- Added NIOEmbedded and NIOPosix imports where necessary in tests.
- Extended soundness script to detect NIO imports.
- Note that the main modules still depend on NIO, which is necessary
for backwards-compatibility reasons. This dependency is unused.

Result:

No need to use NIOPosix.
2021-09-14 14:55:25 +01:00
George Barnett bf4b24679a Fix doc generation and jazzy version (#1950) (#313)
From: https://github.com/apple/swift-nio-extras/pull/141

Motivation:

The combination of Ruby and Jazzy are throwing up issues in CI on older
Ubuntu versions.

Modifications:

- Only install Jazzy on focal
- Fix doc generation script to use more recent source-kitten syntax

Results:

- CI doesn't complain
- Docs get built
2021-09-03 14:25:19 +01:00
George BarnettandCory Benfield 4829979d9f Bump Swift version in build_podspec.sh (#305)
Motivation:

SwiftNIO recently dropped support for Swift 5.0 and Swift 5.1 but our
build_podspec.sh script doesn't reflect this change. Additionally the
list_topsorted_dependencies.sh script always assumed named depenencies
when listing module depenencies. Since our tools version has now been
bumped to 5.2 that's no longer the case and the script produces a bunch
of nulls which throws the build_podspec.sh script off course.

Modifications:

- Bump the Swift version in build_podspec.sh to 5.2
- Include "product" dependencies when listing module dependencies in
  list_topsorted_dependencies.sh

Result:

Podspecs are created as expected

Co-authored-by: Cory Benfield <lukasa@apple.com>
2021-08-17 13:06:26 +01:00
Cory Benfield 0119cf84a0 Update BoringSSL to 2e68a05c9943a8dec1758d4a393b2ae906fd3295 (#308)
Also tweak the vendor script to add an explicit destination when
building for iOS.
2021-08-17 09:37:51 +01:00
David Evans 9317691e7e Remove support for Swift 5.0 and 5.1 (#302)
Changes made:

Removed CI config for 5.0 ad 5.1
Changed 5.2 to be based on 16.04 so we have some coverage there
Converted Package.swift to the latest syntax
Added a description to supported Swift versions in the README
2021-06-22 18:29:52 +01:00
buttaface eab60b2ada Enable tests for Android (#300)
Motivation:

Run the tests on Android.

Modifications:

- Enable the tests on Android.
- Replace a few uses of /tmp with FileManager.default.temporaryDirectory in the
  Swift tests.

Result:

All the tests pass on Android AArch64.
2021-06-15 09:10:17 +01:00
Cory Benfield 6b6c0582d6 Update boringssl to 04b3213d43492b6c9e0434d8e2a4530a9938f958 (#279) 2021-03-10 14:31:02 +00:00
Dalton Claybrook bbb38fbcbb Update podspec script to remove 'S' files from watchOS target (#277) 2021-02-24 07:42:20 +00:00
George Barnett 722c70f0fb Allow warnings when building Podspecs (#274)
Motivation:

When pushing Cocoapods a warning is emitted for SwiftNIOSSL
('SecTrustEvaluateAsync' was deprecated in watchOS 6.0). Pushing the
pods fails as a result.

Modifications:

Allow warnings when pushing pods.

Result:

Pods can be pushed with warnings.
2021-02-18 15:30:53 +00:00
Johannes Weiss 4c933e955b update code of conduct to version 1.4 (#273) 2021-02-17 14:17:13 +00:00
Cory Benfield 5cf978934a Update vendor script to namespace C++ structures. (#269)
Motivation:

C++ structures emit a number of symbols into their binaries that are
named based on the name of the structure. Most notably, these are the
three (or five, depending on mode) magic structure methods: copy
constructor, copy assignment operator, destructor.

By and large this isn't an issue for us as BoringSSL already namespaces
most of its structures. However, a few structures are the target of
opaque typedefs in the public header files. These need to use the names
that would appear in the internal source. If they didn't, the internal
source wouldn't compile! As a result they need to appear outside the
inner prefixing namespace.

We knew about this limitation at the time we did this work, but hoped
we'd get along just fine without changing anything. In fact we did, for
nearly three years. But the chickens have come home to roost in
https://github.com/grpc/grpc-swift/issues/1134.

So it's time to fix it.

Fortunately for us, we never write down the names of the inner types in
our source code. That means we don't actually care what that name _is_.
This gives us our escape hatch: we can namespace the names of the
underlying C++ types using the same preprocessor trick as the function
names. This will have the effect of also namespacing their magic
methods.

Modifications:

This patch attempts to make this change defensively, by assuming that
other structures may be added that meet this pattern. To do it, we
compile the binary _again_ and search for any C++ methods that haven't
already been namespaced and that don't belong to Swift. We then extract
the structure name from them and add a `#define` for it. This forcibly
renames the structure in all cases.

Result:

No more colliding symbols.
2021-02-12 08:23:29 +00:00
Cory Benfield f6726f800c Update BoringSSL to bb43a45d6de7375f3310511d37f040d1055f8a10 (#268) 2021-02-03 12:55:20 +00:00
Fabian Fett 00c264d7a5 Use welcoming language (#265) 2021-01-22 13:46:59 +00:00
George Barnett 901a014233 Fixup vendoring script and update BoringSSL. (#256)
* Update vendoring script to fix a missing includeo

Motivation:

The openssl/evp.h header was missing causing compilation to fail.
In addition, a previously missing header is now included by BoringSSL.

Modifications:

- Update the fix import line to fix the new missing header.

Result:

BoringSSL can be vendored using our script.

* Update BoringSSL to 4a265be4d931e35f0d108040c94d37bb49827948.
2020-11-27 11:15:57 +00:00
George Barnett 4de53b6c84 Add watchOS deployment to PodSpec build script (#252)
Motivation:

We support watchOS 6+ with SwiftNIO Transport Services; as such we should
include watchOS as a deployment target for our CocoaPods.

Modifications:

- Add a watchOS deployment target to `build_podspecs.sh`

Result:

Users can deploy to watchOS 6+ with CocoaPods.
2020-10-21 15:28:05 +01:00
Cory Benfield 4c66baf51d We use the main branch now. (#243) 2020-09-25 20:25:03 +01:00
George Barnett ea1dfd6419 Update BoringSSL to 1c58648f14ed75f2a8cc3ae08897987d97f493ec (#239)
* Update patch-2-arm-arch.patch

* Update BoringSSL to 1c58648f14ed75f2a8cc3ae08897987d97f493ec
2020-08-26 16:17:22 +01:00
Daniel Alm 7932e709af Fix the -f option in build_podspec.sh. (#237)
* Fix the -f option in build_podspec.sh.

* Add docs.

* Another minor tweak.
2020-08-06 18:23:50 +01:00
George Barnett e14f8ebd6a Add synchronous option to trunk push in build_podspec.sh (#222)
See https://github.com/apple/swift-nio/pull/1551
2020-06-10 15:23:13 +01:00
George Barnett a44a343f69 Update build_podspec.sh to not use exact dependency versions (#221)
Motivation:

The build_podspec.sh script generates a podspec which requires exact
versions of its dependencies. This very quickly turns into unresolvable
dependency graphs.

Modifications:

NIO version passed to script must be in the format MAJOR.MINOR
Podspec dependencies are now '>= MAJOR.MINOR', '< MAJOR+1'

Result:

Looser version requirements for podspecs
2020-06-10 13:51:32 +01:00
43d3753cf8 link swift-nio-extras in docs (#208)
Co-authored-by: Cory Benfield <lukasa@apple.com>
Co-authored-by: George Barnett <gbarnett@apple.com>
2020-05-19 12:10:06 +01:00
Cory Benfield f6ad7f7ef1 Update BoringSSL to 7c522995d1ea5386b3223a19b0f62e73c1f76b17 (#216)
Also remove a temporary BoringSSL patch and deal with no C files being
in fiat/
2020-05-13 11:10:35 +01:00
Johannes Weiss 584c0d06c4 universal bootstrap support (#185) 2020-03-23 16:26:05 +00:00
Cory Benfield 7add274f6e Update BoringSSL to 5298ef99bf2b2d77600b3bb74dd572027bf495be (#200)
Note that the vendor script changed: BoringSSL added a new top-level
header that had to be added to the umbrella header.
2020-03-18 08:38:46 +00:00
3613382784 Add Build Podspec Script (#193)
Co-authored-by: Jake Prickett <jpricke1@ford.com>
Co-authored-by: Johannes Weiss <johannesweiss@apple.com>
2020-03-03 22:25:44 +00:00
tomer doron f5bdb018d1 update docs generation script to work better with selinux (#194)
motivation: docs scripts is broken on selinux due to restriction on ssh-agent

changes:
* change the jazzy workspace to a directory accessible by the CI node so we can push from the agent instead of from the docker container
* dont remove older docs when pushing new ones
* add version information and source links
2020-02-28 12:25:52 -08:00
Cory Benfield b99ca3a19a Mitigate Folly/BoringSSL static linking issue. (#191)
Motivation:

BoringSSL and Folly both attempt to play silly buggers with the sdallocx
symbol defined in jemalloc. Unfortunately, they don't play nicely
together, and the end result if you have both present is that BoringSSL
will reliably SIGBUS or SIGSEGV on initialization. Naturally, this isn't
good.

Modifications:

- Resolve the issue by patching out BoringSSL's allocator optimisation.
- Update BoringSSL to 6432bb46ab44731567ec923e6c8fc182f13d0070.

Result:

Flow and BoringSSL will play better together.
2020-02-24 14:41:27 +00:00
Cory Benfield a2681681eb Allow testing deprecated functions. (#170)
Motivation:

If we want to deprecate anything, we either have to remove the tests or
enable testing deprecated functionality without warnings. Conveniently,
@weissi has already written a patch that enables this for swift-nio in
apple/swift-nio@c2c7250, so we can just port that across.

Modifications:

Port Johannes' patch and run it.

Result:

We can test deprecated code.
2020-01-14 09:34:20 +00:00
tomer doron e5c7a18a91 add harness for performance tests (#156)
motivation: run performance tests 🎉

changes: add performance-test task in docker-compose setup, add script to analyze performance results to be used in CI
2019-12-02 09:20:11 +00:00
Cory Benfield ccf96bbe65 Add cross-compilation to symbol mangling. (#150)
Motivation:

BoringSSL potentially defines different symbols on different
architecture and platform combinations. This means that we've
historically missed mangling some symbol names when our script only
involved building on macOS.

We should build on more platforms to test this.

Modifications:

- Added support for cross compiling to Linux amd64, Linux aarch64, and
    Linux armv7 in symbol mangling script.
- Added support for compiling for iOS armv6 and arm64 in symbol mangling
    script.

Result:

Harder to run the mangling script, better results when you do.
2019-11-13 18:40:43 +00:00
Cory Benfield 63e61ed857 Update BoringSSL to 6ba98ff60144f60aba589b4d6121689528fbae76 (#149) 2019-11-13 15:04:17 +00:00
Will Lisac 8a5135cce9 Fix BoringSSL compilation on aarch64 ARM Linux (#141) 2019-10-10 10:35:55 +01:00
tomer doron 0ec8dcf248 api breakage detection (#138)
motivation: test for api breakage on PR

changes:

* add script to detect api breakage
* amend docker setup to include jq
* amend docker-compose setup to include a shell utility task
2019-10-07 15:00:16 -07:00
Cory Benfield 109faef770 Use .note.GNU-stack section in ASM. (#137)
Motivation:

Well-formed Linux assembly code declares a .note.GNU-stack section in
order to help out the linker. When absent, the linker makes some
suboptimal linking decisions that can cause pain in running programs.

Modifications:

- Amend the vendoring script to add the .note.GNU-stack section to all
    assembly files on Linux.
- Updated BoringSSL

Results:

Better linker behaviour.
2019-10-03 18:30:58 +01:00
Cory Benfield dc2e9c0a25 Catch and namespace extra autogenerated functions. (#131)
Motivation:

Our scripts have code to catch the functions that are used with STACK_OF
and LHASH_OF data structures in BoringSSL in order to namespace them.
Sadly, some declarations were falling through the cracks: we missed some
LHASH_OF functions used internally, and we missed the
DEFINE_NAMED_STACK_OF macro used for a new C++ data type.

Modifications:

- Improved these scripts to catch more cases.
- Updated BoringSSL to 9806ae005b3085683a2fcf2953e4170893e0973d.

Result:

Fewer exported symbols from BoringSSL.
2019-08-20 13:42:56 +01:00
fabstu 00546ebd78 Fix compilation on iPad Pro 1st Gen with iPadOS13 and iOS 12 (#125)
Resolves an issue where the ARM architecture helpers were inadvertently excluded on 64-bit ARM platforms.
2019-08-10 15:42:30 +01:00
George Barnett 125078ea20 Re-namespace BoringSSL from CNIOBoringSSL/ to CNIOBoringSSL_ (#122)
Motivation:

When including an xcodeproj generated by SwiftPM (which builds
CNIOBoringSSL) into an xcodeproj which wasn't generated by SwiftPM it
doesn't know about the correct header paths.

Modifications:

Update the vendor-boringssl script to:
- Namespace BoringSSL with CNIOBoringSSL_ instead of CNIOBoringSSL/
- Create an umbrealla CNIOBoringSSL header
- Apply a patch to replace inttypes.h with sys/types.h in bn.h
- Apply a patch to conditionally include arm_arch.h

BoringSSL was also updated to: ae223d6138807a13006342edfeef32e813246b39

Result:

Non-SwiftPM xcodeproj's can build a SwiftPM generated xcodeproj
which includes CNIOBoringSSL.
2019-08-09 10:23:16 +01:00
Cory Benfield 16de4b45c7 Update BoringSSL to a86c69888b9a416f5249aacb4690a765be064969 (#118) 2019-07-19 16:52:06 +01:00
Johannes Weiss a5839aa4e6 run integration tests in CI (#114) 2019-06-27 15:12:47 +01:00
Cory Benfield 77173ac903 Disable 32-bit assembly on Apple platforms. (#109)
Motivation:

The 32-bit assembly in BoringSSL doesn't assemble correctly on 32-bit
apple platforms. It took us a while to notice because we previously
haven't had any supported 32-bit platforms. NIOSSL still doesn't really
support any 32-bit Apple platforms, as all production use on those
platforms should use NIOTS, but there's no excuse for the compilation
failures really.

Modifications:

Remove assembly acceleration on 32-bit Apple platforms.

Result:

Better compilation on 32-bit Apple platforms.
2019-06-18 16:15:25 +01:00
Cory Benfield dc23a24fbe Update boringssl to ff62b38 (#108) 2019-05-22 16:41:33 +01:00
Johannes Weiss c46e70131c Add 'Show on GitHub' link to API docs (#103)
Motivation:

Allowing readers of the API documentation to drill into the implementation of documented declarations can be educational and helpful for debugging, among several other reasons.

Modifications:

Add --github-file-prefix appending the current version in order to keep stable links. This means that documentation generated from any non-release revision may resolve incorrectly. This can be refined in the doc generation script later if it is deemed problematic by resolving to the commit sha if it doesn't exactly align with the version.

Result:

Users will be able to click a 'Show on GitHub' for all documented API declarations.
2019-04-29 09:53:16 +01:00