Motivation:
SwiftPM only generates fully usable clang modules for C modules if they
have umbrella headers. Therefore, adding a generated NIO.xcodeproj to
another Xcode project as a sub-project never worked.
To make a header an umbrella header you need to name them _exactly_ like
the module.
Modifications:
give each C module an umbrella header
Result:
generated NIO Xcode projects can be used as sub-projects.
### Motivation:
make swift-nio compatible with Android, and pass all test in Android.
### Modifications:
* add missed `ifaddrs` implementation
* add missed thread related functions - `CNIOLinux_pthread_getname_np`, `CNIOLinux_pthread_setaffinity_np` and `CNIOLinux_pthread_getaffinity_np`
* fix types incositency between Linux and Android, e.g. `Epoll.swift` class
* make bytes counter explicitely 64bits to avoid overflow on 32bit, in `PendingWritesManager.swift` and `PendingDatagramWritesState.swift`
* fix issue with Unix domain socket, first byte need to be zero in Android
* several incosistency fixes between Linux and Android api.
### Result:
now swift-nio works on Android. All tests passed!
Motivation:
A number of users have asked for the ability to install SwiftNIO
via Cocoapods. This is an entirely reasonable request, so let's
do it.
Modifications:
- Added a script that can generate, and optionally upload,
podspecs.
- Made a slight modification to the dependency script to provide
target-specific dependencies.
Result:
Users can use cocoapods if they prefer.
Motivation:
For a long while I had a script which runs NIO's performance tests
against different Swift toolchains. It should be in the repository.
Modifications:
add scripts/compare_perf_of_swift_versions.sh
Result:
everybody can run the performance tests against different Swift versions
Motivation:
Sometimes it's useful to know the top-sorted dependency order. For
example if you need to do something in an order where all dependencies
of a target have already previously processed.
Modifications:
added scripts/list_topsorted_dependencies.sh
Result:
can write other scripts that need top-sorted dependencies
Motivation:
The script to generate the contributors list wasn't executable and
forgot to change to the correct directory before invoking `git`.
Modifications:
- make `scripts/generate_contributors_list.sh` executable
- correctly change directory before invoking git
Result:
it's now possible to invoke the script without explicitly running `bash`
and it's no longer important what directory one invokes the script from.
Problem: contributors.txt file is out of date
Cause: it is a tedious job to edit this file manually everytime a new person contributes to the project
Solution: create a shell script that extracts all contributors from the git repository and adds it to the contributors.txt file
Motivation:
dtrace is extrmely useful when debugging allocation related issues. This
adds two scripts that have helped me many times.
Modifications:
- `dev/malloc-aggregation.d` which prints an aggregation of all
stacks that have allocated
- `dev/boxed-existentials.d` which live prints all allocations of boxed
existentials
Result:
sharing debugging tools is great
Motivation:
The integration tests' info mode lets us see the number of allocations
the did, that's great.
Modifications:
run integration tests in info mode
Result:
mode information
Motivation:
generate_linux_tests.rb is written in a non idiomatic way.
Modifications:
I used Rubocop to refactor the code.
More info: https://github.com/bbatsov/rubocop
Result:
A more idiomatic Ruby script.
Problem: Documentation for classes like _ChannelInboundHandler are not accesible via the official API documentation pages
Cause: GitHub treats the gh-pages branch as Jekyll
Solution: Turn off Jekyll by adding a .nojekyll file to the gh-pages branch
Motivation:
Websockets is a major protocol in use on the web today, and is
particularly valuable in applications that use asynchronous I/O
as it allows servers to keep connections open for long periods of
time for fully-duplex communication.
Users of NIO should be able to build websocket clients and servers
without too much difficulty.
Modifications:
Provided a WebsocketFrameEncoder and Decoder that can serialize and
deserialize Websocket frames.
Result:
Easier use of websockets.
Motivation:
We need license headers at the top of all files but we didn't
automatically check for it in all source files.
Modifications:
Check for the full licensing header in all files (Swift, C & Shell).
Result:
If we're missing a licensing header a PR won't turn green.
Motivation:
Our shell scripts didn't have license headers but they should.
Modifications:
Add licensing headers to all shell scripts
Result:
Licensing clear for shell scripts too.
Motivation:
prevent adding source that does not include the license header
Modifications:
add a check in sanity script to grep over all swift files and make sure they have the license header
Result:
ci build will fail if/when trying to commit source files that do not include the license header
Motivation:
Nicely written files end in newline characters.
Modifications:
Edited the test generation script to put a newline at the end of the
LinuxMain.swift file.
Result:
One more newline
Motivation:
set up continuous integration
Modifications:
* update docker file to include all dependencies required for build, unit tests, integration tests and doc generation
* remove dependency steps from doc generation script
* add integration tests driver script
Result:
able to set up docker based continuous integration
Motivation:
doc generation broken due to module rename and lack of tags
Modifications:
* update module names
* set default version if tag not found
Result:
doc generation works again
Motivation:
Right now the test gen script will rewrite every file. Not ideal!
Modifications:
Added the license header, and made the follow-on comment match that
style.
Result:
Test files will look the same when running this script as they do
now.
motivation: bring documentation generation closer to what it will look like on oss
changes:
* make cacheable steps conditional
* use absolute path for source-kitten generated index files