diff mbox series

[RFC/PATCH] pack-redundant: escalate deprecation warning to an error

Message ID 20230323204047.GA9290@coredump.intra.peff.net (mailing list archive)
State Accepted
Commit 4406522b76138c2bd3d110ac9de0d860ba2be5ed
Headers show
Series [RFC/PATCH] pack-redundant: escalate deprecation warning to an error | expand

Commit Message

Jeff King March 23, 2023, 8:40 p.m. UTC
In c3b58472be2 (pack-redundant: gauge the usage before proposing its
removal, 2020-08-25), we added a big, ugly warning when pack-redundant
is run. The plan there indicated that we would ratchet that up to an
error before finally removing it. Since it has been 2.5 years (and 9
releases) since then, let's continue with the plan.

Note that we did get one bite on the warning, which was somebody asking
about alternatives:

  https://lore.kernel.org/git/CAKvOHKAFXQwt4D8yUCCkf_TQL79mYaJ=KAKhtpDNTvHJFuX1NA@mail.gmail.com/

but we didn't undo the ugly warning (and the advice continues to be "use
repack -d" instead).

There was also some discussion around the time of the deprecation that
pack-redundant was invoked by the bitbake tool, and it still seems to do
so now:

  https://git.openembedded.org/bitbake

That use should probably just go away in favor of an occasional repack
(which probably even happens via auto-gc after fetch these days).

But since neither of those data points caused us to cancel the
deprecation plan by dropping the warning, it seems like we should
proceed with the next step.

Signed-off-by: Jeff King <peff@peff.net>
---
I was looking in this file recently, and was reminded of the deprecation
plan. The two data points above do give me a little bit of pause, but it
seems like the current state is the worst of both worlds: we do not have
the benefit of dropping the code, and people who try to use the command
have a bad experience. So we should probably either proceed (as with
this patch), or decide we need to keep pack-redundant.

 builtin/pack-redundant.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Junio C Hamano March 23, 2023, 8:56 p.m. UTC | #1
Jeff King <peff@peff.net> writes:

> I was looking in this file recently, and was reminded of the deprecation
> plan. The two data points above do give me a little bit of pause, but it
> seems like the current state is the worst of both worlds: we do not have
> the benefit of dropping the code, and people who try to use the command
> have a bad experience. So we should probably either proceed (as with
> this patch), or decide we need to keep pack-redundant.

Sounds like a good thing to do.  Will queue.  Thanks.

>
>  builtin/pack-redundant.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
> index 82115c5808c..5e93d873208 100644
> --- a/builtin/pack-redundant.c
> +++ b/builtin/pack-redundant.c
> @@ -604,6 +604,7 @@ int cmd_pack_redundant(int argc, const char **argv, const char *prefix)
>  			"option, '--i-still-use-this', on the command line\n"
>  			"and let us know you still use it by sending an e-mail\n"
>  			"to <git@vger.kernel.org>.  Thanks.\n"), stderr);
> +		die(_("refusing to run without --i-still-use-this"));
>  	}
>  
>  	if (load_all_packs)
Taylor Blau March 23, 2023, 9:16 p.m. UTC | #2
On Thu, Mar 23, 2023 at 01:56:26PM -0700, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > I was looking in this file recently, and was reminded of the deprecation
> > plan. The two data points above do give me a little bit of pause, but it
> > seems like the current state is the worst of both worlds: we do not have
> > the benefit of dropping the code, and people who try to use the command
> > have a bad experience. So we should probably either proceed (as with
> > this patch), or decide we need to keep pack-redundant.
>
> Sounds like a good thing to do.  Will queue.  Thanks.

Yeah, I agree with and am persuaded by the "worst of both worlds"
argument. I think that changing this to a die() is sensible for now.

At what point would it be fair to drop this builtin entirely from the
tree?

Thanks,
Taylor
Junio C Hamano March 23, 2023, 9:23 p.m. UTC | #3
Taylor Blau <me@ttaylorr.com> writes:

> On Thu, Mar 23, 2023 at 01:56:26PM -0700, Junio C Hamano wrote:
>> Jeff King <peff@peff.net> writes:
>>
>> > I was looking in this file recently, and was reminded of the deprecation
>> > plan. The two data points above do give me a little bit of pause, but it
>> > seems like the current state is the worst of both worlds: we do not have
>> > the benefit of dropping the code, and people who try to use the command
>> > have a bad experience. So we should probably either proceed (as with
>> > this patch), or decide we need to keep pack-redundant.
>>
>> Sounds like a good thing to do.  Will queue.  Thanks.
>
> Yeah, I agree with and am persuaded by the "worst of both worlds"
> argument. I think that changing this to a die() is sensible for now.
>
> At what point would it be fair to drop this builtin entirely from the
> tree?

I notice that "git pack-redundant --help" does not say anything
about its deprecation.  We probably should add one together with
the patch in question, and then consider that the count-down timer
has finally started.

The timer should last probably for at least a few cycles.
diff mbox series

Patch

diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
index 82115c5808c..5e93d873208 100644
--- a/builtin/pack-redundant.c
+++ b/builtin/pack-redundant.c
@@ -604,6 +604,7 @@  int cmd_pack_redundant(int argc, const char **argv, const char *prefix)
 			"option, '--i-still-use-this', on the command line\n"
 			"and let us know you still use it by sending an e-mail\n"
 			"to <git@vger.kernel.org>.  Thanks.\n"), stderr);
+		die(_("refusing to run without --i-still-use-this"));
 	}
 
 	if (load_all_packs)