git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Stefan Beller <sbeller@google.com>
Cc: git@vger.kernel.org, jonathantanmy@google.com
Subject: Re: [RFC PATCH 00/19] Bring more repository handles into our code base
Date: Fri, 12 Oct 2018 11:50:37 -0700	[thread overview]
Message-ID: <20181012185037.GA52080@aiede.svl.corp.google.com> (raw)
In-Reply-To: <20181011211754.31369-1-sbeller@google.com>

Hi,

Stefan Beller wrote:

> This applies on nd/the-index (b3c7eef9b05) and is the logical continuation of
> the object store series, which I sent over the last year.
>
> The previous series did take a very slow and pedantic approach,
> using a #define trick, see cfc62fc98c for details, but it turns out,
> that it doesn't work:

Thanks for the heads up --- this will remind me to review this new
series more carefully, since it differs from what was reviewed before.

I think this will be easiest to review with --function-context.  I can
generate that diff locally, so no need to resend.

>    When changing the signature of widely used functions, it burdens the
>    maintainer in resolving the semantic conflicts.
>
>    In the orginal approach this was called a feature, as then we can ensure
>    that not bugs creep into the code base during the merge window (while such
>    a refactoring series wanders from pu to master). It turns out this
>    was not well received and was just burdensome.

I don't agree with this characterization.

The question of who resolves conflicts is separate from the question
of whether conflicts appear, which is in turn separate from the
question of whether the build breaks.

I consider making the build break when a caller tries to use a
half-converted function too early to be a very useful feature.  There
is a way to do that in C++ that allows decoupled conversions, but the
C version forced an ordering of the conversions.  It seems that the
pain was caused by the combination of

 1. that coupling, which forced an ordering on the conversions and
    prevented us from ordering the patches in an order based on
    convenience of integration (unlike e.g. the "struct object_id"
    series which was able to proceed by taking a batch covering a
    quiet area of the tree at a time)

 2. as you mentioned, removal of old API at the same time of addition
 of new API forced callers across the tree to update at once

 3. the lack of having decided how to handle the anticipated churn

Now most of the conversions are done (thanks much for that) so the
ordering (1) is not the main remaining pain point.  Thanks for
tackling the other two in this series.

I want future API changes to be easier.  That means tackling the
following questions up front:

 i. Where does this fit in Rusty's API rating scheme
    <http://sweng.the-davies.net/Home/rustys-api-design-manifesto>?
    Does misuse (or misconverted callers) break the build, break
    visibly at runtime, or are the effects more subtle?

 ii. Is there good test coverage for the new API?  Are there tests
     that need to be migrated?

 iii. Is there a way to automatically migrate callers, or does this
      require manual, error-prone work (thanks for tackling that in
      this one.)

 iv. How are we planning to handle multiple patches in flight?  Will
     the change produce merge conflicts?  How can others on the list
     help the maintainer with integrating this set of changes?

 iv. Is the ending point cleaner than where we started?

The #define trick you're referring to was a way of addressing (i).

[...]
>  79 files changed, 571 insertions(+), 278 deletions(-)

Most of the increase is in the coccinelle file and in improved
documentation.

It appears that some patches use a the_index-style
NO_THE_REPOSITORY_COMPATIBILITY_MACROS backward compatibility synonym
and others don't.  Can you say a little more about this aspect of the
approach?  Would the compatibility macros go away eventually?

Thanks,
Jonathan

  parent reply	other threads:[~2018-10-12 18:50 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-11 21:17 [RFC PATCH 00/19] Bring more repository handles into our code base Stefan Beller
2018-10-11 21:17 ` [PATCH 01/19] sha1_file: allow read_object to read objects in arbitrary repositories Stefan Beller
2018-10-11 21:17 ` [PATCH 02/19] packfile: allow has_packed_and_bad to handle " Stefan Beller
2018-10-11 21:17 ` [PATCH 03/19] object-store: allow read_object_file_extended to read from " Stefan Beller
2018-10-11 21:58   ` Jonathan Tan
2018-10-11 21:17 ` [PATCH 04/19] object-store: prepare read_object_file to deal with " Stefan Beller
2018-10-11 22:01   ` Jonathan Tan
2018-10-11 22:02     ` Stefan Beller
2018-10-11 21:17 ` [PATCH 05/19] object: parse_object to honor its repository argument Stefan Beller
2018-10-11 22:11   ` Jonathan Tan
2018-10-13  0:00     ` Stefan Beller
2018-10-11 21:17 ` [PATCH 06/19] commit: allow parse_commit* to handle arbitrary repositories Stefan Beller
2018-10-11 21:17 ` [PATCH 07/19] commit.c: allow paint_down_to_common " Stefan Beller
2018-10-11 21:17 ` [PATCH 08/19] commit.c: allow merge_bases_many " Stefan Beller
2018-10-11 21:17 ` [PATCH 09/19] commit.c: allow remove_redundant " Stefan Beller
2018-10-11 21:17 ` [PATCH 10/19] commit: allow get_merge_bases_many_0 " Stefan Beller
2018-10-11 21:17 ` [PATCH 11/19] commit: prepare get_merge_bases " Stefan Beller
2018-10-11 21:17 ` [PATCH 12/19] commit: prepare get_commit_buffer " Stefan Beller
2018-10-11 21:17 ` [PATCH 13/19] commit: prepare in_merge_bases[_many] " Stefan Beller
2018-10-11 21:17 ` [PATCH 14/19] commit: prepare repo_unuse_commit_buffer " Stefan Beller
2018-10-11 21:17 ` [PATCH 15/19] commit: prepare logmsg_reencode " Stefan Beller
2018-10-11 21:17 ` [PATCH 16/19] pretty: prepare format_commit_message " Stefan Beller
2018-10-11 22:22   ` Jonathan Tan
2018-10-11 21:17 ` [PATCH 17/19] submodule: use submodule repos for object lookup Stefan Beller
2018-10-11 22:40   ` Jonathan Tan
2018-10-13  0:20     ` Stefan Beller
2018-10-16 19:30     ` Stefan Beller
2018-10-16 23:13       ` Jonathan Tan
2018-10-16 23:16         ` Stefan Beller
2018-10-11 21:17 ` [PATCH 18/19] submodule: don't add submodule as odb for push Stefan Beller
2018-10-11 23:00   ` Jonathan Tan
2018-10-11 23:09     ` Stefan Beller
2018-10-11 21:17 ` [PATCH 19/19] Apply semantic patches from previous patches Stefan Beller
2018-10-11 23:07 ` [RFC PATCH 00/19] Bring more repository handles into our code base Jonathan Tan
2018-10-11 23:31 ` Junio C Hamano
2018-10-12 18:50 ` Jonathan Nieder [this message]
2018-10-13  0:30   ` Stefan Beller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181012185037.GA52080@aiede.svl.corp.google.com \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).