Re: D Library Breakage

2018-04-13 Thread Jonathan Marler via Digitalmars-d
On Friday, 13 April 2018 at 23:36:46 UTC, H. S. Teoh wrote: On Fri, Apr 13, 2018 at 11:00:20PM +, Jonathan Marler via Digitalmars-d wrote: [...] @JonathanDavis, the original post goes through an example where you won't get a compile-time or link-time error...it results in a very bad runtime

Re: D Library Breakage

2018-04-13 Thread H. S. Teoh via Digitalmars-d
On Fri, Apr 13, 2018 at 11:00:20PM +, Jonathan Marler via Digitalmars-d wrote: [...] > @JonathanDavis, the original post goes through an example where you > won't get a compile-time or link-time error...it results in a very bad > runtime stack stomp. To put things in perspective, this is esse

Re: D Library Breakage

2018-04-13 Thread Steven Schveighoffer via Digitalmars-d
On 4/13/18 7:00 PM, Jonathan Marler wrote: @Steven You're just addressing the example I gave and not thinking of all the other ways version (or other compiler flags) could change things.  For example, you could have version code inside a template that changes mangling because it is no longer i

Re: D Library Breakage

2018-04-13 Thread Jonathan Marler via Digitalmars-d
On Friday, 13 April 2018 at 22:29:25 UTC, Steven Schveighoffer wrote: On 4/13/18 5:57 PM, Jonathan M Davis wrote: On Friday, April 13, 2018 16:15:21 Steven Schveighoffer via Digitalmars-d I don't know if the compiler can determine if a version statement affects the layout, I suppose it could,

Re: D Library Breakage

2018-04-13 Thread Steven Schveighoffer via Digitalmars-d
On 4/13/18 5:57 PM, Jonathan M Davis wrote: On Friday, April 13, 2018 16:15:21 Steven Schveighoffer via Digitalmars-d I don't know if the compiler can determine if a version statement affects the layout, I suppose it could, but it would have to compile both with and without the version to see.

Re: D Library Breakage

2018-04-13 Thread Jonathan M Davis via Digitalmars-d
On Friday, April 13, 2018 16:15:21 Steven Schveighoffer via Digitalmars-d wrote: > On 4/13/18 3:47 PM, Jesse Phillips wrote: > > On Friday, 13 April 2018 at 18:04:38 UTC, Jonathan Marler wrote: > >> Error: symbol "__module_config_foo" needed by main.o is not defined > >> > >> The linker error isn'

Re: D Library Breakage

2018-04-13 Thread Steven Schveighoffer via Digitalmars-d
On 4/13/18 3:47 PM, Jesse Phillips wrote: On Friday, 13 April 2018 at 18:04:38 UTC, Jonathan Marler wrote: Error: symbol "__module_config_foo" needed by main.o is not defined The linker error isn't great, but it prevents potential runtime errors.  Also, if you use the compiler instead of the l

Re: D Library Breakage

2018-04-13 Thread Steven Schveighoffer via Digitalmars-d
On 4/13/18 4:15 PM, Steven Schveighoffer wrote: I don't know if the compiler can determine if a version statement affects the layout, I suppose it could, but it would have to compile both with and without the version to see. It's probably an intractable problem. Even when the layout is affec

Re: D Library Breakage

2018-04-13 Thread Jesse Phillips via Digitalmars-d
On Friday, 13 April 2018 at 18:04:38 UTC, Jonathan Marler wrote: Error: symbol "__module_config_foo" needed by main.o is not defined The linker error isn't great, but it prevents potential runtime errors. Also, if you use the compiler instead of the linker you'll get a nice error message.

Re: D Library Breakage

2018-04-13 Thread Dmitry Olshansky via Digitalmars-d
On Friday, 13 April 2018 at 18:04:38 UTC, Jonathan Marler wrote: On Friday, 13 April 2018 at 10:47:18 UTC, Rene Zwanenburg wrote: On Friday, 13 April 2018 at 05:31:25 UTC, Jesse Phillips wrote: One thought I has was that we could define a special symbol that basically encodes the configurat

Re: D Library Breakage

2018-04-13 Thread Jonathan Marler via Digitalmars-d
On Friday, 13 April 2018 at 10:47:18 UTC, Rene Zwanenburg wrote: On Friday, 13 April 2018 at 05:31:25 UTC, Jesse Phillips wrote: Well if DIP1000 isn't on by default I don't think Phobos should be compiled with it. I think that the version issue is not unique to D and would be good to address,

Re: D Library Breakage

2018-04-13 Thread Jesse Phillips via Digitalmars-d
On Friday, 13 April 2018 at 10:47:18 UTC, Rene Zwanenburg wrote: On Friday, 13 April 2018 at 05:31:25 UTC, Jesse Phillips wrote: Well if DIP1000 isn't on by default I don't think Phobos should be compiled with it. I think that the version issue is not unique to D and would be good to address,

Re: D Library Breakage

2018-04-13 Thread Rene Zwanenburg via Digitalmars-d
On Friday, 13 April 2018 at 05:31:25 UTC, Jesse Phillips wrote: Well if DIP1000 isn't on by default I don't think Phobos should be compiled with it. I think that the version issue is not unique to D and would be good to address, but I don't see the compiler reading the object file to determin

Re: D Library Breakage

2018-04-12 Thread Jesse Phillips via Digitalmars-d
On Thursday, 12 April 2018 at 20:39:33 UTC, Jonathan Marler wrote: Currently phobos is going through a transition where DIP 1000 is being enabled. This presents a unique problem because when DIP 1000 is enabled, it will cause certain functions to be mangled differently. This means that if a m

D Library Breakage

2018-04-12 Thread Jonathan Marler via Digitalmars-d
Currently phobos is going through a transition where DIP 1000 is being enabled. This presents a unique problem because when DIP 1000 is enabled, it will cause certain functions to be mangled differently. This means that if a module in phobos was compiled with DIP 1000 enabled and you don't en