We use main as our development branch now. (#1651)

This commit is contained in:
Cory Benfield 2020-09-24 18:02:44 +01:00 committed by GitHub
parent 976ccdd0d0
commit e7880565aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 31 additions and 32 deletions

View File

@ -82,7 +82,7 @@ SwiftNIO has been created to be high performance. The integration tests cover s
Try to keep your lines less than 120 characters long so github can correctly display your changes.
It is intended SwiftNIO will use the swift-format tool in the future to bring consistency to code formatting. To follow the discussion on this topic see the swift evolution proposal [SE-250](https://github.com/apple/swift-evolution/blob/master/proposals/0250-swift-style-guide-and-formatter.md)
It is intended SwiftNIO will use the swift-format tool in the future to bring consistency to code formatting. To follow the discussion on this topic see the swift evolution proposal [SE-250](https://github.com/apple/swift-evolution/blob/main/proposals/0250-swift-style-guide-and-formatter.md)
### Extensibility

View File

@ -3,7 +3,7 @@
##
## This source file is part of the SwiftNIO open source project
##
## Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors
## Copyright (c) 2019-2020 Apple Inc. and the SwiftNIO project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
@ -24,6 +24,7 @@ function die() {
function make_git_commit_all() {
git init > /dev/null
git checkout -b main > /dev/null
if [[ "$(git config user.email)" == "" ]]; then
git config --local user.email does@really-not.matter
git config --local user.name 'Does Not Matter'
@ -54,8 +55,8 @@ EOF
cat <<EOF
],
dependencies: [
.package(url: "HookedFunctions/", .branch("master")),
.package(url: "$swiftpm_pkg_name/", .branch("master")),
.package(url: "HookedFunctions/", .branch("main")),
.package(url: "$swiftpm_pkg_name/", .branch("main")),
EOF
if [[ -n "$extra_dependencies_file" ]]; then
cat "$extra_dependencies_file"

View File

@ -4,7 +4,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2017-2020 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
@ -22,7 +22,7 @@ let package = Package(
.library(name: "HookedFunctions", type: .dynamic, targets: ["HookedFunctions"]),
],
dependencies: [
.package(url: "../AtomicCounter/", .branch("master")),
.package(url: "../AtomicCounter/", .branch("main")),
],
targets: [
.target(name: "HookedFunctions", dependencies: ["AtomicCounter"]),

View File

@ -4,7 +4,7 @@
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Copyright (c) 2017-2020 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
@ -22,7 +22,7 @@ let package = Package(
.library(name: "HookedFunctions", type: .dynamic, targets: ["HookedFunctions"]),
],
dependencies: [
.package(url: "../AtomicCounter/", .branch("master")),
.package(url: "../AtomicCounter/", .branch("main")),
],
targets: [
.target(name: "HookedFunctions", dependencies: ["AtomicCounter"]),

View File

@ -1,4 +1,4 @@
[![sswg:graduated|104x20](https://img.shields.io/badge/sswg-graduated-green.svg)](https://github.com/swift-server/sswg/blob/master/process/incubation.md#graduated-level)
[![sswg:graduated|104x20](https://img.shields.io/badge/sswg-graduated-green.svg)](https://github.com/swift-server/sswg/blob/main/process/incubation.md#graduated-level)
# SwiftNIO
@ -186,16 +186,16 @@ The core SwiftNIO repository will contain a few extremely important protocol imp
There are currently several example projects that demonstrate how to use SwiftNIO.
- **chat client** https://github.com/apple/swift-nio/tree/master/Sources/NIOChatClient
- **chat server** https://github.com/apple/swift-nio/tree/master/Sources/NIOChatServer
- **echo client** https://github.com/apple/swift-nio/tree/master/Sources/NIOEchoClient
- **echo server** https://github.com/apple/swift-nio/tree/master/Sources/NIOEchoServer
- **UDP echo client** https://github.com/apple/swift-nio/tree/master/Sources/NIOUDPEchoClient
- **UDP echo server** https://github.com/apple/swift-nio/tree/master/Sources/NIOUDPEchoServer
- **HTTP client** https://github.com/apple/swift-nio/tree/master/Sources/NIOHTTP1Client
- **HTTP server** https://github.com/apple/swift-nio/tree/master/Sources/NIOHTTP1Server
- **WebSocket client** https://github.com/apple/swift-nio/tree/master/Sources/NIOWebSocketClient
- **WebSocket server** https://github.com/apple/swift-nio/tree/master/Sources/NIOWebSocketServer
- **chat client** https://github.com/apple/swift-nio/tree/main/Sources/NIOChatClient
- **chat server** https://github.com/apple/swift-nio/tree/main/Sources/NIOChatServer
- **echo client** https://github.com/apple/swift-nio/tree/main/Sources/NIOEchoClient
- **echo server** https://github.com/apple/swift-nio/tree/main/Sources/NIOEchoServer
- **UDP echo client** https://github.com/apple/swift-nio/tree/main/Sources/NIOUDPEchoClient
- **UDP echo server** https://github.com/apple/swift-nio/tree/main/Sources/NIOUDPEchoServer
- **HTTP client** https://github.com/apple/swift-nio/tree/main/Sources/NIOHTTP1Client
- **HTTP server** https://github.com/apple/swift-nio/tree/main/Sources/NIOHTTP1Server
- **WebSocket client** https://github.com/apple/swift-nio/tree/main/Sources/NIOWebSocketClient
- **WebSocket server** https://github.com/apple/swift-nio/tree/main/Sources/NIOWebSocketServer
To build & run them, run following command, replace TARGET_NAME with the folder name under `./Sources`
@ -299,7 +299,7 @@ For the most part, SwiftNIO development is as straightforward as any other Swift
### Prerequisites
SwiftNIO's `master` branch is the development branch for the next releases of SwiftNIO 2, it's Swift 5-only.
SwiftNIO's `main` branch is the development branch for the next releases of SwiftNIO 2, it's Swift 5-only.
To be able to compile and run SwiftNIO and the integration tests, you need to
have a few prerequisites installed on your system.

View File

@ -26,7 +26,7 @@ RUN mkdir -p $HOME/.tools
RUN echo 'export PATH="$HOME/.tools:$PATH"' >> $HOME/.profile
# script to allow mapping framepointers on linux (until part of the toolchain)
RUN wget -q https://raw.githubusercontent.com/apple/swift/master/utils/symbolicate-linux-fatal -O $HOME/.tools/symbolicate-linux-fatal
RUN wget -q https://raw.githubusercontent.com/apple/swift/main/utils/symbolicate-linux-fatal -O $HOME/.tools/symbolicate-linux-fatal
RUN chmod 755 $HOME/.tools/symbolicate-linux-fatal
# swiftformat (until part of the toolchain)

View File

@ -73,7 +73,7 @@ which is literally just the exact numbers of each of the 10 runs we considered.
The exact allocation counts are _not_ directly comparable between different operating systems and even different versions of the same operating system. Every new Swift version will also introduce differences (hopefully decreasing over time).
This means that if you get hit by a CI failure, you will have to first reproduce the regression locally by running the allocation counter tests once on `master` and then again on your failing branch.
This means that if you get hit by a CI failure, you will have to first reproduce the regression locally by running the allocation counter tests once on `main` and then again on your failing branch.
## Debugging a regression in a particular test
@ -105,7 +105,7 @@ which should run very quickly. But _do not_ forget to pass `-c release`, otherwi
### Debugging with other tools
Often, you will want to use external tools such as Instruments or `dtrace` to analyse why a performance test regressed. Unfortunately, that is a little harder than you might expect because to implement the allocation tests, the allocation counter test framework actually [hijacks](https://github.com/apple/swift-nio/blob/master/IntegrationTests/tests_04_performance/test_01_resources/README.md) functions like `malloc` and `free`. The counting of allocations happens in the hijacked or 'hooked' functions.
Often, you will want to use external tools such as Instruments or `dtrace` to analyse why a performance test regressed. Unfortunately, that is a little harder than you might expect because to implement the allocation tests, the allocation counter test framework actually [hijacks](https://github.com/apple/swift-nio/blob/main/IntegrationTests/tests_04_performance/test_01_resources/README.md) functions like `malloc` and `free`. The counting of allocations happens in the hijacked or 'hooked' functions.
To use an external memory analysis tool, it's best to not do the hooking and fortunately it's very straightforward to switch the hooking off.
To disable the hooking, run the runner script with `-- -n` followed by the file name of the test you would like to debug. For example

View File

@ -2,7 +2,7 @@
This migration guide is our recommendation to migrate from NIO 1 to NIO 2. None of the steps apart from changing your `Package.swift` and fixing the errors is actually required but this might help you complete the migration as fast as possible. For the NIO repositories and some example projects, we had really good success in migrating them fairly pain-free.
This repository also contains a fairly complete list of public [API changes](https://github.com/apple/swift-nio/blob/master/docs/public-api-changes-NIO1-to-NIO2.md) from NIO 1 to NIO 2.
This repository also contains a fairly complete list of public [API changes](https://github.com/apple/swift-nio/blob/main/docs/public-api-changes-NIO1-to-NIO2.md) from NIO 1 to NIO 2.
## Step 1: A warning-free compile on NIO 1 with Swift 5

View File

@ -29,5 +29,5 @@ making it an `indirect case`.
[swift-repo]: https://github.com/apple/swift
[swift-optimization-tips]: https://github.com/apple/swift/blob/master/docs/OptimizationTips.rst
[swift-optimization-tips]: https://github.com/apple/swift/blob/main/docs/OptimizationTips.rst
[docs-memory-layout]: https://developer.apple.com/documentation/swift/memorylayout

View File

@ -3,7 +3,7 @@
##
## This source file is part of the SwiftNIO open source project
##
## Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
## Copyright (c) 2017-2020 Apple Inc. and the SwiftNIO project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
@ -51,8 +51,8 @@ function usage() {
echo >&2
echo >&2 "Examples:"
echo >&2
echo >&2 "Check between master and tag 2.1.1 of swift-nio:"
echo >&2 " $0 https://github.com/apple/swift-nio master 2.1.1"
echo >&2 "Check between main and tag 2.1.1 of swift-nio:"
echo >&2 " $0 https://github.com/apple/swift-nio main 2.1.1"
echo >&2
echo >&2 "Check between HEAD and commit 64cf63d7 using the provided toolchain:"
echo >&2 " xcrun --toolchain org.swift.5120190702a $0 ../some-local-repo HEAD 64cf63d7"

View File

@ -28,8 +28,6 @@ include FileUtils
#
# This ruby script will auto generate LinuxMain.swift and the +XCTest.swift extension files for Swift Package Manager on Linux platforms.
#
# See https://github.com/apple/swift-corelibs-xctest/blob/master/Documentation/Linux.md
#
def header(fileName)
string = <<-eos
//===----------------------------------------------------------------------===//