Re: [swift-evolution] [DRAFT] Introducing a Debug Build Configuration Test

2016-03-20 Thread Ben Rimmington via swift-evolution
Would `isOptimized` and `isOptimizedUnchecked` be useful, and also easier to specify? > On 15 Mar 2016, at 17:28, Jordan Rose via swift-evolution > wrote: > > What is a "debug build"? Is it one where testing is enabled? Where the > optimization level is -Onone? (We've talked about having an -

Re: [swift-evolution] [DRAFT] Introducing a Debug Build Configuration Test

2016-03-19 Thread David Owens II via swift-evolution
March 15, 2016 11:20 AM To: Jordan Rose ; Dmitri Gribenko ; Joe Groff Cc: swift-evolution Subject: Re: [swift-evolution] [DRAFT] Introducing a Debug Build Configuration Test > On Mar 15, 2016, at 11:28 AM, Jordan Rose wrote: > > What is a "debug build"? Is it one where tes

Re: [swift-evolution] [DRAFT] Introducing a Debug Build Configuration Test

2016-03-19 Thread Dany St-Amant via swift-evolution
> Le 14 mars 2016 à 16:04, Dmitri Gribenko via swift-evolution > a écrit : > > On Mon, Mar 14, 2016 at 11:57 AM, Erica Sadun via swift-evolution > wrote: >> https://gist.github.com/erica/d20639b409fe1b318c0e >> >> Feedback solicited. Thanks, -- Erica >> >> Introducing a Debug Build Configura

Re: [swift-evolution] [DRAFT] Introducing a Debug Build Configuration Test

2016-03-19 Thread Brent Royal-Gordon via swift-evolution
> I would like to update my draft proposal to introduce a test for debug > configurations using a public function > rather than a build configuration test. > > * Would the stdlib team be open to that? > * What would be an appropriate name? `debugConfiguration`? `debugBuild`? > `isDebugBuild`?

Re: [swift-evolution] [DRAFT] Introducing a Debug Build Configuration Test

2016-03-15 Thread Erica Sadun via swift-evolution
> On Mar 15, 2016, at 11:28 AM, Jordan Rose wrote: > > What is a "debug build"? Is it one where testing is enabled? Where the > optimization level is -Onone? (We've talked about having an -Odebug and/or > -Oplayground at some point. Are those "debug builds"?) Is it one where > asserts are not

Re: [swift-evolution] [DRAFT] Introducing a Debug Build Configuration Test

2016-03-15 Thread Jordan Rose via swift-evolution
What is a "debug build"? Is it one where testing is enabled? Where the optimization level is -Onone? (We've talked about having an -Odebug and/or -Oplayground at some point. Are those "debug builds"?) Is it one where asserts are not removed? (This can technically be controlled independently of -

Re: [swift-evolution] [DRAFT] Introducing a Debug Build Configuration Test

2016-03-15 Thread Joe Groff via swift-evolution
> On Mar 14, 2016, at 1:04 PM, Dmitri Gribenko via swift-evolution > wrote: > > On Mon, Mar 14, 2016 at 11:57 AM, Erica Sadun via swift-evolution > mailto:swift-evolution@swift.org>> wrote: >> https://gist.github.com/erica/d20639b409fe1b318c0e >> >> Feedback solicited. Thanks, -- Erica >> >>

Re: [swift-evolution] [DRAFT] Introducing a Debug Build Configuration Test

2016-03-15 Thread Dmitri Gribenko via swift-evolution
On Tue, Mar 15, 2016 at 9:31 AM, Erica Sadun wrote: > I would like to update my draft proposal to introduce a test for debug > configurations using a public function > rather than a build configuration test. > > * Would the stdlib team be open to that? No objections from me. > * What would be a

Re: [swift-evolution] [DRAFT] Introducing a Debug Build Configuration Test

2016-03-15 Thread Erica Sadun via swift-evolution
I would like to update my draft proposal to introduce a test for debug configurations using a public function rather than a build configuration test. * Would the stdlib team be open to that? * What would be an appropriate name? `debugConfiguration`? `debugBuild`? `isDebugBuild`? `isDebugConfig

Re: [swift-evolution] [DRAFT] Introducing a Debug Build Configuration Test

2016-03-15 Thread Shawn Erickson via swift-evolution
True. I was thinking to much in the content of the stdlib only but with a builtin you can get things optimized away. On Tue, Mar 15, 2016 at 9:22 AM Dmitri Gribenko wrote: > A function can absolutely can do that, if it is implemented using a > builtin known to the optimizer. > > Dmitri > > On Tu

Re: [swift-evolution] [DRAFT] Introducing a Debug Build Configuration Test

2016-03-15 Thread Dmitri Gribenko via swift-evolution
A function can absolutely can do that, if it is implemented using a builtin known to the optimizer. Dmitri On Tue, Mar 15, 2016 at 9:20 AM, Shawn Erickson wrote: > You would likely want to ensure debug related code could be optimized away / > or not be included in release builds. I am not sure h

Re: [swift-evolution] [DRAFT] Introducing a Debug Build Configuration Test

2016-03-15 Thread Shawn Erickson via swift-evolution
You would likely want to ensure debug related code could be optimized away / or not be included in release builds. I am not sure how a function would achieve that. On Tue, Mar 15, 2016 at 9:15 AM Erica Sadun via swift-evolution < swift-evolution@swift.org> wrote: > > > On Mar 14, 2016, at 2:04 PM,

Re: [swift-evolution] [DRAFT] Introducing a Debug Build Configuration Test

2016-03-15 Thread Erica Sadun via swift-evolution
> On Mar 14, 2016, at 2:04 PM, Dmitri Gribenko wrote: > Hi Erica, > > Based on Joe's rationale that you are quoting, I think the intent is > that we want to restrict this directive to be statement-level only. > The API vended by a module should not be affected by the build mode. > > Dmitri C