Skip to content

CI: check imports with customs, and break the connection/copy cycle - #20

Merged
winding-lines merged 1 commit into
mainfrom
customs
Nov 15, 2026
Merged

winding-lines merged 1 commit into
mainfrom
customs

Conversation

@winding-lines

Copy link
Copy Markdown

Adds a customs job (https://github.com/ouromo/customs, v0.2.0) and makes it part of the ci gate. It checks that no modules import each other in a cycle, and that each name is imported from the module that defines it, not one that re-exports it (a package's __init__.mojo may).

postgres.connection and postgres.copy imported each other: connection for CopyIn/CopyOut, copy for _ConnCell and the helpers that run commands and raise errors on it. Those (_ConnCell, _trim, _affected_rows, _result_error, _record, _raise_error, _open_conn, _raise_result, _closed_error, drain_results, drain_results_quietly, discard_copy_quietly) move unchanged into postgres/_cell.mojo, which both import; nothing public changes.

Checked locally: pixi run unit, server, lint and examples pass.

🤖 Generated with Claude Code

`postgres.connection` and `postgres.copy` imported each other: `connection` for `CopyIn`/`CopyOut`, `copy` for `_ConnCell` and the helpers that run commands and raise errors on it. Those (`_ConnCell`, `_trim`, `_affected_rows`, `_result_error`, `_record`, `_raise_error`, `_open_conn`, `_raise_result`, `_closed_error`, `drain_results`, `drain_results_quietly`, `discard_copy_quietly`) move unchanged into `postgres/_cell.mojo`, which both import; nothing public changes.

Checked locally: `pixi run unit`, `server`, `lint` and `examples` pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@winding-lines
winding-lines merged commit 4e43f0a into main Nov 15, 2026
8 checks passed
@winding-lines
winding-lines deleted the customs branch November 15, 2026 17:29
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