You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Max Bowsher <ma...@ukf.net> on 2005/10/04 17:10:50 UTC

libsvn_fs_* make use of functions declared in _private_ libsvn_delta header

The two fs backend implementations both use the functions 
svn_txdelta__apply_instructions() and svn_txdelta__compose_windows(), which 
are declared in subversion/libsvn_delta/delta.h.

If those functions are to be used cross-library, should they not become part 
of the public API?

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: libsvn_fs_* make use of functions declared in _private_ libsvn_delta header

Posted by kf...@collab.net.
kfogel@collab.net writes:
> Because (b) is simpler to explain and remember.

Sorry, I wrote "(b)" referring to an earlier mail, not to your (a) and
(b) points.  I should have just written "it".


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: libsvn_fs_* make use of functions declared in _private_ libsvn_delta header

Posted by kf...@collab.net.
Greg Hudson <gh...@MIT.EDU> writes:
> On Tue, 2005-10-04 at 14:31 -0500, kfogel@collab.net wrote:
> > Because (b) is simpler to explain and remember.
> 
> Functions with double underscores aren't part of the public API.  How
> hard is that to explain and remember?

It's very easy, it's just incomplete.  A programmer would read that
and think it's okay to use some library's double-underscore functions
*anywhere* in Subversion, not just in that library.  That's not what
we want, is it?

   "Symbols with double-underscores should only be used inside the
    library where they are defined.  E.g., svn_foo__bar_baz(), should
    only be used inside libsvn_foo."

That's always been my understanding of the double-underscore
convention, and I think it's a good principle.  The API provided by
libsvn_foo should treat other Subversion libraries the same way it
treats non-Subversion callers.  If "clean" and "modular" mean
anything, don't they mean this?

-Karl

-- 
www.collab.net  <>  CollabNet  |  Distributed Development On Demand

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: libsvn_fs_* make use of functions declared in _private_ libsvn_delta header

Posted by Greg Hudson <gh...@MIT.EDU>.
On Tue, 2005-10-04 at 14:31 -0500, kfogel@collab.net wrote:
> Because (b) is simpler to explain and remember.

Functions with double underscores aren't part of the public API.  How
hard is that to explain and remember?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: libsvn_fs_* make use of functions declared in _private_ libsvn_delta header

Posted by kf...@collab.net.
Greg Hudson <gh...@MIT.EDU> writes:
> On Tue, 2005-10-04 at 14:10 -0500, kfogel@collab.net wrote:
> > I've sometimes thought that too, but we mostly seem to have avoided
> > the need for it.  Can we start out by saying that we have only
> > per-library private symbols, fix everything up to see where that
> > leaves us, and then decide what to do if any problems remain?
> 
> It's a rule which (a) wouldn't buy us much, and (b) would constrain us
> in a number of situations.  (For example, when we need to introduce a
> new function to fix a bug in a 1.2.x release, but we can't extend the
> API.)  So why advocate for it?

Because (b) is simpler to explain and remember.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: libsvn_fs_* make use of functions declared in _private_ libsvn_delta header

Posted by Greg Hudson <gh...@MIT.EDU>.
On Tue, 2005-10-04 at 14:10 -0500, kfogel@collab.net wrote:
> I've sometimes thought that too, but we mostly seem to have avoided
> the need for it.  Can we start out by saying that we have only
> per-library private symbols, fix everything up to see where that
> leaves us, and then decide what to do if any problems remain?

It's a rule which (a) wouldn't buy us much, and (b) would constrain us
in a number of situations.  (For example, when we need to introduce a
new function to fix a bug in a 1.2.x release, but we can't extend the
API.)  So why advocate for it?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: libsvn_fs_* make use of functions declared in _private_ libsvn_delta header

Posted by kf...@collab.net.
Greg Hudson <gh...@MIT.EDU> writes:
> As a matter of general principle, no.  I think we need the ability to
> have cross-library private functions.

I've sometimes thought that too, but we mostly seem to have avoided
the need for it.  Can we start out by saying that we have only
per-library private symbols, fix everything up to see where that
leaves us, and then decide what to do if any problems remain?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: libsvn_fs_* make use of functions declared in _private_ libsvn_delta header

Posted by Greg Hudson <gh...@MIT.EDU>.
On Tue, 2005-10-04 at 18:10 +0100, Max Bowsher wrote:
> The two fs backend implementations both use the functions 
> svn_txdelta__apply_instructions() and svn_txdelta__compose_windows(), which 
> are declared in subversion/libsvn_delta/delta.h.
> 
> If those functions are to be used cross-library, should they not become part 
> of the public API?

As a matter of general principle, no.  I think we need the ability to
have cross-library private functions.

But in this specific instance, yes, I see no reason why we should have
private libsvn_delta functionality exposed to libsvn_fs.  At least
svn_txdelta__compose_windows is from brane; I don't know why he chose to
make that private.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org