Skip to content

InternalError on packages with -latest component in their version #7658

Closed
@stephencelis

Description

@stephencelis

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

  • Confirmed reproduction steps with SwiftPM CLI.

Description

The following package fails to resolve:

// swift-tools-version: 6.0

import PackageDescription

let package = Package(
  name: "FigureOutDependencies",
  platforms: [.macOS(.v10_15)],
  dependencies: [
    .package(url: "https://github.com/pointfreeco/swift-snapshot-testing", exact: "1.16.1"),
    .package(url: "https://github.com/apple/swift-syntax", from: "600.0.0-latest"),
  ],
  swiftLanguageVersions: [.v6]
)

But removing the swiftLanguageVersions parameter causes it to resolve just fine.

Expected behavior

I expect the package to resolve in both Swift 5 and 6 language modes.

Actual behavior

Failure to resolve:

🛑 Showing Recent Issues
InternalError(description: "Internal error. Please file a bug at https://github.com/apple/swift-package-manager/issues with this info. Expected root cause {swift-snapshot-testing[everything] 1.16.1, ¬swift-syntax[everything] 508.0.1..<601.0.0} to almost satisfy the current partial solution:\n * [Decision 0: figureoutdependencies[everything] 1.0.0]\n * [Derivation: swift-syntax[everything] 600.0.0-latest..<601.0.0 ← {figureoutdependencies[everything] 1.0.0, ¬swift-syntax[everything] 600.0.0-latest..<601.0.0}]\n * [Derivation: swift-snapshot-testing[everything] 1.16.1..<2.0.0 ← {figureoutdependencies[everything] 1.0.0, ¬swift-snapshot-testing[everything] 1.16.1..<2.0.0}]\n * [Derivation: ¬swift-snapshot-testing[everything] 1.16.2..<2.0.0 ← {swift-snapshot-testing[everything] 1.16.2..<2.0.0}]\n")

Steps to reproduce

Create a new package with the above Package.swift file, or simply download and open FigureOutDependencies.zip.

Swift Package Manager version/commit hash

Swift Package Manager - Swift 6.0.0-dev (Xcode 16 beta 1)

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

swift-driver version: 1.109.2 Apple Swift version 6.0 (swiftlang-6.0.0.3.300 clang-1600.0.20.10)
Target: arm64-apple-macosx14.0
Darwin MacBook-Pro.lan 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020 arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions