Alamofire / AlamofireImage

AlamofireImage is an image component library for Alamofire
MIT License
3.99k stars 523 forks source link

SPM support not working with 4.0.2 #406

Closed grahamburgsma closed 4 years ago

grahamburgsma commented 4 years ago

What did you do?

Add https://github.com/Alamofire/AlamofireImage.git as an SPM dependency.

What did you expect to happen?

Package would be added without errors.

What happened instead?

I get this error from Xcode. I tried resetting the SPM cache, but same error.

Package Resolution Failed
.../SourcePackages/checkouts/AlamofireImage submodule update --init --recursive output:
    fatal: No url found for submodule path 'Carthage/Checkouts/Alamofire' in .gitmodules

Looks like 4.0.2 meant to solve this but still has some issues.

jshier commented 4 years ago

Dang it, thought this was removed. I've removed it on master, I'll do another release soon.

grahamburgsma commented 4 years ago

Thanks, it's working on master now 🎉

BrianDoig commented 4 years ago

This is not working for me still. I have a package that has the following that I open as the Xcode project.

let package = Package(
    name: "Foo",
    platforms: [
        .macOS(.v10_12),
        .iOS(.v10),
        .tvOS(.v10),
        .watchOS(.v3)
    ],
    products: [
        .library(
            name: "Foo",
            type: .dynamic,
            targets: ["Foo"]),
    ],
    dependencies: [
        .package(url: "https://github.com/Alamofire/Alamofire.git",
        from: "5.0.2"),
        .package(url: "https://github.com/Alamofire/AlamofireImage.git", from: "4.0.2"),
    ],
    targets: [
         .target(
            name: "Foo",
            dependencies: [
                "Alamofire",
                "AlamofireImage",
                ]),
        .testTarget(
            name: "FooTests",
            dependencies: ["Foo"]),
    ],
    swiftLanguageVersions: [.v5]
)

The Xcode project has the following error when it tries to process the package dependencies.

Showing All Messages : terminated(128): /Applications/Xcode.app/Contents/Developer/usr/bin/git -C /Users/doig/Library/Developer/Xcode/DerivedData/iOSLibs-CoreTools-dbzremeabiuuqjfxjzvhuxfirwgn/SourcePackages/checkouts/AlamofireImage submodule update --init --recursive output: fatal: No url found for submodule path 'Carthage/Checkouts/Alamofire' in .gitmodules

jshier commented 4 years ago

Yes, you'll need to point to the master branch until we ship 4.0.3.

treatwell-ignasurbonas commented 4 years ago

Hi, Just to add. AlamofireImage in Carthage is also seems to be broken.

*** Fetching AlamofireImage
*** Fetching Moya
*** Fetching Alamofire
*** Fetching RxSwift
*** Fetching ReactiveSwift
*** Checking out AlamofireImage at "4.0.2"
*** Checking out Alamofire at "5.0.2"
*** Checking out RxSwift at "5.1.0"
*** Checking out Moya at "14.0.0"
*** Checking out ReactiveSwift at "6.2.1"
*** xcodebuild output can be found in /var/folders/bw/mbbsq9bd4yj8xnk2y0lbc95m0000gq/T/carthage-xcodebuild.hmC1ML.log
*** Downloading RxSwift.framework binary at "Catalyst"
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
*** Building scheme "AlamofireImage iOS" in AlamofireImage.xcworkspace
Build Failed
    Task failed with exit code 65:
    /usr/bin/xcrun xcodebuild -workspace /Users/ignasurbonas/Developer/TestCarthage/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcworkspace -scheme AlamofireImage\ iOS -configuration Release -derivedDataPath /Users/ignasurbonas/Library/Caches/org.carthage.CarthageKit/DerivedData/11.3.1_11C504/AlamofireImage/4.0.2 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/bw/mbbsq9bd4yj8xnk2y0lbc95m0000gq/T/AlamofireImage SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/ignasurbonas/Developer/TestCarthage/Carthage/Checkouts/AlamofireImage)

I tried to point to master branch and it worked 👍

jshier commented 4 years ago

This has been fixed in 4.0.3. Thanks for the report!