stencilproject / Stencil

Stencil is a simple and powerful template language for Swift.
https://stencil.fuller.li
BSD 2-Clause "Simplified" License
2.35k stars 224 forks source link

Unable to include both Commander and Stencil #157

Closed factotvm closed 6 years ago

factotvm commented 6 years ago

I saw #101, and this may be related, but I wanted to open a new issue because I'm not exactly sure that the issue is the same. It should be noted, this is Swift 4.

Steps

  1. mkdir CommanderStencil && cd CommanderStencil
  2. swift package init --type executable
  3. Update the Package.swift:
    
    // swift-tools-version:4.0
    import PackageDescription

let package = Package( name: "CommanderStencil", dependencies: [ .package(url: "https://github.com/kylef/Commander", from: "0.8.0"), .package(url: "https://github.com/kylef/Stencil", from: "0.10.0"), ], targets: [ .target( name: "CommanderStencil", dependencies: ["Commander", "Stencil"]), ] )

4. `swift package resolve`

### Expected

* Development bliss

### Actual

Fetching https://github.com/kylef/Stencil Fetching https://github.com/kylef/Commander Fetching https://github.com/kylef/Spectre.git Fetching https://github.com/kylef/PathKit.git error: dependency graph is unresolvable; found these conflicting requirements:

Dependencies: https://github.com/kylef/Commander @ 0.8.0..<1.0.0

rjchatfield commented 6 years ago

I see the same issue. Seems that Commander needs Spectre 0.8.0, while Stencil requires 0.7.2 (the last Swift 3 version) and can not use 0.8.0.

ilyapuchka commented 6 years ago

I think I was able to resolve this issue in #184 . I checked it by specifying this branch instead of version requirement:

// swift-tools-version:4.0
import PackageDescription

let package = Package(
    name: "CommanderStencil",
    dependencies: [
        .package(url: "https://github.com/kylef/Commander", from: "0.8.0"),
        .package(url: "https://github.com/kylef/Stencil", .branch("package-update")),
    ],
    targets: [
        .target(
            name: "CommanderStencil",
            dependencies: ["Commander", "Stencil"]),
    ]
)
$  swift package resolve
Fetching https://github.com/kylef/Stencil
Fetching https://github.com/kylef/Spectre.git
Fetching https://github.com/kylef/PathKit.git
Fetching https://github.com/kylef/Commander
Cloning https://github.com/kylef/Spectre.git
Resolving https://github.com/kylef/Spectre.git at 0.8.0
Cloning https://github.com/kylef/Commander
Resolving https://github.com/kylef/Commander at 0.8.0
Cloning https://github.com/kylef/Stencil
Resolving https://github.com/kylef/Stencil at package-update
Cloning https://github.com/kylef/PathKit.git
Resolving https://github.com/kylef/PathKit.git at 0.9.0