Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carthage build fails for version 5.0.0 #57

Open
marioradonic opened this issue Jan 27, 2020 · 4 comments
Open

Carthage build fails for version 5.0.0 #57

marioradonic opened this issue Jan 27, 2020 · 4 comments

Comments

@marioradonic
Copy link

I've been unsuccessfully trying to add this project as a Carthage dependency.
In the console I get:

*** Building scheme "DynamicColor" in DynamicColorExample.xcodeproj
Build Failed
	Task failed with exit code 65:
   ...

And the file clearly prints out the error:

/Users/mario/Projects/tests/DCTest/Carthage/Checkouts/DynamicColor/Sources/SwiftUIColor.swift:30:18: error: use of undeclared type 'Color'
public extension Color {
                 ^~~~~

** ARCHIVE FAILED **


The following build commands failed:
	CompileSwift normal arm64
	CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
	CompileSwift normal armv7
(3 failures)

To Reproduce
Steps to reproduce the behavior:

  1. Add github "yannickl/DynamicColor" >= 5.0.01 in Cartfile
  2. Run carthage bootstrap/update
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Smartphone (please complete the following information):

  • Carthage version: 0.34.0
  • MacOS: tried on Mojave and Catalina

Additional context
I did try to debug the error, but I failed. The line in question is using the struct from SwiftUI, and it's enclosed with @available attribute, but still it somehow fails 🤷‍♂

@robert4381
Copy link

+1

@ladmini
Copy link

ladmini commented Feb 6, 2020

Any update? It looks like the same error.

/Carthage/Checkouts/DynamicColor/Sources/SwiftUIColor.swift:27:8: error: no such module 'SwiftUI'
import SwiftUI
^

** ARCHIVE FAILED **

The following build commands failed:
CompileSwift normal armv7
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
CompileSwift normal arm64

@t0rst
Copy link

t0rst commented Feb 6, 2020

In a release build, I get...

~/Dev/DynamicColor/Sources/SwiftUIColor.swift:30:18: error: use of undeclared type 'Color'
public extension Color {

My app deployment target is iOS 11, but Color is not available until iOS 13 — swift header with Xcode 11.3:

@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
public struct Color : Hashable, CustomStringConvertible {

I would guess Carthage build is just obscuring the underlying cause. (The project I am working on is using CocoaPods.)

@t0rst
Copy link

t0rst commented Feb 7, 2020

I submitted Issue #59: Broken release builds – misconfigured SwiftUI dependency — it's not a Carthage problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants