Thread: BUG #14203: pgindent requires pg_bsd_indent 1.2, but only 1.3 available for download
BUG #14203: pgindent requires pg_bsd_indent 1.2, but only 1.3 available for download
From
sthomas@datawareventures.com
Date:
VGhlIGZvbGxvd2luZyBidWcgaGFzIGJlZW4gbG9nZ2VkIG9uIHRoZSB3ZWJz aXRlOgoKQnVnIHJlZmVyZW5jZTogICAgICAxNDIwMwpMb2dnZWQgYnk6ICAg ICAgICAgIFN0ZXZlIFRob21hcwpFbWFpbCBhZGRyZXNzOiAgICAgIHN0aG9t YXNAZGF0YXdhcmV2ZW50dXJlcy5jb20KUG9zdGdyZVNRTCB2ZXJzaW9uOiA5 LjMuMwpPcGVyYXRpbmcgc3lzdGVtOiAgIFVidW50dQpEZXNjcmlwdGlvbjog ICAgICAgIAoKSSdtIGZvbGxvd2luZyB0aGUgUkVBRE1FIGluIHNyYy90b29s cy9wZ2luZGVudC4gVGhlIGluc3RydWN0aW9ucyBzYXkgdG8KZG93bmxvYWQg YW5kIGluc3RhbGwgcGdfYnNkX2luZGVudCBmcm9tIGZ0cDovL2Z0cC5wb3N0 Z3Jlc3FsLm9yZy9wdWIvZGV2LiBBdAp0aGF0IHNpdGUsIEkgc2VlIGEgZmls ZSBwZ19ic2RfaW5kZW50LTEuMy50YXIuZ3osIGFuZCBJIGRvd25sb2FkIGFu ZCBpbnN0YWxsCml0LiBUaGVuLCBJIHRyeSB0byBydW4gcGdpbmRlbnQsIGFu ZCBpdCBzYXlzOg0KDQpZb3UgZG8gbm90IGFwcGVhciB0byBoYXZlIHBnX2Jz ZF9pbmRlbnQgdmVyc2lvbiAxLjIgaW5zdGFsbGVkIG9uIHlvdXIKc3lzdGVt Lg0KDQoNCkkgaGFja2VkIHBnaW5kZW50IHRvIGFjY2VwdCAxLjMuIFRoaXMg dGltZSBpdCByYW4sIGJ1dCBjaGFuZ2VkIGxvdHMgYW5kIGxvdHMKb2YgZmls ZXMuIChJIGFzc3VtZSBiZWNhdXNlIHBnX2JzZF9pbmRlbnQgMS4zIG1ha2Vz IGRpZmZlcmVudCBjaG9pY2VzIHRoYW4KcGdfYnNkX2luZGVudCAxLjIuKQ0K DQpEb2VzIGFueW9uZSBrbm93IHdoZXJlIEkgY2FuIGZpbmQgcGdfYnNkX2lu ZGVudCAxLjI/IAoK
Re: BUG #14203: pgindent requires pg_bsd_indent 1.2, but only 1.3 available for download
From
Tom Lane
Date:
sthomas@datawareventures.com writes: > I hacked pgindent to accept 1.3. This time it ran, but changed lots and lots > of files. (I assume because pg_bsd_indent 1.3 makes different choices than > pg_bsd_indent 1.2.) > Does anyone know where I can find pg_bsd_indent 1.2? I'm not sure why we're not keeping the older tarballs online, but there's not that much difference between 1.2 and 1.3 --- see attached diff. I think your problem may be in expecting that 9.3.x is pgindent-clean. We don't normally re-pgindent stable branches, so unless committers are careful to manually indent whatever they back-patch, branches will drift away from a clean state. If you're trying to validate that you have a non-broken build of pgindent, I'd suggest checking out the immediately post-pgindent state from our git repo. The 9.3 run was at commit 9af4159fc. regards, tom lane diff -cr pg_bsd_indent-1.2/Makefile pg_bsd_indent-1.3/Makefile *** pg_bsd_indent-1.2/Makefile Wed Oct 12 12:17:12 2011 --- pg_bsd_indent-1.3/Makefile Thu Jan 30 22:32:50 2014 *************** *** 31,35 **** --- 31,38 ---- clean: rm -f *.o $(TARGET) log core + distclean: clean + rm -f tags ID + install: $(TARGET) install -s -o bin -g bin $(TARGET) /usr/local/bin diff -cr pg_bsd_indent-1.2/args.c pg_bsd_indent-1.3/args.c *** pg_bsd_indent-1.2/args.c Mon Aug 27 09:25:53 2012 --- pg_bsd_indent-1.3/args.c Thu Jan 30 22:09:31 2014 *************** *** 83,89 **** #include <string.h> #include "indent_globs.h" ! #define INDENT_PG_VERSION "1.2" /* profile types */ #define PRO_SPECIAL 1 /* special case */ --- 83,89 ---- #include <string.h> #include "indent_globs.h" ! #define INDENT_PG_VERSION "1.3" /* profile types */ #define PRO_SPECIAL 1 /* special case */ Only in pg_bsd_indent-1.2: indent.bsd.patch diff -cr pg_bsd_indent-1.2/indent.c pg_bsd_indent-1.3/indent.c *** pg_bsd_indent-1.2/indent.c Mon Nov 14 19:30:01 2005 --- pg_bsd_indent-1.3/indent.c Thu Jan 30 22:06:43 2014 *************** *** 550,555 **** --- 550,562 ---- case newline: if (ps.last_token != comma || ps.p_l_follow > 0 || !ps.leave_comma || ps.block_init || !break_comma || s_com != e_com) { + /* don't newline on cpp lines like #endif */ + if (buf_ptr[0] == '#') + { + ps.just_saw_decl = 0; + prefix_blankline_requested = 0; + postfix_blankline_requested = 0; + } dump_line(); ps.want_blank = false; } Only in pg_bsd_indent-1.3: netbsd.patch
Re: BUG #14203: pgindent requires pg_bsd_indent 1.2, but only 1.3 available for download
From
Stephen Thomas
Date:
Thanks, Tom. You're right, my mistake was assuming that 9.3.3 was pgindent-clean. Now I understand that that's not necessarily the case! And thanks for the pg_bsd_indent patch. There's not much of a difference between the two so I won't worry. On Mon, Jun 20, 2016 at 3:50 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > sthomas@datawareventures.com writes: > > I hacked pgindent to accept 1.3. This time it ran, but changed lots and > lots > > of files. (I assume because pg_bsd_indent 1.3 makes different choices > than > > pg_bsd_indent 1.2.) > > Does anyone know where I can find pg_bsd_indent 1.2? > > I'm not sure why we're not keeping the older tarballs online, but there's > not that much difference between 1.2 and 1.3 --- see attached diff. > > I think your problem may be in expecting that 9.3.x is pgindent-clean. > We don't normally re-pgindent stable branches, so unless committers are > careful to manually indent whatever they back-patch, branches will drift > away from a clean state. If you're trying to validate that you have a > non-broken build of pgindent, I'd suggest checking out the immediately > post-pgindent state from our git repo. The 9.3 run was at commit > 9af4159fc. > > regards, tom lane > > -- Stephen Thomas COO, Dataware Ventures http://www.datawareventures.com
Re: BUG #14203: pgindent requires pg_bsd_indent 1.2, but only 1.3 available for download
From
Bruce Momjian
Date:
On Mon, Jun 20, 2016 at 03:50:27PM -0400, Tom Lane wrote: > sthomas@datawareventures.com writes: > > I hacked pgindent to accept 1.3. This time it ran, but changed lots and lots > > of files. (I assume because pg_bsd_indent 1.3 makes different choices than > > pg_bsd_indent 1.2.) > > Does anyone know where I can find pg_bsd_indent 1.2? > > I'm not sure why we're not keeping the older tarballs online, but there's > not that much difference between 1.2 and 1.3 --- see attached diff. I can put the 1.2 version online, but I figured only HEAD would use pgindent, and I wasn't sure how to specify which major versions require which pg_bsd_indent version. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +