Argo icon indicating copy to clipboard operation
Argo copied to clipboard

no such module 'Runes'

Open edwardaux opened this issue 10 years ago • 23 comments

I have Argo embedded within my existing project (and have had for ages). I'm finally getting around to updating to Swift 3.

I updated my project's Cartfileto point to Argo master (instead of 3.1.0):

github "thoughtbot/Argo" "master"

and run carthage update --use-submodules. This successfully fetches Argo and Runes. As you can see from the log below, Runes compiles OK and I can see the artifacts in the Carthage/Build/XXX folders. However, when it tried to build Argo, I get an error saying that it can't find the Runes module.

There is a mention of a similar problem in #407 (which I don't think is related to the PR... just a similar problem).

I've tried a bunch of carthage combos (bootstrap, build, update, et al), but just can't get a working build.

I'm still digging through the logs, but any thoughts would be great.

Error Messages

*** xcodebuild output can be found in /var/folders/p6/xcv59nqd4wv0y6hwpm3q16m40000gn/T/carthage-xcodebuild.7gtojh.log
*** Building scheme "Runes-tvOS" in Runes.xcodeproj
*** Building scheme "Runes-Mac" in Runes.xcodeproj
*** Building scheme "Runes-iOS" in Runes.xcodeproj
*** Building scheme "Runes-watchOS" in Runes.xcodeproj
*** Building scheme "Argo-watchOS" in Argo.xcworkspace
** BUILD FAILED **


The following build commands failed:
    CompileSwift normal armv7k
    CompileSwiftSources normal armv7k com.apple.xcode.tools.swift.compiler
    Ld /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Products/Release-watchos/Argo.framework/Argo normal armv7k
    GenerateDSYMFile /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Products/Release-watchos/Argo.framework.dSYM /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Products/Release-watchos/Argo.framework/Argo
(4 failures)
/Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Types/Decoded/Applicative.swift:1:8: error: no such module 'Runes'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: cannot parse the debug map for "/Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Products/Release-watchos/Argo.framework/Argo": No such file or directory
A shell task failed with exit code 65:
** BUILD FAILED **


The following build commands failed:
    CompileSwift normal armv7k
    CompileSwiftSources normal armv7k com.apple.xcode.tools.swift.compiler
    Ld /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Products/Release-watchos/Argo.framework/Argo normal armv7k
    GenerateDSYMFile /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Products/Release-watchos/Argo.framework.dSYM /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Products/Release-watchos/Argo.framework/Argo
(4 failures)

Argo Version

master (4b57653f7760bd3eedfd1c1fbc821bde191e603d)

Dependency Manager

Carthage

edwardaux avatar Sep 14 '16 22:09 edwardaux

What version of Carthage are you using? Try updating to 0.18?

gfontenot avatar Sep 14 '16 23:09 gfontenot

I was on 0.11.0. Just bumped up to 0.18, but no change. If I look at the log, this is the command that can't find Runes (I've split it over multiple lines for easier reading):

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift
-frontend
-emit-bc 
/Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Types/Decoded/Applicative.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Types/StandardTypes.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Types/Decoded/Alternative.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Types/Decodable.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Functions/decode.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Extensions/NSNumber.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Extensions/Dictionary.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Types/Decoded/FailureCoalescing.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Types/Decoded/Decoded.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Types/DecodeError.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Types/JSON.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Functions/catDecoded.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Operators/Decode.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Extensions/RawRepresentable.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Types/Decoded/Monad.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Types/Decoded/Functor.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Functions/sequence.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Operators/Argo.swift /Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo/Argo/Functions/flatReduce.swift
-target armv7k-apple-watchos2.0
-enable-objc-interop
-sdk /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk
-I /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Products/Release-watchos
-F /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Products/Release-watchos
-application-extension
-g
-module-cache-path /Users/edwardsc/Library/Developer/Xcode/DerivedData/ModuleCache
-serialize-debugging-options
-Xcc
-I/Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/swift-overrides.hmap
-Xcc
-iquote
-Xcc /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Argo-generated-files.hmap
-Xcc
-I/Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Argo-own-target-headers.hmap
-Xcc
-I/Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Argo-all-non-framework-target-headers.hmap
-Xcc
-ivfsoverlay
-Xcc /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/all-product-headers.yaml
-Xcc
-iquote
-Xcc /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Argo-project-headers.hmap
-Xcc
-I/Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Products/Release-watchos/include
-Xcc
-I/Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/DerivedSources/armv7k
-Xcc
-I/Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/DerivedSources
-Xcc
-working-directory/Users/edwardsc/dev/Ogra/Carthage/Checkouts/Argo
-emit-module-doc-path /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/Argo.swiftdoc
-O
-module-name Argo
-emit-module-path /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/Argo.swiftmodule
-emit-objc-header-path /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/Argo-Swift.h
-serialize-diagnostics-path /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/Applicative.dia
-emit-dependencies-path /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/Applicative.d
-num-threads 8
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/Applicative.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/StandardTypes.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/Alternative.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/Decodable.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/decode-6A3F63928A20CA7.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/NSNumber.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/Dictionary.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/FailureCoalescing.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/Decoded.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/DecodeError.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/JSON.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/catDecoded.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/Decode-5F09601C9204BC80.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/RawRepresentable.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/Monad.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/Functor.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/sequence.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/Argo.bc
-o /Users/edwardsc/Library/Developer/Xcode/DerivedData/Argo-asybjaazisryjmeuwabufbberqcz/Build/Intermediates/Argo.build/Release-watchos/Argo-watchOS.build/Objects-normal/armv7k/flatReduce.bc

edwardaux avatar Sep 14 '16 23:09 edwardaux

I've compared the individual command for the above when compiling Argo 3.1 vs. master, and the only meaningful difference is that 3.1 explicitly compiles in Runes.swift, whereas master doesn't.

^^ This was a technique that I hadn't seen before. It looks like you are using Carthage to checkout the dependencies, but instead of linking the Runes framework the Runes files are directly compiled into the Argo module (ie. they are listed in the Compile Sources section of the Build Phases for Argo)

Anyhoo... it looks like in the new version that you are no longer adding the Runes files into the Compile Sources section. However, it doesn't look like there are any compensating changes to the Search Frameworks settings to be able to find the Runes framework.

Or, possibly, I've totally misunderstood how the Argo project is structured :-)

edwardaux avatar Sep 14 '16 23:09 edwardaux

So Argo used to hide the Runes dependency by compiling Runes.swift into Argo directly. We recently went back to exposing Runes as a legit dependency because of issues we were running into with this technique. What should be happening now (with Carthage 0.18) is that Argo should be finding the checked out Runes dependency and using that to build.

There's a possibility that this is just a single target that's misconfigured? Does this happen when trying to build the iOS target? Or only when you're building the watch target?

gfontenot avatar Sep 15 '16 16:09 gfontenot

Alas all 4 targets have the same problem.

edwardaux avatar Sep 15 '16 21:09 edwardaux

Wild. I can't reproduce this locally (with Carthage 0.18) at all.

gfontenot avatar Sep 15 '16 23:09 gfontenot

:sadface: once I'm back somewhere with decent internet connection I'll try to reproduce in a new project

edwardaux avatar Sep 16 '16 02:09 edwardaux

@gfontenot I think $(PROJECT_DIR)/Carthage/Build/** should be added to the Framework Search Paths.

seanwoodward avatar Sep 16 '16 20:09 seanwoodward

That's what we're currently trying to avoid (and what shouldn't be necessary with the behavior introduced in Carthage 0.18)

gfontenot avatar Sep 16 '16 20:09 gfontenot

To be clear: Adding that would fix Carthage installs but would cause issues for users trying to use git submodules.

gfontenot avatar Sep 16 '16 20:09 gfontenot

I have to jump through many hoops to get Argo to build using Carthage and Xcode 8. Setting the framework search path was just one. Perhaps I'm doing something wrong.

seanwoodward avatar Sep 16 '16 22:09 seanwoodward

We're currently using the expected workflow, without modification, to successfully build our iOS template that includes Argo as a dependency on CI. This requires Carthage 0.18, which was released last weekend, but I'm really interested to find out more about why this isn't working properly for y'all.

gfontenot avatar Sep 17 '16 02:09 gfontenot

Could you upload a copy of a project that's exhibiting the issue for you? Or upload your Cartfile, Cartfile.resolved, and Carthage/ directory? (If you can reproduce it with Argo as the only dependency, that'd be a big plus.)

mdiep avatar Sep 17 '16 02:09 mdiep

I had the same problem, but I deleted the folders Carthage/Checkouts/Argo and Carthage/Checkouts/Runes then it worked for me.

josete89 avatar Sep 17 '16 12:09 josete89

Don't need to upload anything. Put a single line in the Cartfile: github "thoughtbot/Argo"

Then run carthage update --use-submodules --no-use-binaries.

Voila, error: no such module 'Runes'

seanwoodward avatar Sep 17 '16 14:09 seanwoodward

This is actually the same issue as discussed here.

aschuch avatar Sep 17 '16 15:09 aschuch

Ah, I see.

@mdiep I believe this is an issue with the --use-submodules flag. It doesn't look like the checkouts are being symlinked under that case.

❯ ls Carthage/Checkouts/Argo/Carthage
Build

I was able to verify this with an empty git dir and this Cartfile:

github "thoughtbot/Argo" "master"

Meanwhile, without the --use-submodules flag, the checkouts are symlinked like we expect and the build succeeds:

❯ ls Carthage/Checkouts/Argo/Carthage
Build     Checkouts

gfontenot avatar Sep 17 '16 16:09 gfontenot

The --no-use-binaries flag doesn't matter AFAICT

gfontenot avatar Sep 17 '16 16:09 gfontenot

After updating to Carthage 0.18, I can actually confirm building Argo successfully using carthage update --no-use-binaries --use-ssh --platform iOS,watchOS,tvOS 👍

aschuch avatar Sep 17 '16 16:09 aschuch

Thanks everyone! I've opened https://github.com/Carthage/Carthage/issues/1484 to track this. I'll try to get to it when I can, but if someone wanted to open a PR, that'd be the quickest way to get it fixed.

mdiep avatar Sep 17 '16 17:09 mdiep