Skip to content

Unable to compile with Swift 6.2 #209

@aputinski

Description

@aputinski

Description

I'm trying to upgrade my project that uses sqlite-data to Swift 6.2, but I was receiving errors from swift-structured-queries. I wanted to make sure I could just build the project, but I when I run swift build, here's what I get:

Apple Swift version 6.2 (swift-6.2-RELEASE)
2.	Compiling with the current language version
3.	While evaluating request TypeCheckPrimaryFileRequest(source_file "/_playground/swift-structured-queries/Sources/StructuredQueriesCore/PrimaryKeyed.swift")
4.	While evaluating request TypeCheckFunctionBodyRequest(StructuredQueriesCore.(file).TableDraft extension._@/_playground/swift-structured-queries/Sources/StructuredQueriesCore/PrimaryKeyed.swift:30:29)
5.	While type-checking statement at [/_playground/swift-structured-queries/Sources/StructuredQueriesCore/PrimaryKeyed.swift:30:29 - line:32:3] RangeText="{
    SQLQueryExpression("\(PrimaryTable.self[keyPath: keyPath])")
  "
6.	While type-checking statement at [/_playground/swift-structured-queries/Sources/StructuredQueriesCore/PrimaryKeyed.swift:31:5 - line:31:64] RangeText="SQLQueryExpression("\(PrimaryTable.self[keyPath: keyPath])""
7.	While type-checking-target starting at /_playground/swift-structured-queries/Sources/StructuredQueriesCore/PrimaryKeyed.swift:31:5

Checklist

  • I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue or discussion.

Expected behavior

The project builds

Actual behavior

Apple Swift version 6.2 (swift-6.2-RELEASE)
2.	Compiling with the current language version
3.	While evaluating request TypeCheckPrimaryFileRequest(source_file "/_playground/swift-structured-queries/Sources/StructuredQueriesCore/PrimaryKeyed.swift")
4.	While evaluating request TypeCheckFunctionBodyRequest(StructuredQueriesCore.(file).TableDraft extension._@/_playground/swift-structured-queries/Sources/StructuredQueriesCore/PrimaryKeyed.swift:30:29)
5.	While type-checking statement at [/_playground/swift-structured-queries/Sources/StructuredQueriesCore/PrimaryKeyed.swift:30:29 - line:32:3] RangeText="{
    SQLQueryExpression("\(PrimaryTable.self[keyPath: keyPath])")
  "
6.	While type-checking statement at [/_playground/swift-structured-queries/Sources/StructuredQueriesCore/PrimaryKeyed.swift:31:5 - line:31:64] RangeText="SQLQueryExpression("\(PrimaryTable.self[keyPath: keyPath])""
7.	While type-checking-target starting at /_playground/swift-structured-queries/Sources/StructuredQueriesCore/PrimaryKeyed.swift:31:5

Reproducing project

Check out main and run swift build using Swift 6.2

Structured Queries version information

0.23.1 (740c49c)

Destination operating system

macOS 15.7.1

Xcode version information

N/A

Swift Compiler version information

Apple Swift version 6.2 (swift-6.2-RELEASE)
Target: arm64-apple-macosx15.0
Build config: +assertions

Metadata

Metadata

Assignees

No one assigned

    Labels

    apple bugSomething isn't working due to a language/framework bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions