From @henrysaintjuste:
Totally unrelated, but looking to install some dependencies for Xcode 11 & Swift 5.1
I cloned the Carthage repo and ran make install, but got an error. Below is the error output, could you point me in the right direction to successfully run make install?
:0: error: fatal error encountered during compilation; please file a bug report with your project and the crash log
:0: note: Type variable id overflow
Stack dump:
While type-checking 'evaluate(_:)' (at /Users/user/Workspaces/Carthage/Source/carthage/Update.swift:64:10)
While type-checking statement at [/Users/user/Workspaces/Carthage/Source/carthage/Update.swift:64:103 - line:77:3] RangeText="{
let buildDescription = "skip the building of dependencies after updatingn(ignored if --no-checkout option is present)"
let dependenciesUsage = "the dependency names to update, checkout and build"
return curry(Options.init)
<*> mode <| Option(key: "checkout", defaultValue: true, usage: "skip the checking out of dependencies after updating")
<*> mode <| Option(key: "build", defaultValue: true, usage: buildDescription)
<*> mode <| Option(key: "verbose", defaultValue: false, usage: "print xcodebuild output inline (ignored if --no-build option is present)")
<*> mode <| Option(key: "log-path", defaultValue: nil, usage: "path to the xcode build output. A temporary file is used by default")
<*> mode <| Option(key: "new-resolver", defaultValue: false, usage: "use the new resolver codeline when calculating dependencies. Default is false")
<*> BuildOptions.evaluate(mode, addendum: "\n(ignored if --no-build option is present)")
<*> CheckoutCommand.Options.evaluate(mode, dependenciesUsage: dependenciesUsage)
"
While type-checking statement at [/Users/user/Workspaces/Carthage/Source/carthage/Update.swift:69:4 - line:76:84] RangeText="return curry(Options.init)
<> mode <| Option(key: "checkout", defaultValue: true, usage: "skip the checking out of dependencies after updating")
<> mode <| Option(key: "build", defaultValue: true, usage: buildDescription)
<> mode <| Option(key: "verbose", defaultValue: false, usage: "print xcodebuild output inline (ignored if --no-build option is present)")
<> mode <| Option(key: "log-path", defaultValue: nil, usage: "path to the xcode build output. A temporary file is used by default")
<> mode <| Option(key: "new-resolver", defaultValue: false, usage: "use the new resolver codeline when calculating dependencies. Default is false")
<> BuildOptions.evaluate(mode, addendum: "n(ignored if --no-build option is present)")
<*> CheckoutCommand.Options.evaluate(mode, dependenciesUsage: dependenciesUsage"
While type-checking expression at [/Users/user/Workspaces/Carthage/Source/carthage/Update.swift:69:11 - line:76:84] RangeText="curry(Options.init)
<> mode <| Option(key: "checkout", defaultValue: true, usage: "skip the checking out of dependencies after updating")
<> mode <| Option(key: "build", defaultValue: true, usage: buildDescription)
<> mode <| Option(key: "verbose", defaultValue: false, usage: "print xcodebuild output inline (ignored if --no-build option is present)")
<> mode <| Option(key: "log-path", defaultValue: nil, usage: "path to the xcode build output. A temporary file is used by default")
<> mode <| Option(key: "new-resolver", defaultValue: false, usage: "use the new resolver codeline when calculating dependencies. Default is false")
<> BuildOptions.evaluate(mode, addendum: "n(ignored if --no-build option is present)")
<> CheckoutCommand.Options.evaluate(mode, dependenciesUsage: dependenciesUsage"
0 swift 0x000000010d52a0e3 PrintStackTraceSignalHandler(void) + 51
1 swift 0x000000010d5298b6 SignalHandler(int) + 358
2 libsystem_platform.dylib 0x00007fff7b2cdb5d _sigtramp + 29
3 libsystem_platform.dylib 0x0000000117273b76 _sigtramp + 2616877110
4 libsystem_c.dylib 0x00007fff7b1876a6 abort + 127
5 swift 0x000000010917b2a0 std::__1::unique_ptr
6 swift 0x000000010d4a32e6 llvm::report_fatal_error(llvm::Twine const&, bool) + 278
7 swift 0x000000010d4a31cb llvm::report_fatal_error(char const, bool) + 43
8 swift 0x0000000109bb52e8 swift::constraints::ConstraintSystem::createTypeVariable(swift::constraints::ConstraintLocator, unsigned int) + 408
9 swift 0x0000000109c1bf4c swift::constraints::ConstraintSystem::openGeneric(swift::DeclContext, swift::DeclContext, swift::GenericSignature, bool, swift::constraints::ConstraintLocatorBuilder, llvm::DenseMap
10 swift 0x0000000109c1ce96 swift::constraints::ConstraintSystem::openFunctionType(swift::AnyFunctionType
11 swift 0x0000000109c1e1e9 swift::constraints::ConstraintSystem::getTypeOfReference(swift::ValueDecl, swift::FunctionRefKind, swift::constraints::ConstraintLocatorBuilder, swift::DeclContext) + 1097
12 swift 0x0000000109c20a72 swift::constraints::ConstraintSystem::resolveOverload(swift::constraints::ConstraintLocator, swift::Type, swift::constraints::OverloadChoice, swift::DeclContext) + 802
13 swift 0x0000000109bb4594 swift::constraints::ConstraintSystem::simplifyConstraint(swift::constraints::Constraint const&) + 804
14 swift 0x0000000109bb4c19 swift::constraints::ConstraintSystem::simplifyDisjunctionChoice(swift::constraints::Constraint) + 25
15 swift 0x0000000109bd1099 swift::constraints::DisjunctionStep::attempt(swift::constraints::DisjunctionChoice const&) + 185
16 swift 0x0000000109bd08e3 swift::constraints::BindingStepswift::constraints::DisjunctionChoiceProducer::take(bool) + 595
17 swift 0x0000000109bbb9e4 swift::constraints::ConstraintSystem::solve(llvm::SmallVectorImplswift::constraints::Solution&) + 276
18 swift 0x0000000109bc0a64 swift::constraints::ConstraintSystem::solve(swift::Expr, llvm::SmallVectorImplswift::constraints::Solution&, swift::FreeTypeVariableBinding) + 52
19 swift 0x0000000109bc02b8 swift::constraints::ConstraintSystem::solve(swift::Expr&, swift::Type, swift::ExprTypeCheckListener, llvm::SmallVectorImplswift::constraints::Solution&, swift::FreeTypeVariableBinding) + 9240
20 swift 0x0000000109cb8b02 swift::TypeChecker::typeCheckExpressionImpl(swift::Expr&, swift::DeclContext, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet
21 swift 0x0000000109d69c06 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt, void, void, void, void>::visit(swift::Stmt) + 20678
22 swift 0x0000000109d6ada1 bool (anonymous namespace)::StmtChecker::typeCheckStmtswift::Stmt(swift::Stmt&) + 129
23 swift 0x0000000109d6a833 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt, void, void, void, void>::visit(swift::Stmt) + 23795
24 swift 0x0000000109d64ae1 bool (anonymous namespace)::StmtChecker::typeCheckStmtswift::BraceStmt(swift::BraceStmt&) + 129
25 swift 0x0000000109d645e0 swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl, swift::SourceLoc) + 5440
26 swift 0x0000000109d6c741 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl) + 561
27 swift 0x0000000109d89222 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet
28 swift 0x00000001094868ab swift::CompilerInstance::parseAndCheckTypesUpTo(swift::CompilerInstance::ImplicitImports const&, swift::SourceFile::ASTStage_t)::$_0::operator()(swift::SourceFile&) const + 91
29 swift 0x0000000109485658 swift::CompilerInstance::performSemaUpTo(swift::SourceFile::ASTStage_t) + 5448
30 swift 0x000000010917badf performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef
31 swift 0x0000000109177fa4 swift::performFrontend(llvm::ArrayRef
32 swift 0x0000000109105af3 main + 1219
33 libdyld.dylib 0x00007fff7b0e23d5 start + 1
make: * [installables] Error 1
I clone your repo from https://github.com/Shepherd-Dog/Carthage.git, ran make install and still got the same error. Are there any prerequisite needed for a successful install?
@henrysaintjuste: Sorry I didn't expect you to clone the repo and I just realized that the link I shared wasn't useful. The problem is that the Swift compiler cannot figure what type of thing nil is on this line (line 73):
<*> mode <| Option(key: "log-path", defaultValue: nil, usage: "path to the xcode build output. A temporary file is used by default")
To resolve that issue you can declare a variable that has type information and pass that in instead:
let defaultValue: String? = nil
...
<*> mode <| Option(key: "log-path", defaultValue: defaultValue, usage: "path to the xcode build output. A temporary file is used by default")
Hopefully that makes sense.
@DavidBrunow Thanks man, I appreciate you!
Will open a PR if this persists in future betas.
@DavidBrunow This seems to persist in Xcode 11 beta 5
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still happening on Xcode 11.0b6. Same workaround above fixes the issue. I've reported the issue to the Swift team.
Most helpful comment
@DavidBrunow This seems to persist in Xcode 11 beta 5