[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 55.

2024-03-11 Thread Collin Funk
I've attached a pretty simple patch that fixes an item in gnulib-tool.py.TODO. It fixes a lot of the remaining lines in the diff between gnulib-tool and gnulib-tool.py which is nice. Specifically, it fixes the CFLAGS value used for building the Gnulib source files. Then it adds some extra rules

Cause of --add-import issue and proposed solution

2024-03-11 Thread Collin Funk
Hello, I have discovered the cause of the --add-import issue. It is simpler than I originally thought. It seems that a code path is taken where the value of 'sourcebase' in the GLConfig is not set. Then in GLImport.rewrite_new_files this line is taken: path = constants.substart('lib/',

Re: gnulib-tool.py --add-import fails

2024-03-11 Thread Collin Funk
On 3/11/24 2:46 AM, Collin Funk wrote: > So I think it is safe to say the problem occurs somewhere around > there... All of those modules are Coreutils --local-dir modules. Then > dynamic typing things happen. I just started looking into this issue a bit more. With a clean Coreutils directory, I

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 51.

2024-03-11 Thread Collin Funk
Hi Bruno, On 3/11/24 4:32 AM, Bruno Haible wrote: > Another GNU package in the same realm is GNU Bison. If you like regular > expression and automata theory, you will like GNU Bison as well. Thanks for the suggestion. I've never gotten around to using YACC or GNU Bison, surprisingly. I'll find

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54.

2024-03-11 Thread Collin Funk
On 3/11/24 5:37 AM, Bruno Haible wrote: > There is a pitfall with the list.join('\n') idiom: it's mainly designed for > non-empty lists. I therefore add the patch below. Ah, I see what you mean. I didn't even think of this case... Good catch. Thanks. Collin

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 52.

2024-03-11 Thread Collin Funk
On 3/11/24 4:57 AM, Bruno Haible wrote: > This looks good to me. 'sed' accepts POSIX BREs, where '(' and '[' stand for > the literal '(' and '[' characters unless escaped. Thanks for double checking for me. > Also, I applied the attached follow-up, in order to make the logic of the code > easier

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54.

2024-03-11 Thread Bruno Haible
Hi Collin, > > - A function _eliminate_NMD_from_line that takes a single line as argument > > and return a line or None. > > - A function _eliminate_NMD that invokes _eliminate_NMD_from_line on each > > line of the snippet, and combines the results? > > I tried to implement it as you

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 52.

2024-03-11 Thread Bruno Haible
Hi Collin, > On 3/10/24 5:13 AM, Bruno Haible wrote: > > automake_options = {x for y in configure_ac_automake_options for x in > > y.split()} > > I've attached the fixed patch. Thanks, applied. > I would like to double check the regular expression I used: > > pattern =

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 51.

2024-03-11 Thread Bruno Haible
Hi Collin, > The POSIX BRE vs. ERE along with backreferences, assertions, lazy vs. > greedy matching allowed by some languages adds multiple layers of > complexity which starts to hurt my brain. :) Yes, the many variants of regular expressions are complicated... > The DFA module also looks

gnulib-tool.py --add-import fails

2024-03-11 Thread Collin Funk
Hi Simon, On 3/11/24 1:06 AM, Simon Josefsson wrote: > Trying gnulib-tool.py on OATH Toolkit (which use a somewhat unorthodox > gnulib usage style by adding code into git) results in error below. I > thought it was a missing mkdir at some point, but I couldn't find a > solution... ideas? I was

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54.

2024-03-11 Thread Collin Funk
Hi Bruno, I have attached two updated patches for 0003 and 0004. On 3/10/24 6:18 AM, Bruno Haible wrote: > In the function _eliminate_NMD, the list accumulation expressions are a bit > complex. Sorry, fixed. I am a big fan of Python's list comprehensions [1]. :) I will concede that they can get

Re: planning for beta-testing gnulib-tool.py

2024-03-11 Thread Simon Josefsson via Gnulib discussion list
I like the plan to replace gnulib-tool with a faster implementation, and a two-year migration phase sounds reasonable to see if it will work in practice. Trying gnulib-tool.py on OATH Toolkit (which use a somewhat unorthodox gnulib usage style by adding code into git) results in error below. I