Skip to content

swift-format breaks Package.swift by moving an import above the // swift-tools-version: comment #670

@dabrahams

Description

@dabrahams

When I ran swift-format over my project, it turned this

// swift-tools-version:5.7
import Foundation
import PackageDescription

Into this:

import Foundation
// swift-tools-version:5.7
import PackageDescription

Which results in this error:

error: 'hylo': package 'package.swift' is using Swift tools version 3.1.0 which is no longer supported; consider using '// swift-tools-version: 5.9' to specify the current tools version

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