RFC: split OBJS lines to one object per line

Поиск
Список
Период
Сортировка
От Andres Freund
Тема RFC: split OBJS lines to one object per line
Дата
Msg-id 20191029200901.vww4idgcxv74cwes@alap3.anarazel.de
обсуждение исходный текст
Ответы Re: RFC: split OBJS lines to one object per line
Re: RFC: split OBJS lines to one object per line
Список pgsql-hackers
Hi,

one of the most frequent conflicts I see is that two patches add files
to OBJS (or one of its other spellings), and there are conflicts because
another file has been added.

Right now there's two reasons why that's likely to happen:
1) By listing multiple objects for each line, we get a conflict whenever
   one of the other files on that lines gets modified
2) Due to our line-length conventions, we have to re-flow long lines,
   which often triggers reflowing subsequent lines too.

Now, obviously these types of conflicts are easy enough to resolve, but
it's still annoying.  It seems that this would be substantially less
often a problem if we just split such lines to one file per
line. E.g. instead of

OBJS_COMMON = base64.o config_info.o controldata_utils.o d2s.o exec.o f2s.o \
    file_perm.o ip.o keywords.o kwlookup.o link-canary.o md5.o \
    pg_lzcompress.o pgfnames.o psprintf.o relpath.o \
    rmtree.o saslprep.o scram-common.o string.o  stringinfo.o \
    unicode_norm.o username.o wait_error.o

have

OBJS_COMMON = \
    base64.o \
    config_info.o \
    controldata_utils.o \
    d2s.o \
    exec.o \
    f2s.o \
    file_perm.o \
    ip.o \
    keywords.o \
    kwlookup.o \
    link-canary.o \
    md5.o \
    pg_lzcompress.o \
    pgfnames.o \
    psprintf.o \
    relpath.o \
    rmtree.o \
    saslprep.o \
    scram-common.o \
    string.o \
    stringinfo.o \
    unicode_norm.o \
    username.o \
    wait_error.o

a one-off conversion of this seems easy enough to script.

Comments?

- Andres



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Rearranging ALTER TABLE to avoid multi-operations bugs
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Add const qualifiers to internal range type APIs