Re: [swift-dev] [Swift CI] Build Failure: OSS - Swift Package - Ubuntu 16.10 (master) #321

2017-01-26 Thread mishal_shah via swift-dev
Testing Time: 625.72s Failing Tests (17): Swift(linux-x86_64) :: SIL/parse_stdlib_15.sil Swift(linux-x86_64) :: SIL/parse_stdlib_0.sil Swift(linux-x86_64) :: SIL/parse_stdlib_10.sil Swift(linux-x86_64) :: SIL/parse_stdlib_13.sil Swift(li

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread Andrew Trick via swift-dev
> On Jan 26, 2017, at 4:48 PM, Greg Parker wrote: > > >> On Jan 26, 2017, at 2:07 AM, Andrew Trick via swift-dev >> wrote: >> >> Before I pull in a large PR that "accidentally" reformats a bunch of code, I >> want to get feedback on how Swift compiler devs plan to use `clang-format`. >> (B

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread Greg Parker via swift-dev
> On Jan 26, 2017, at 2:07 AM, Andrew Trick via swift-dev > wrote: > > Before I pull in a large PR that "accidentally" reformats a bunch of code, I > want to get feedback on how Swift compiler devs plan to use `clang-format`. > (BTW, here's the PR https://github.com/apple/swift/pull/6922). >

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread Jordan Rose via swift-dev
> On Jan 26, 2017, at 12:55, Andrew Trick via swift-dev > wrote: > >> >> On Jan 26, 2017, at 11:38 AM, Graydon Hoare wrote: >> >> >>> On Jan 26, 2017, at 2:07 AM, Andrew Trick via swift-dev >>> wrote: >>> >>> Before I pull in a large PR that "accidentally" reformats a bunch of code, >>>

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread Andrew Trick via swift-dev
> On Jan 26, 2017, at 11:38 AM, Graydon Hoare wrote: > > >> On Jan 26, 2017, at 2:07 AM, Andrew Trick via swift-dev >> wrote: >> >> Before I pull in a large PR that "accidentally" reformats a bunch of code, I >> want to get feedback on how Swift compiler devs plan to use `clang-format`. >>

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread Graydon Hoare via swift-dev
> On Jan 26, 2017, at 2:07 AM, Andrew Trick via swift-dev > wrote: > > Before I pull in a large PR that "accidentally" reformats a bunch of code, I > want to get feedback on how Swift compiler devs plan to use `clang-format`. > (BTW, here's the PR https://github.com/apple/swift/pull/6922). >

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread Michael Gottesman via swift-dev
Can I make a more radical suggestion. Maybe the thing to do here is to enforce git-clang-format so that everyone uses it. It would be really simple to do. You would require people to put it in a pre commit hook. Then swift-ci would have a job that ran git-clang-format and would require it to com

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread Andrew Trick via swift-dev
> On Jan 26, 2017, at 10:34 AM, Andrew Trick via swift-dev > wrote: > > >> On Jan 26, 2017, at 10:25 AM, Jordan Rose > > wrote: >> >>> >>> On Jan 26, 2017, at 09:35, Andrew Trick via swift-dev >> > wrote: >>> On Jan 26, 20

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread John McCall via swift-dev
> On Jan 26, 2017, at 1:25 PM, Jordan Rose via swift-dev > wrote: >> On Jan 26, 2017, at 09:35, Andrew Trick via swift-dev > > wrote: >> >>> >>> On Jan 26, 2017, at 9:29 AM, Ben Langmuir >> > wrote: >>> On Jan 26, 2017, at 9:14

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread Andrew Trick via swift-dev
> On Jan 26, 2017, at 10:25 AM, Jordan Rose wrote: > >> >> On Jan 26, 2017, at 09:35, Andrew Trick via swift-dev > > wrote: >> >>> >>> On Jan 26, 2017, at 9:29 AM, Ben Langmuir >> > wrote: >>> On Jan 26, 2017, at 9:14 AM, And

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread Jordan Rose via swift-dev
> On Jan 26, 2017, at 09:35, Andrew Trick via swift-dev > wrote: > >> >> On Jan 26, 2017, at 9:29 AM, Ben Langmuir > > wrote: >> >>> >>> On Jan 26, 2017, at 9:14 AM, Andrew Trick >> > wrote: >>> >>> On Jan 26, 2017, at 9:11 AM, Ben

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread Andrew Trick via swift-dev
> On Jan 26, 2017, at 9:29 AM, Ben Langmuir wrote: > >> >> On Jan 26, 2017, at 9:14 AM, Andrew Trick > > wrote: >> >> >>> On Jan 26, 2017, at 9:11 AM, Ben Langmuir >> > wrote: ** Option 1: Add a simple configuration option to swi

Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - OS X (swift 3.1) #230

2017-01-26 Thread Jordan Rose via swift-dev
Jenkins error, not my commit. > On Jan 26, 2017, at 00:13, no-re...@swift.org wrote: > > [FAILURE] oss-swift-3.1-incremental-RA-osx [#230] > > Build URL:https://ci.swift.org/job/oss-swift-3.1-incremental-RA-osx/230/ > > Projec

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread Ben Langmuir via swift-dev
> On Jan 26, 2017, at 9:14 AM, Andrew Trick wrote: > > >> On Jan 26, 2017, at 9:11 AM, Ben Langmuir > > wrote: >>> >>> ** Option 1: Add a simple configuration option to swift/.clang-format: >>> >>> 1a. BreakBeforeBinaryOperators: All >>> >>> 1b. BreakBeforeBinaryO

Re: [swift-dev] Proposal: Opaque SIL values

2017-01-26 Thread Andrew Trick via swift-dev
> On Jan 26, 2017, at 8:33 AM, John McCall wrote: > >> On Jan 24, 2017, at 2:10 PM, Andrew Trick via swift-dev > > wrote: >> I’m sending out a proposal for fundamentally changing SIL. This work feeds >> into generic code optimization, resilience, semantic ARC, and SI

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread Andrew Trick via swift-dev
> On Jan 26, 2017, at 9:11 AM, Ben Langmuir wrote: >> >> ** Option 1: Add a simple configuration option to swift/.clang-format: >> >> 1a. BreakBeforeBinaryOperators: All >> >> 1b. BreakBeforeBinaryOperators: NonAssignment > >> >> I have absolutely no preference between 1a and 1b. It's purely

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread Ben Langmuir via swift-dev
> On Jan 26, 2017, at 2:07 AM, Andrew Trick via swift-dev > wrote: > > Before I pull in a large PR that "accidentally" reformats a bunch of code, I > want to get feedback on how Swift compiler devs plan to use `clang-format`. > (BTW, here's the PR https://github.com/apple/swift/pull/6922). >

[swift-dev] Race conditions with lazy variables

2017-01-26 Thread Dan Zimmerman via swift-dev
Hey, Today I ran into an issue where I had a lazy instance variable that was being initialized multiple times due to a race condition. For example: ``` import Darwin import Dispatch func doSomethingIntense() { usleep(10) } var counter: Int = 0 class Cat { lazy var sound: St

Re: [swift-dev] Proposal: Opaque SIL values

2017-01-26 Thread Joe Groff via swift-dev
> On Jan 26, 2017, at 12:45 AM, Andrew Trick wrote: > > >> On Jan 25, 2017, at 6:13 PM, Joe Groff wrote: >> >>> Naturally, opaque types must limit some optimizations, such as inlining. >> >> I don't see how opaque types by themselves prevent inlining. You can inline >> a generic into anothe

Re: [swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread John McCall via swift-dev
> On Jan 26, 2017, at 5:07 AM, Andrew Trick via swift-dev > wrote: > Before I pull in a large PR that "accidentally" reformats a bunch of code, I > want to get feedback on how Swift compiler devs plan to use `clang-format`. > (BTW, here's the PR https://github.com/apple/swift/pull/6922). > > D

Re: [swift-dev] Proposal: Opaque SIL values

2017-01-26 Thread John McCall via swift-dev
> On Jan 24, 2017, at 2:10 PM, Andrew Trick via swift-dev > wrote: > I’m sending out a proposal for fundamentally changing SIL. This work feeds > into generic code optimization, resilience, semantic ARC, and SIL ownership. > This was discussed at length back in October—some info went out on >

[swift-dev] Using git-clang-format in the Swift compiler code base.

2017-01-26 Thread Andrew Trick via swift-dev
Before I pull in a large PR that "accidentally" reformats a bunch of code, I want to get feedback on how Swift compiler devs plan to use `clang-format`. (BTW, here's the PR https://github.com/apple/swift/pull/6922). During the code review, I ran `git clang-format` as part of being a good citize

Re: [swift-dev] Proposal: Opaque SIL values

2017-01-26 Thread Andrew Trick via swift-dev
> On Jan 25, 2017, at 4:22 PM, Karl Wagner wrote: > > >> On 24 Jan 2017, at 20:10, Andrew Trick via swift-dev > > wrote: >> >> I’m sending out a proposal for fundamentally changing SIL. This work feeds >> into generic code optimization, resilience, semantic ARC, an

Re: [swift-dev] Proposal: Opaque SIL values

2017-01-26 Thread Andrew Trick via swift-dev
> On Jan 25, 2017, at 6:13 PM, Joe Groff wrote: > >> Naturally, opaque types must limit some optimizations, such as inlining. > > I don't see how opaque types by themselves prevent inlining. You can inline a > generic into another generic, or a function using a resilient type into > another f