Skip to content

Swift-nio failing to build with Swift version 4.2 #2241

@justice-adams-apple

Description

@justice-adams-apple

Expected behavior

Expected the project to build successfully with Swift version 4.2

Actual behavior

When building with 4.2, the compilation fails with

swift-nio/Sources/NIOPosix/ServerSocket.swift:132:64: error: value of optional type 'String?' must be unwrapped to a value of type 'String'

Steps to reproduce

  1. Git clone https://github.com/apple/swift-nio
  2. Git checkout f5448fb
  3. swift build --verbose --configuration release -Xswiftc -swift-version -Xswiftc 4.2

Note that the build succeeds when you use version 5. instead

SwiftNIO version/commit hash

f5448fbbc24495a6659ef64df4dd3c1fc4a0fb11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions