Skip to content

Adapt to pgxntool 2.4.0 and fix tests for current PostgreSQL - #3

Open
jnasbyupgrade wants to merge 11 commits into
adopt-stablefrom
pgxntool-update
Open

jnasbyupgrade wants to merge 11 commits into
adopt-stablefrom
pgxntool-update

Conversation

@jnasbyupgrade

@jnasbyupgrade jnasbyupgrade commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Adapts trunklet-format to the vendored pgxntool 2.4.0 (merged in #6) so make test actually runs and passes on current PostgreSQL. The old base.mk passed --load-language=plpgsql to pg_regress, which PostgreSQL 13 and later reject, and ignored installcheck errors, so make test exited 0 without running any test. pgxntool 2.4.0 runs the suite and exits non-zero on regressions.

Changes needed in trunklet-format:

  • Makefile: removed the local asciidoc rules; base.mk now builds and installs docs itself, and keeping both made make install fail with "will not overwrite just-created".
  • test/expected/base_94*.out, base_95*.out, base_961.out: removed; they have no matching test/sql file and fail pgxntool's stale-expected check.
  • test/sql/base.sql: every multi-row test input is now read through an ORDER BY on explicit positions, so pgTAP test numbers don't depend on the join order the planner picks. (PostgreSQL 17 joined the threw checks' inputs in the other order.)
  • test/load.sql, test/deps.sql, test/sql/{build,reload,search_path}.sql: terse verbosity is set only around the statements that create the extension. extension_drop's install script calls function__arg_types_text() from cat_tools 0.3.0 (which extension_drop pulls in), and that prints a deprecation warning; with verbose output the warning gets a LOCATION: line whose pl_exec.c line number differs between PostgreSQL majors.
  • test/expected/*.out: regenerated with make results (the warning is pinned without its LOCATION: line). Output contains no not ok.

make test passes locally on PostgreSQL 12 and 17. The stacked PR #4 adds CI and raises the supported floor to PostgreSQL 12; its run on top of this branch passes on PostgreSQL 12 through 18, for both a fresh install and the update from 0.2.0 (run 40230691469).

🤖 Generated with Claude Code

jnasbyupgrade and others added 2 commits October 25, 2026 14:10
The old pgxntool passed `--load-language=plpgsql` to pg_regress, which
PG17 rejects, and ignored installcheck errors, so `make test` exited 0
without running anything. pgxntool 2.4.0 runs the suite and fails on
regressions, which surfaced:

- Makefile: drop the local asciidoc rules; `base.mk` now builds and
  installs docs itself, and keeping both made `make install` fail with
  "will not overwrite just-created".
- test/expected: remove the `base_94*`, `base_95*` and `base_961` variant
  files, which have no matching `test/sql` file and fail pgxntool's
  stale-expected check. Regenerated the rest with `make results`: the
  installed trunklet now emits a `function__arg_types_text()` deprecation
  warning on load, and pgTap numbers the `threw` checks in `base` in a
  different order.
- sql/trunklet-format--0.2.0.sql: pgxntool now tracks the current
  version's generated install script instead of ignoring it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 514f2628-64bc-43f2-bd0b-66a45a422387

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jnasbyupgrade
jnasbyupgrade added this pull request to stack #5 October 25, 2026 19:13
jnasbyupgrade and others added 4 commits October 25, 2026 14:27
trunklet's deprecation warning is printed with a `LOCATION:` line naming
a `pl_exec.c` line number, which differs between PostgreSQL majors, so
the expected output only matched one of them. `test/deps.sql` now sets
terse verbosity; expected output regenerated with `make results`.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Order each multi-row test input explicitly (by WITH ORDINALITY / position
column, not by value) so pgTAP test numbers don't depend on the join
order the planner picks. Each throws_ok/is query reads an ordered
subquery or view as its only FROM item so ordering holds on 9.5.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Setting it in test/deps.sql applied it suite-wide. Only the statements
that create extensions emit the deprecation warning whose LOCATION line
varies by PostgreSQL version, so wrap just those.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jnasbyupgrade
jnasbyupgrade removed this pull request from stack #5 October 25, 2026 19:47
@jnasbyupgrade jnasbyupgrade changed the title Update pgxntool to 2.4.0 and fix tests for current PostgreSQL Adapt to pgxntool 2.4.0 and fix tests for current PostgreSQL Oct 25, 2026
@jnasbyupgrade
jnasbyupgrade changed the base branch from master to pgxntool-2.4.0 October 25, 2026 19:47
@jnasbyupgrade
jnasbyupgrade added this pull request to stack #7 October 25, 2026 19:47
Base automatically changed from pgxntool-2.4.0 to master October 25, 2026 19:55
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jnasbyupgrade
jnasbyupgrade removed this pull request from stack #7 October 25, 2026 20:10
@jnasbyupgrade
jnasbyupgrade changed the base branch from master to adopt-stable October 25, 2026 20:10
@jnasbyupgrade
jnasbyupgrade added this pull request to stack #9 October 25, 2026 20:10
jnasbyupgrade and others added 4 commits October 25, 2026 15:16
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant