RecoverableError.attemptRecovery

Hi community,
I’m working on SR-4405 (stdlib) which needs to: 1) add escaping closure to resultHandler parameter, and then. 2) write a test case to exercise asynchronous handling of the error for attemptRecovery in RecoverableError protocol.
I’m still working on the first step. I’m not sure where exactly I need to look for, but here what I found:
-> ./swift/stdlib/public/SDK/Foundation/NSError.swift
-> ./swift-corelibs-foundation/Foundation/NSError.swift

both files are has the same implementation of the the RecoverableError protocol. So, what I’m asking:
- which RecoverableError’s attemptRecovery should I be adding @escaping parameter to?
- Where and how to write test case?

MEnnabah.

···

On Sep 12, 2017, at 6:59 PM, swift-dev-request@swift.org wrote:

Send swift-dev mailing list submissions to
  swift-dev@swift.org

To subscribe or unsubscribe via the World Wide Web, visit
  https://lists.swift.org/mailman/listinfo/swift-dev
or, via email, send a message with subject or body 'help' to
  swift-dev-request@swift.org

You can reach the person managing the list at
  swift-dev-owner@swift.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of swift-dev digest..."

Today's Topics:

  1. Re: Swift build on ppc64le platform (John McCall)
  2. Unit tests for the Swift project (Alwyn Concessao)
  3. Re: [Swift CI] Build Failure: 0. OSS - Swift Incremental RA -
     Ubuntu 14.04 (master) #507 (Douglas Gregor)
  4. Re: [Swift CI] Build Failure: 0. OSS - Swift Incremental RA -
     Ubuntu 14.04 (master) #507 (Ben Langmuir)

----------------------------------------------------------------------

Message: 1
Date: Mon, 11 Sep 2017 13:21:24 -0400
From: John McCall <rjmccall@apple.com>
To: Meghali Dhoble <dhoblem@us.ibm.com>
Cc: swift-dev <swift-dev@swift.org>
Subject: Re: [swift-dev] Swift build on ppc64le platform
Message-ID: <6AD3F82F-4709-4BA0-A29A-641967DC17C3@apple.com>
Content-Type: text/plain; charset="utf-8"

On Sep 11, 2017, at 8:57 AM, Meghali Dhoble <dhoblem@us.ibm.com> wrote:

Hi John,
No, I haven't made any changes for Clang. What specific changes you think I need to have for Clang?

In lib/Basic/Targets.cpp, you need your target's checkCallingConvention to say that CC_Swift is okay. You also need to make your ABIInfo implementation in lib/CodeGen/TargetInfo.cpp subclass SwiftABIInfo and implement its methods appropriately for what your target supports.

John.

One observation I have for LLVM and Clang that even though I have installed them directly using "apt-get install" ; the build-script looks for the SRC_ROOT/llvm and llvm/tools/clang folders. Also the build-script runs the build on top of these folders.
I understand if we have system installed dependencies then those should be used instead of the building it from source; please correct me if I am wrong here.

PS: As of now I am building using -m option, the build command is: ./utils/build-script -m -R

Thanks,
Meghali

<graycol.gif>John McCall ---09/07/2017 12:29:29 AM---> On Sep 6, 2017, at 3:28 AM, Meghali Dhoble <dhoblem@us.ibm.com> wrote: > Thanks John, for the resp

From: John McCall <rjmccall@apple.com>
To: Meghali Dhoble <dhoblem@us.ibm.com>
Cc: Graydon Hoare <ghoare@apple.com>, swift-dev <swift-dev@swift.org>
Date: 09/07/2017 12:29 AM
Subject: Re: [swift-dev] Swift build on ppc64le platform
Sent by: rjmccall@apple.com

On Sep 6, 2017, at 3:28 AM, Meghali Dhoble <dhoblem@us.ibm.com <mailto:dhoblem@us.ibm.com>> wrote:
Thanks John, for the response.
We have a patch added already for ppc64 support at llvm, however still the failures seen,

Did you change Clang?

John.
I will try to opt for 2nd option and see if that helps.

Thanks,
Meghali

<graycol.gif>John McCall ---08/28/2017 09:59:28 PM---> On Aug 28, 2017, at 9:08 AM, Meghali Dhoble via swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote: > Hi,

From: John McCall <rjmccall@apple.com <mailto:rjmccall@apple.com>>
To: Meghali Dhoble <dhoblem@us.ibm.com <mailto:dhoblem@us.ibm.com>>
Cc: swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>>, Graydon Hoare <ghoare@apple.com <mailto:ghoare@apple.com>>
Date: 08/28/2017 09:59 PM
Subject: Re: [swift-dev] Swift build on ppc64le platform
Sent by: rjmccall@apple.com <mailto:rjmccall@apple.com>

On Aug 28, 2017, at 9:08 AM, Meghali Dhoble via swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote:
Hi,
I have been working towards getting the swift source code built on my power (ppc64le) platform on Ubuntu16.04 OS.
I am observing build issues and looking for some help here. Please redirect me if this is not the right place for these questions.

I would like to understand the pre-requisites and the hardware configurations required to build this language.
The error I am getting look like memory issues as the process is being killed abruptly. I am attaching the log herewith for reference.

I don't see anything like that in the log. It looks like an ordinary compiler error relating to our custom calling convention.

You need to either
1. implement swiftcc in LLVM's ppc64 backend and then teach Clang that it's legal there or
2. configure Swift to not try to use it.

In the short term, I suspect that (2) is the right approach. Graydon was at least thinking about doing some work recently that would be aimed at making it easier to do this kind of configuration; CC'ing him explicitly to see if there's been progress there.

John.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170911/eb01c271/attachment-0001.html&gt;

------------------------------

Message: 2
Date: Tue, 12 Sep 2017 12:35:08 +0000 (UTC)
From: Alwyn Concessao <alsav196@yahoo.com>
To: "swift-dev@swift.org" <swift-dev@swift.org>
Subject: [swift-dev] Unit tests for the Swift project
Message-ID: <169046841.301587.1505219708083@mail.yahoo.com>
Content-Type: text/plain; charset="utf-8"

Hey Swift devs,
So I have been able to clone the Swift project from Github and built the project successfully.I've just added some code to the Swift std library and I want to test the added functionality by writing some unit tests.But I'm stuck with going about doing this.How can I write unit tests for the Swift standard library?
Thank you!
Regards,Alwyn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170912/c0abcbc0/attachment-0001.html&gt;

------------------------------

Message: 3
Date: Tue, 12 Sep 2017 09:21:56 -0700
From: Douglas Gregor <dgregor@apple.com>
To: swift-dev <swift-dev@swift.org>
Subject: Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift
  Incremental RA - Ubuntu 14.04 (master) #507
Message-ID: <F6AA57E3-5A97-4990-9D62-F886ADDBD4C2@apple.com>
Content-Type: text/plain; charset="utf-8"

Huh. This failure

  TestFoundation/TestThread.swift:110: error: TestThread.test_mainThread : XCTAssertTrue failed - NSCondition wait timed out

Have we seen it before? It didn’t show up in any of the PR testing and seems unrelated to my changes.

  - Doug

On Sep 12, 2017, at 8:44 AM, no-reply@swift.org wrote:

[FAILURE] oss-swift-incremental-RA-linux-ubuntu-14_04 [#507]

Build URL: https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-14_04/507/
Project: oss-swift-incremental-RA-linux-ubuntu-14_04
Date of build: Tue, 12 Sep 2017 09:57:47 -0500
Build duration: 48 min
Identified problems:

Compile Error: This build failed because of a compile error. Below is a list of all errors in the build log:
Indication 1 <https://ci.swift.org//job/oss-swift-incremental-RA-linux-ubuntu-14_04/507/consoleFull#20127934623122a513-f36a-4c87-8ed7-cbc36a1ec144&gt;
Changes

Commit 606ac145d12ae0215836929a56c9d144223d4483 by dgregor:
“Sanitize” requirements before checking inferred type witnesses.

edit: lib/Sema/TypeCheckProtocol.cpp

Commit 4dee0d9cc7fd9adfc059649a8aa3fbafc0c15672 by dgregor:
[GSB] Infer equivalence of same-named nested types of the same potential

edit: lib/AST/GenericSignatureBuilder.cpp
edit: test/Generics/protocol_requirement_signatures.swift
edit: test/Generics/requirement_inference.swift

Commit 39c36ea8cac12b5495997634c3cfe8038c02f596 by dgregor:
[GSB] Remove a spurious variable update. NFC

edit: lib/AST/GenericSignatureBuilder.cpp

Commit 1e21d8df8ac64c840923ed91d796079bf9b5a811 by dgregor:
[GSB] Eliminate self-derived nested-type-name-match constraints..

edit: lib/AST/GenericSignatureBuilder.cpp
edit: test/SILGen/same_type_abstraction.swift
edit: test/decl/protocol/recursive_requirement_ok.swift

Commit 56a07d2e73867fbdc36f3bd8dc62a7e95440c4b3 by dgregor:
[GSB] Split out the operation to expand the requirement signature of a

edit: lib/AST/GenericSignatureBuilder.cpp
edit: include/swift/AST/GenericSignatureBuilder.h

Commit 9b54f6a585febe7c00788754b1b2bad1c5d4a1c9 by dgregor:
[GSB] Dump delayed requirements to aid in debugging. NFC

edit: include/swift/AST/GenericSignatureBuilder.h
edit: lib/AST/GenericSignatureBuilder.cpp

Commit 43f3833b96fa9f04047ab85b268890317d559c30 by dgregor:
[GSB] Process same-type requirements needed to collapse same-type

edit: lib/AST/GenericSignatureBuilder.cpp
edit: include/swift/AST/GenericSignatureBuilder.h

Commit 0d53a73f416eabbcfc2222f0e7f48fb66bf4543b by dgregor:
[GSB] Collapse same-type components using delayed requirements.

edit: lib/AST/GenericSignatureBuilder.cpp
edit: include/swift/AST/GenericSignatureBuilder.h

Commit 41ff0585fbaa5a3dee0e8e8d50a1f9e8f7b6eeee by dgregor:
[GSB] Collapse structurally-equivalent potential archetypes.

edit: lib/AST/GenericSignatureBuilder.cpp

Commit 3b47b16a473131446f655c0fe90e304f94e059fc by dgregor:
[Stdlib] Eliminate the _UnicodeEncoding_ protocol.

edit: stdlib/public/core/UnicodeParser.swift
edit: stdlib/public/core/UnicodeEncoding.swift
edit: stdlib/public/core/UTFEncoding.swift

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170912/14854fa2/attachment-0001.html&gt;

------------------------------

Message: 4
Date: Tue, 12 Sep 2017 09:36:23 -0700
From: Ben Langmuir <blangmuir@apple.com>
To: Douglas Gregor <dgregor@apple.com>
Cc: swift-dev <swift-dev@swift.org>
Subject: Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift
  Incremental RA - Ubuntu 14.04 (master) #507
Message-ID: <B48731CF-6696-43B2-8568-5B0FF4234880@apple.com>
Content-Type: text/plain; charset="utf-8"

Could be the same as [SR-5871] TestThread.test_threadStart failing sporadically on Ubuntu 14.04 · Issue #3808 · apple/swift-corelibs-foundation · GitHub

On Sep 12, 2017, at 9:21 AM, Douglas Gregor <dgregor@apple.com> wrote:

Huh. This failure

  TestFoundation/TestThread.swift:110: error: TestThread.test_mainThread : XCTAssertTrue failed - NSCondition wait timed out

Have we seen it before? It didn’t show up in any of the PR testing and seems unrelated to my changes.

  - Doug

On Sep 12, 2017, at 8:44 AM, no-reply@swift.org <mailto:no-reply@swift.org> wrote:

[FAILURE] oss-swift-incremental-RA-linux-ubuntu-14_04 [#507]

Build URL: https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-14_04/507/
Project: oss-swift-incremental-RA-linux-ubuntu-14_04
Date of build: Tue, 12 Sep 2017 09:57:47 -0500
Build duration: 48 min
Identified problems:

Compile Error: This build failed because of a compile error. Below is a list of all errors in the build log:
Indication 1 <https://ci.swift.org//job/oss-swift-incremental-RA-linux-ubuntu-14_04/507/consoleFull#20127934623122a513-f36a-4c87-8ed7-cbc36a1ec144&gt;
Changes

Commit 606ac145d12ae0215836929a56c9d144223d4483 by dgregor:
“Sanitize” requirements before checking inferred type witnesses.

edit: lib/Sema/TypeCheckProtocol.cpp

Commit 4dee0d9cc7fd9adfc059649a8aa3fbafc0c15672 by dgregor:
[GSB] Infer equivalence of same-named nested types of the same potential

edit: lib/AST/GenericSignatureBuilder.cpp
edit: test/Generics/protocol_requirement_signatures.swift
edit: test/Generics/requirement_inference.swift

Commit 39c36ea8cac12b5495997634c3cfe8038c02f596 by dgregor:
[GSB] Remove a spurious variable update. NFC

edit: lib/AST/GenericSignatureBuilder.cpp

Commit 1e21d8df8ac64c840923ed91d796079bf9b5a811 by dgregor:
[GSB] Eliminate self-derived nested-type-name-match constraints..

edit: lib/AST/GenericSignatureBuilder.cpp
edit: test/SILGen/same_type_abstraction.swift
edit: test/decl/protocol/recursive_requirement_ok.swift

Commit 56a07d2e73867fbdc36f3bd8dc62a7e95440c4b3 by dgregor:
[GSB] Split out the operation to expand the requirement signature of a

edit: lib/AST/GenericSignatureBuilder.cpp
edit: include/swift/AST/GenericSignatureBuilder.h

Commit 9b54f6a585febe7c00788754b1b2bad1c5d4a1c9 by dgregor:
[GSB] Dump delayed requirements to aid in debugging. NFC

edit: include/swift/AST/GenericSignatureBuilder.h
edit: lib/AST/GenericSignatureBuilder.cpp

Commit 43f3833b96fa9f04047ab85b268890317d559c30 by dgregor:
[GSB] Process same-type requirements needed to collapse same-type

edit: lib/AST/GenericSignatureBuilder.cpp
edit: include/swift/AST/GenericSignatureBuilder.h

Commit 0d53a73f416eabbcfc2222f0e7f48fb66bf4543b by dgregor:
[GSB] Collapse same-type components using delayed requirements.

edit: lib/AST/GenericSignatureBuilder.cpp
edit: include/swift/AST/GenericSignatureBuilder.h

Commit 41ff0585fbaa5a3dee0e8e8d50a1f9e8f7b6eeee by dgregor:
[GSB] Collapse structurally-equivalent potential archetypes.

edit: lib/AST/GenericSignatureBuilder.cpp

Commit 3b47b16a473131446f655c0fe90e304f94e059fc by dgregor:
[Stdlib] Eliminate the _UnicodeEncoding_ protocol.

edit: stdlib/public/core/UnicodeParser.swift
edit: stdlib/public/core/UnicodeEncoding.swift
edit: stdlib/public/core/UTFEncoding.swift

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170912/18308aec/attachment-0001.html&gt;

------------------------------

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

End of swift-dev Digest, Vol 22, Issue 11
*****************************************