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

[SR-3503] Poor diagnostic when git command fails #5141

Closed
Bouke opened this issue Dec 28, 2016 · 1 comment
Closed

[SR-3503] Poor diagnostic when git command fails #5141

Bouke opened this issue Dec 28, 2016 · 1 comment
Assignees
Labels

Comments

@Bouke
Copy link
Contributor

Bouke commented Dec 28, 2016

Previous ID SR-3503
Radar None
Original Reporter @Bouke
Type Bug
Status Resolved
Resolution Invalid
Environment

Apple Swift version 3.0-dev (LLVM 217eb6c2b6, Clang 34a98ce92e, Swift 1eb5648c46)
Target: x86_64-apple-macosx10.9

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee @Bouke
Priority Medium

md5: 5f4a02bfc553df47e97f78aff83c2989

Issue Description:

While I was running {swift package update --repin} I switch wifi networks. The following error message was thrown. I think a better error message should be provided, and the {try!} probably replaced with a safer expression.

fatal error: 'try!' expression unexpectedly raised an error: exit(128): git -C /Users/bouke/Developer/TermDraw/.build/repositories/CNCurses.git--4832162675315633651 fetch --tags: file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/stdlib/public/core/ErrorType.swift, line 182
Current stack trace:
0    libswiftCore.dylib                 0x000000010556f8d0 swift_reportError + 125
1    libswiftCore.dylib                 0x000000010558af50 _swift_stdlib_reportFatalErrorInFile + 100
2    libswiftCore.dylib                 0x0000000105376ac0 (_assertionFailed(StaticString, String, StaticString, UInt, flags : UInt32) -> Never).(closure #​1).(closure #​1).(closure #​1) + 124
3    libswiftCore.dylib                 0x0000000105536fd0 partial apply for (_assertionFailed(StaticString, String, StaticString, UInt, flags : UInt32) -> Never).(closure #​1).(closure #​1).(closure #​1) + 93
4    libswiftCore.dylib                 0x0000000105376160 specialized specialized StaticString.withUTF8Buffer<A> ((UnsafeBufferPointer<UInt8>) -> A) -> A + 342
5    libswiftCore.dylib                 0x00000001055394f0 partial apply for (_assertionFailed(StaticString, String, StaticString, UInt, flags : UInt32) -> Never).(closure #&#8203;1).(closure #&#8203;1) + 144
6    libswiftCore.dylib                 0x0000000105376670 specialized specialized String._withUnsafeBufferPointerToUTF8<A> ((UnsafeBufferPointer<UInt8>) throws -> A) throws -> A + 126
7    libswiftCore.dylib                 0x00000001054fa970 partial apply for (_assertionFailed(StaticString, String, StaticString, UInt, flags : UInt32) -> Never).(closure #&#8203;1) + 185
8    libswiftCore.dylib                 0x0000000105376160 specialized specialized StaticString.withUTF8Buffer<A> ((UnsafeBufferPointer<UInt8>) -> A) -> A + 342
9    libswiftCore.dylib                 0x00000001054b0af0 specialized _assertionFailed(StaticString, String, StaticString, UInt, flags : UInt32) -> Never + 144
10   libswiftCore.dylib                 0x00000001053a0520 swift_unexpectedError_merged + 289
11   swift-package                      0x000000010504e810 RepositoryManager.(lookup(repository : RepositorySpecifier, completion : (Result<RepositoryManager.RepositoryHandle, AnyError>) -> ()) -> ()).(closure #&#8203;1).(closure #&#8203;1) + 2535
12   swift-package                      0x000000010504f580 thunk + 39
13   libdispatch.dylib                  0x00007fff9590b0b0 _dispatch_client_callout + 8
14   libdispatch.dylib                  0x00007fff9590bc9f _dispatch_barrier_sync_f_invoke + 83
15   swift-package                      0x000000010504e660 RepositoryManager.(lookup(repository : RepositorySpecifier, completion : (Result<RepositoryManager.RepositoryHandle, AnyError>) -> ()) -> ()).(closure #&#8203;1) + 348
16   swift-package                      0x000000010504f580 thunk + 39
17   Foundation                         0x00007fff81d982d2 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
18   Foundation                         0x00007fff81d97f57 -[NSBlockOperation main] + 101
19   Foundation                         0x00007fff81d96444 -[__NSOperationInternal _start:] + 672
20   Foundation                         0x00007fff81d924d2 __NSOQSchedule_f + 201
21   libdispatch.dylib                  0x00007fff9590b0b0 _dispatch_client_callout + 8
22   libdispatch.dylib                  0x00007fff95921765 _dispatch_queue_serial_drain + 896
23   libdispatch.dylib                  0x00007fff959138c3 _dispatch_queue_invoke + 1046
24   libdispatch.dylib                  0x00007fff9590cc94 _dispatch_root_queue_drain + 476
25   libdispatch.dylib                  0x00007fff9590cbe4 _dispatch_worker_thread3 + 99
26   libsystem_pthread.dylib            0x00007fff95b581ff _pthread_wqthread + 1299
27   libsystem_pthread.dylib            0x00007fff95b581e0 start_wqthread + 13
[1]    42807 illegal hardware instruction  swift package update --repin
@ankitspd
Copy link
Member

The repository manager doesn't have a try! anymore, it shouldn't crash like this anymore.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants