Re: [RFC] Preprocessor flags to target code to a specific API version

2010-09-27 Thread Hyrum K. Wright
On Sun, Sep 26, 2010 at 5:31 PM, Dani Church wrote: > On Sun, 26 Sep 2010, Daniel Shahaf wrote: > >> Adding the SVN_MAYBE_POISON(svn_wc_some_function) can be done >> mechanically (by a script that reads the @deprecated comments and >> transforms the header files accordingly) --- instead of editing

Re: [RFC] Preprocessor flags to target code to a specific API version

2010-09-26 Thread Dani Church
On Sun, 26 Sep 2010, Daniel Shahaf wrote: Greg Stein wrote on Sun, Sep 26, 2010 at 16:01:53 -0400: Wrapping declarations with #if SVN_TARGET_API is a non-starter, I believe. That sounds like it would obfuscate the headers a bit too much. In your original email, you mentioned something about "gc

Re: [RFC] Preprocessor flags to target code to a specific API version

2010-09-26 Thread Dani Church
On Sun, 26 Sep 2010, Daniel Shahaf wrote: Adding the SVN_MAYBE_POISON(svn_wc_some_function) can be done mechanically (by a script that reads the @deprecated comments and transforms the header files accordingly) --- instead of editing all headers now, we could provide a knob for people to run thi

Re: [RFC] Preprocessor flags to target code to a specific API version

2010-09-26 Thread Dani Church
On Sun, 26 Sep 2010, Greg Stein wrote: First off, if you could somehow extract the patch for fixing the comments' @deprecated statements, that would be awesome. Fixing those is a no-brainer and introduces no extra complexity. Done, I sent that out in a separate email. Wrapping declarations w

Re: [RFC] Preprocessor flags to target code to a specific API version

2010-09-26 Thread Daniel Shahaf
Greg Stein wrote on Sun, Sep 26, 2010 at 16:01:53 -0400: > Wrapping declarations with #if SVN_TARGET_API is a non-starter, I > believe. That sounds like it would obfuscate the headers a bit too > much. In your original email, you mentioned something about "gcc > poison" which made it sound like you

Re: [RFC] Preprocessor flags to target code to a specific API version

2010-09-26 Thread Daniel Shahaf
Greg Stein wrote on Sun, Sep 26, 2010 at 16:01:53 -0400: > SVN_DEPRECATED_5 > svn_error_t * > svn_wc_some_function(arguments, > more argments); > SVN_MAYBE_POISON_5(svn_wc_some_function); > > Where the latter macro expands to: _Pragma("GCC poison > svn_wc_some_function"); (I think that is the

Re: [RFC] Preprocessor flags to target code to a specific API version

2010-09-26 Thread Greg Stein
On Sat, Sep 25, 2010 at 21:07, Dani Church wrote: >... > You're certainly right, it is a big patch-- updating all of the > SVN_DEPRECATED macros is around a 100KB patch.  I went through and updated > them all based on the @deprecated tag version, and for the functions that > were deprecated by a s

Re: [RFC] Preprocessor flags to target code to a specific API version

2010-09-25 Thread Dani Church
On Fri, 24 Sep 2010, Greg Stein wrote: That would be a pretty big patch. I see almost 400 deprecated functions in our headers. Each of those would need to be touched. I'm not against the concept in general, but would like to see how all those DEPRECATED macros would turn out, concretely. You'

Re: [RFC] Preprocessor flags to target code to a specific API version

2010-09-24 Thread Dani Church
On Fri, 24 Sep 2010, Greg Stein wrote: On Fri, Sep 24, 2010 at 15:04, Dani Church wrote:  I wanted to suggest using a preprocessor directive to target a codebase to a specific API version, something like the following: #define USE_SVN_API 105 #include I figure that could have two effects: f

Re: [RFC] Preprocessor flags to target code to a specific API version

2010-09-24 Thread Greg Stein
On Fri, Sep 24, 2010 at 15:04, Dani Church wrote: > I'm writing a client that uses the libsvn_client API, and in order to make > the code as portable as possible, I have been using the minimum API version > that has the features I need, which in my case is the 1.5 API. > Unfortunately, that means