On Mon, 2004-05-10 at 02:53, Branko Èibej wrote:
> I committed a prototype implementation of version query functions.
> Please look at it, and if it's acceptable, I'll implement the rest of
> the functions and add version queries to all the command-line tools.
Uh, -1, unless I missed some design discussion on this. Adding a new
utility function here and there is fine, in my opinion, but adding a new
subsystem should really not happen without prior discussion.
I am +0 on adding functions to query a library's version. I am -0 on
adding machinery to check library version mismatches at runtime, because
I don't see a lot of potential for accidental mismatches and because I
haven't seen much of that machinery in other projects.
Specific comments on the implementation:
+#define SVN_VER_GEN_PROTO(name) \
+#define SVN_VER_GEN_IMPL(name) \
+#define SVN_VER_COMPATIBLE(name) \
+#define SVN_VER_CALLBACK_COMPATIBLE(name) \
I do not believe we should be using the preprocessor to this extent.
The preprocessor is not our friend. Suppose I run into a problem
involving svn_subr_version and I want to find out where it's defined? I
can't grep for it, because it was defined with SVN_VER_GEN_IMPL(subr).
+svn_boolean_t svn_ver_compatible (const svn_version_t *versioninfo,
+svn_boolean_t svn_ver_callback_compatible (const svn_version_t *versioninfo,
The asymmetry between the two version arguments (one specified as a
structure pointer, the other split out into four parameters) seems
weird.
What's the definition of "callback compatibility?" The implementation
seems to simply reverse the direction of the compatibility test. To the
best of my knowledge, we treat changing the signature of a callback as
if it were changing the signature of any API which uses that callback,
so we have no concept of "callback compatibility."
Compatibility is directional, but the docstring for svn_ver_compatible
does not say which direction it checks compatibility in.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon May 10 16:42:23 2004