Skip to content

Package.swift diagnostics on wrong line #7688

Closed
@award999

Description

@award999

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI.

Description

SwiftPM diagnostics for the Package.swift show up at a different line/column than SourceKit-LSP. In this picture the first diagnostics is from SourceKit and shows up at right place, but SwiftPM indicates the diagnostic is on the next line
Screenshot 2024-06-19 at 1 12 31 PM

Expected behavior

No response

Actual behavior

No response

Steps to reproduce

  1. Set macOS platform to v13 in Package.swift
  2. Set swift tool version to 5.6: // swift-tools-version: 5.6
  3. Save file and swift package resolve

Notice output:
Screenshot 2024-06-19 at 2 01 58 PM

As you can see in the picture above the line was line 9, so line is off by one, but the column seems right

Swift Package Manager version/commit hash

No response

Swift & OS version (output of swift --version ; uname -a)

swift-driver version: 1.110 Apple Swift version 6.0 (swiftlang-6.0.0.4.52 clang-1600.0.21.1.3)
Target: arm64-apple-macosx15.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions