From: Junio C Hamano <gitster@pobox.com>
To: Emily Shaffer <nasamuffin@google.com>
Cc: Git List <git@vger.kernel.org>, Jonathan Nieder <jrn@google.com>,
Jose Lopes <jabolopes@google.com>,
Aleksandr Mikhailov <avmikhailov@google.com>
Subject: Re: Proposal/Discussion: Turning parts of Git into libraries
Date: Tue, 21 Feb 2023 16:22:20 -0800 [thread overview]
Message-ID: <xmqqk00aczwj.fsf@gitster.g> (raw)
In-Reply-To: CAJoAoZn7Nt37Eh17dpLDK+YX2BaEaAaii2rJPXO3L0BmQQkcgQ@mail.gmail.com
Emily Shaffer <nasamuffin@google.com> writes:
>> For example, "die() is inconvenient to callers, let's propagate
>> errors up the callchain" is an easy thing to say, but it would take
>> much more than "let's propagate errors up" to libify something like
>> check_connected() to do the same thing without spawning a separate
>> process that is expected to exit with failure.
>
> Because the error propagation path is complicated, you mean? Or
> because the cleanup is painful?
Both.
The amount of data the caller may want to learn about an error may
not be uneven, depending on the caller even for a single function.
And yes, cleaning up of shared resources like object flag bits after
a traversal, especially a failed one, would be very painful unless
the processing is designed from day one to allow it (and the
revision traversal codepath is not).
> ... is it reasonable to consider, for example, further
> cleanup of cache.h as part of this effort? Is it reasonable to rework
> an ugly circular dependency between two headers as a prerequisite to
> doing library work around one of them?
I am not sure about which two headers you are talking about, but if
there is circular dependency that can be untangled, it would be a
reasonable preliminary clean-up work. I am not sure if that is
"prerequisite"---it is up to folks who want to design how the
"libification" work goes.
next prev parent reply other threads:[~2023-02-22 0:22 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 21:12 Proposal/Discussion: Turning parts of Git into libraries Emily Shaffer
2023-02-17 21:21 ` brian m. carlson
2023-02-17 21:38 ` Emily Shaffer
2023-02-17 22:41 ` brian m. carlson
2023-02-17 22:49 ` Emily Shaffer
2023-02-22 19:34 ` Jeff King
2023-02-24 20:31 ` Emily Shaffer
2023-02-24 21:41 ` Jeff King
2023-02-24 22:59 ` Junio C Hamano
2023-02-17 22:04 ` rsbecker
2023-02-17 22:48 ` brian m. carlson
2023-02-17 22:57 ` Junio C Hamano
2023-02-18 1:59 ` demerphq
2023-02-18 10:36 ` Phillip Wood
2023-03-23 23:22 ` Felipe Contreras
2023-03-23 23:30 ` rsbecker
2023-03-23 23:34 ` Felipe Contreras
2023-03-23 23:42 ` rsbecker
2023-03-23 23:55 ` Felipe Contreras
2023-03-24 19:27 ` rsbecker
2023-03-24 21:21 ` Felipe Contreras
2023-03-24 22:06 ` rsbecker
2023-03-24 22:29 ` Felipe Contreras
2023-02-21 21:42 ` Emily Shaffer
2023-02-22 0:22 ` Junio C Hamano [this message]
2023-02-18 4:05 ` Elijah Newren
2023-02-21 22:06 ` Emily Shaffer
2023-02-22 8:23 ` Elijah Newren
2023-02-22 19:25 ` Jeff King
2023-02-21 19:09 ` Taylor Blau
2023-02-21 22:27 ` Emily Shaffer
2023-02-22 1:44 ` Victoria Dye
2023-02-25 1:48 ` Jonathan Tan
2023-02-22 14:55 ` Derrick Stolee
2023-02-24 21:06 ` Emily Shaffer
2023-03-23 23:37 ` Felipe Contreras
2023-03-23 23:44 ` rsbecker
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqk00aczwj.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avmikhailov@google.com \
--cc=git@vger.kernel.org \
--cc=jabolopes@google.com \
--cc=jrn@google.com \
--cc=nasamuffin@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.