From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Cc: Collin Funk <collin.funk1@gmail.com>
Subject: Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 27.
Date: Fri, 23 Feb 2024 14:08:01 +0100 [thread overview]
Message-ID: <5696932.e9J7NaK4W3@nimes> (raw)
In-Reply-To: <a0b07013-e042-46eb-a459-3e2c57668f41@gmail.com>
Hello Collin,
Collin Funk wrote:
> Hello, here is a patch implementing the --gnu-make option for
> gnulib-tool.py.
Thanks! Applied. This was already a major piece of work.
> All of these
> commits were grouped together and were similar so I felt like it
> didn't make too much sense to handle them separately.
Yes, keeping them together was the right thing to do.
> I ended up testing these changes with Paul Eggert's merge-gnulib
> script used by Emacs [1]. Maybe there is a better way to test it but
> this seemed to work pretty well. First I would update the sources with
> the regular gnulib-tool, save the generated Makefile, and then run the
> script again with gnulib-tool.py.
Perfect. That's the perfect way to test it this --gnu-make option.
Just three small nits that you might want to revisit:
* gnulib-tool.py line 610:
+ if modules != None and "tests" in mode and gnu_make:
^^^^^^^^^^^^^^^^^^^
What is the rationale for this condition? It is not present in the original. Can
it be removed?
* pygnulib/GLEmiter.py lines 732, 739:
+ allsnippets += re.sub(r'^if (.*)', r'ifneq (,$(\1))', amsnippet1)
+ allsnippets += re.sub(r'^if (.*)', r'ifneq (,$(\1))', amsnippet2)
The regular expression is duplicated. The problem with duplicated code is
that it very often leads to bugs in the future: Future code maintainers
will see one copy of the piece of code, modify it, and leave the other
copy unchanged. Sometimes it's a bug because it's inconsistent; sometimes it's
a bug because the other copy lacks the feature for which the modification
was made in the first copy.
So, the lesson is: Try hard to avoid code duplication!
* pygnulib/GLConfig.py line 802:
Typo: Autmake -> Automake.
Bruno
next prev parent reply other threads:[~2024-02-23 13:10 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 5:23 [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 27 Collin Funk
2024-02-23 13:08 ` Bruno Haible [this message]
2024-02-23 22:20 ` Collin Funk
2024-02-23 23:51 ` Bruno Haible
2024-02-24 2:36 ` Collin Funk
2024-02-24 5:49 ` gnulib-tool.py: Follow gnulib-tool changes, part 28 Collin Funk
2024-02-24 23:25 ` gnulib-tool.py: Follow gnulib-tool changes, part 27 Bruno Haible
2024-02-25 0:03 ` Dima Pasechnik
2024-02-25 11:57 ` Python != None Bruno Haible
2024-02-25 19:29 ` Collin Funk
2024-02-25 20:07 ` Collin Funk
2024-02-26 20:38 ` pycodestyle configuration Bruno Haible
2024-02-26 21:31 ` Collin Funk
2024-02-26 22:54 ` Bruno Haible
2024-02-27 0:51 ` Collin Funk
2024-02-27 2:38 ` Bruno Haible
2024-02-27 4:22 ` Collin Funk
2024-02-25 20:55 ` Python != None Dima Pasechnik
2024-02-25 12:02 ` Python 'strings' Bruno Haible
2024-02-25 19:05 ` Collin Funk
2024-02-24 23:42 ` gnulib-tool.py: Follow gnulib-tool changes, part 28 Bruno Haible
2024-02-25 0:47 ` Collin Funk
2024-02-25 1:18 ` Collin Funk
2024-02-25 1:25 ` Bruno Haible
2024-02-25 3:32 ` Collin Funk
2024-02-26 20:51 ` Bruno Haible
2024-02-28 11:51 ` Collin Funk
2024-02-28 12:14 ` Bruno Haible
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: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5696932.e9J7NaK4W3@nimes \
--to=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
--cc=collin.funk1@gmail.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 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).