phimage / Erik

Erik is an headless browser based on WebKit. An headless browser allow to run functional tests, to access and manipulate webpages using javascript.
http://phimage.github.io/Erik/
MIT License
596 stars 47 forks source link

Package Resolution Errors with Erik / Filekit #51

Open barrymcbride opened 4 years ago

barrymcbride commented 4 years ago

Hey,

Still trying to incorporate Erik into my project, and am running into package resolution errors on XCode 11.4. I'm running a Kitura/Postgresql/Swift-Kuery-ORM project and get the following message when trying to add Erik:

because Erik >=5.1.0 depends on FileKit 6.0.0..<7.0.0 and Configuration >=3.0.0 depends on FileKit 0.0.1..<1.0.0, Erik is incompatible with Configuration. And because Swift-cfenv >=6.0.0 depends on Configuration 3.0.0..<4.0.0 and every version of Kitura-OpenAPI depends on Swift-cfenv 6.0.0..<7.0.0, Erik is incompatible with Kitura-OpenAPI. And because root depends on Kitura-OpenAPI 1.1.1..<2.0.0 and root depends on Erik 5.1.0..<5.2.0, version solving failed.

Looks like a wide disparity between https://github.com/IBM-Swift/Configuration and Erik, but I'm still new at this and might be confused.

mesopelagique commented 4 years ago

Hi, phimage here (at work with work account) not the same FileKit https://github.com/IBM-Swift/Configuration/blob/master/Package.swift#L33 (https://github.com/IBM-Swift/FileKit.git) https://github.com/phimage/Erik/blob/master/Package.swift#L12 (https://github.com/nvzqz/FileKit -> I am maintainer too) too project with same name, I have never try to work with that

IBM use name already registered in cocoapod ;( https://cocoapods.org/pods/FileKit

I have a project Prephirences for configuration but not exactly the same things

barrymcbride commented 4 years ago

Unfortunately, it conflicts with CloudEnvironment as well: https://github.com/IBM-Swift/CloudEnvironment.git, which also uses Filekit

I tried taking the SPM to version 5.2 in the hopes that would help, but it doesn't allow us to escape dependency hell, either. At this point, at least, the SPM doesn't seem to be able to handle these name conflicts.

Looking like I'm out of luck. Feel free to close if you agree.

Here's the entire package.swift if that helps, minus Erik.git

`// swift-tools-version:5.2 import PackageDescription

let package = Package( name: "obr02",

dependencies: [
  .package(url: "https://github.com/IBM-Swift/Kitura.git", .upToNextMinor(from: "2.8.1")),
  .package(url: "https://github.com/IBM-Swift/HeliumLogger.git", from: "1.7.1"),
  .package(url: "https://github.com/RuntimeTools/SwiftMetrics.git", from: "2.0.0"),
  .package(url: "https://github.com/IBM-Swift/Health.git", from: "1.0.0"),
  .package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.0.0"),
  .package(name: "KituraOpenAPI", url: "https://github.com/IBM-Swift/Kitura-OpenAPI.git", from: "1.1.1"),
  .package(name: "SwiftKueryORM",url: "https://github.com/IBM-Swift/Swift-Kuery-ORM", from: "0.6.0"),
  .package(name: "SwiftKueryPostgreSQL", url: "https://github.com/IBM-Swift/Swift-Kuery-PostgreSQL", from: "2.1.1"),
  .package(name: "Kitura-CredentialsHTTP", url: "https://github.com/IBM-Swift/Kitura-CredentialsHTTP.git", from: "2.1.3"),
  .package(url: "https://github.com/IBM-Swift/CloudEnvironment.git", from: "9.0.0"),

        ],
        targets: [
          .target(name: "obr02", dependencies: [.target(name: "Application"), "Kitura" , "HeliumLogger",]),
          .target(name: "Application",
                  dependencies: [
                    "Kitura",
                    "CloudEnvironment",
                    "SwiftSoup",
                    "SwiftMetrics",
                    "Health", "KituraOpenAPI",
                    "SwiftKueryPostgreSQL",
                    "SwiftKueryORM",
                    .product(name: "CredentialsHTTP", package: "Kitura-CredentialsHTTP")

                        ]
                    ),
          .testTarget(name: "ApplicationTests", dependencies: [.target(name: "Application"), "Kitura", "HeliumLogger"]
            )
        ]
    )

`

mesopelagique commented 4 years ago

I do not understand your package swift file; not correctly formatted, add swift to code block for coloration

barrymcbride commented 4 years ago

Hey... thanks for responding. I actually upgraded to 5.2 which allows for some package naming in the hopes that it would fix things. It didn't. I'm now getting this error back in 5.1 Swift, trying to resolve the updated package.swift:

because CloudEnvironment >=6.0.0 depends on Swift-cfenv 6.0.0..<7.0.0 and Swift-cfenv >=6.0.0 depends on Configuration 3.0.0..<4.0.0, CloudEnvironment >=6.0.0 requires Configuration 3.0.0..<4.0.0. And because Configuration >=3.0.0 depends on FileKit 0.0.1..<1.0.0 and Erik >=5.1.0 depends on FileKit 6.0.0..<7.0.0, CloudEnvironment is incompatible with Erik. And because root depends on Erik 5.1.0..<5.2.0 and root depends on CloudEnvironment 9.0.0..<10.0.0, version solving failed.

// swift-tools-version:5.1
import PackageDescription

let package = Package(
    name: "obr03",

    dependencies: [
      .package(url: "https://github.com/IBM-Swift/Kitura.git", .upToNextMinor(from: "2.8.1")),
      .package(url: "https://github.com/IBM-Swift/HeliumLogger.git", from: "1.7.1"),
      .package(url: "https://github.com/RuntimeTools/SwiftMetrics.git", from: "2.0.0"),
      .package(url: "https://github.com/IBM-Swift/Health.git", from: "1.0.0"),
      .package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.0.0"),
      .package(url: "https://github.com/IBM-Swift/Kitura-OpenAPI.git", from: "1.1.1"),
      .package(url: "https://github.com/IBM-Swift/Swift-Kuery-ORM", from: "0.6.0"),
      .package(url: "https://github.com/phimage/Erik.git", .upToNextMinor(from: "5.1.0")),
      .package(url: "https://github.com/IBM-Swift/Swift-Kuery-PostgreSQL", from: "2.1.1"),
      .package(url: "https://github.com/IBM-Swift/Kitura-CredentialsHTTP.git", from: "2.1.3"),
      .package(url: "https://github.com/IBM-Swift/CloudEnvironment.git", from: "9.0.0"),
      .package(url: "https://github.com/IBM-Swift/Kitura-StencilTemplateEngine.git", .upToNextMinor(from: "1.11.0")),

            ],
    targets: [
      .target(name: "obr03", dependencies: [.target(name: "Application"), "Kitura" , "HeliumLogger",]),
      .target(name: "Application",
             dependencies: [
                        "Kitura",
                        "CloudEnvironment",
                        "SwiftSoup",
                        "SwiftMetrics",
                        "Health", "KituraOpenAPI",
                        "SwiftKueryPostgreSQL",
                        "SwiftKueryORM","KituraStencil",
                        .product(name: "CredentialsHTTP", package: "Kitura-CredentialsHTTP")
                            ]
                        ),
        .testTarget(name: "ApplicationTests", dependencies: [.target(name: "Application"), "Kitura", "HeliumLogger"]
                )
            ]
        )
barrymcbride commented 4 years ago

For some reason, the code function refuses to accept the first four lines of my package.swift. Sorry for that... formatting issues. I can email it to you if that helps.

I just think we're in dependency hell because of the dual filekits.