Re: [swift-dev] swift.org nightlies are old

2017-05-09 Thread Karl Wagner via swift-dev
Great, thanks! > > On May 8, 2017 at 6:55 am, mailto:bob.wil...@apple.com)> wrote: > > > > There was a problem with some test failures blocking the build. We should at > least be able to xfail those tests to get things unblocked tomorrow. > > > On

[swift-dev] New warning message while switching on an enum

2017-05-09 Thread Pushkar N Kulkarni via swift-dev
Hi there, I see a new warning message for switch statements on enums, like this one: enum Test {    case one(Any)    case two}let x: Test = .one("One")switch x {    case .one(let s as String): print(s)    case .one: break    case .two: break}enum.swift:9:10: warning: case is already handled by prev

[swift-dev] Fixing 'Identifier' with 'DeclBaseName'

2017-05-09 Thread Jordan Rose via swift-dev
Hi, all. I wanted to give a heads-up about some work Alex Hoppen has been doing to fix one of our longstanding problems: the DeclName for subscripts is just the Identifier “subscript”. (And similarly for ‘init’, ‘deinit’, etc.) The solution he’s come up with (after discussions with me and John)

Re: [swift-dev] New warning message while switching on an enum

2017-05-09 Thread Jordan Rose via swift-dev
That looks like a bug to me, since of course the first pattern won't always match. I suspect this is Robert's work on trying to make the exhaustive checks better, https://github.com/apple/swift/pull/8908 . Thanks for catching this! Jordan > On May 9,

Re: [swift-dev] New warning message while switching on an enum

2017-05-09 Thread Robert Widmann via swift-dev
It’s mine, yep. It looks like it’s classifying the cast in the first pattern as a variable binding instead of an expression pattern. I’ll push a fix later. Thanks! > On May 9, 2017, at 1:52 PM, Jordan Rose wrote: > > That looks like a bug to me, since of course the first pattern won't always

Re: [swift-dev] New warning message while switching on an enum

2017-05-09 Thread Jordan Rose via swift-dev
It's neither a variable binding nor an expression pattern, right? It has to be compared against the original type to know whether it's exhaustive or not. (Consider "let error as NSError" in a catch clause, which should be considered exhaustive.) Jordan > On May 9, 2017, at 11:12, Robert Widman

Re: [swift-dev] swift.org nightlies are old

2017-05-09 Thread Bob Wilson via swift-dev
Update: we’re still working on this. We got some LLDB test failures resolved yesterday and are now looking at a SwiftPM failure. Hopefully that will be the last one…. > On May 9, 2017, at 1:19 AM, Karl Wagner wrote: > > Great, thanks! > > >> On May 8, 2017 at 6:55 am, mailto:bob.wil...@apple

Re: [swift-dev] New warning message while switching on an enum

2017-05-09 Thread Robert Widmann via swift-dev
We’ll warn if that kind of cast is a tautology, right? That leaves only the dynamic casts, which can’t be assumed exhaustive. ~Robert Widmann > On May 9, 2017, at 2:13 PM, Jordan Rose wrote: > > It's neither a variable binding nor an expression pattern, right? It has to > be compared against

Re: [swift-dev] New warning message while switching on an enum

2017-05-09 Thread Jordan Rose via swift-dev
"as NSError" isn't a tautology, though—the original type is 'Error'. Additionally, the presence or absence of a warning shouldn't affect exhaustiveness analysis, which is currently an error when you get it wrong. Warnings are things you can build with and fix later. Jordan > On May 9, 2017, a

Re: [swift-dev] New warning message while switching on an enum

2017-05-09 Thread Robert Widmann via swift-dev
Right. I guess I should have asked: Are there any other kinds of patterns we consider exhaustive that have this structure? ~Robert Widmann > On May 9, 2017, at 2:23 PM, Jordan Rose wrote: > > "as NSError" isn't a tautology, though—the original type is 'Error'. > Additionally, the presence

[swift-dev] Property modification not taking effect

2017-05-09 Thread Pushkar N Kulkarni via swift-dev
In the process of debugging a bunch of consistent failures in TestFoundation/TestNSURLSession, I came across a weird problem symptom in this line of code.internalState = .transferInProgress(transferState)I had a suspicion that the above modification is not taking effect, since, only based on this c

Re: [swift-dev] New warning message while switching on an enum

2017-05-09 Thread Jordan Rose via swift-dev
I think any bridging conversion or upcast would count. enum Foo { case foo(NSFileManager) case bar(NSString) case baz(Int) } func test(x: Foo) { switch x { case .foo(let obj as NSObject): print("totally legal") case .bar(let obj as String): print("also cool") case .baz(let ob

Re: [swift-dev] New warning message while switching on an enum

2017-05-09 Thread Robert Widmann via swift-dev
Is there a catch-all to query for such casts (sorry, I'm away from my computer at the moment). ~Robert Widmann 2017/05/09 16:40、Jordan Rose のメッセージ: > I think any bridging conversion or upcast would count. > > enum Foo { > case foo(NSFileManager) > case bar(NSString) > case baz(Int) > }

Re: [swift-dev] New warning message while switching on an enum

2017-05-09 Thread Jordan Rose via swift-dev
I think they'll all be IsPatterns, which means you can look at the CheckedCastKind. Jordan > On May 9, 2017, at 13:54, Robert Widmann wrote: > > Is there a catch-all to query for such casts (sorry, I'm away from my > computer at the moment). > > ~Robert Widmann > > 2017/05/09 16:40、Jordan

Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 14.04 - Long Test (master) #2667

2017-05-09 Thread Mishal Shah via swift-dev
Hi, This failed due to /home/buildnode/disk2/workspace/oss-swift-incremental-RA-linux-ubuntu-14_04-long-test/swift/lib/ClangImporter/ClangImporter.cpp:2647:41: error: too few arguments to function call, single argument 'Diags' was not specified return Impl.Invocation->getModuleHash();

Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 14.04 - Long Test (master) #2667

2017-05-09 Thread Max Moiseev via swift-dev
Caused by this change: https://github.com/apple/swift-clang/commit/99730af5fb3c765e39cbc85123a2374269daf163 > On May 9, 2017, at 3:09 PM, Mishal Shah wrote: > > Hi, > > This failed due to > /home/buildnod

Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 16.04 (swift 4.0) #345

2017-05-09 Thread Bruno Cardoso Lopes via swift-dev
This was me. Just talked to David Farler and he's going to help me by updating the call to getModuleHash on the the importer. On Tue, May 9, 2017 at 2:48 PM, wrote: > [FAILURE] oss-swift-4.0-incremental-RA-linux-ubuntu-16_04 [#345] > Build URL: https://ci.swift.org/job/oss-swift-4.0-incrementa

Re: [swift-dev] Property modification not taking effect

2017-05-09 Thread John McCall via swift-dev
> On May 9, 2017, at 3:07 PM, Pushkar N Kulkarni via swift-dev > wrote: > In the process of debugging a bunch of consistent failures in > TestFoundation/TestNSURLSession, I came across a weird problem symptom in > this line of code >

Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 16.04 (swift 4.0) #345

2017-05-09 Thread David Farler via swift-dev
To close the thread - this change was reverted. - DF > On May 9, 2017, at 3:18 PM, Bruno Cardoso Lopes > wrote: > > This was me. Just talked to David Farler and he's going to help me by > updating the call to getModuleHash on the the importer. > > > > On Tue, May 9, 2017 at 2:48 PM,