Skip to content

Migrate tasks from Makefile to poe#475

Open
anuraaga wants to merge 7 commits into
bufbuild:mainfrom
anuraaga:makefile-poe
Open

Migrate tasks from Makefile to poe#475
anuraaga wants to merge 7 commits into
bufbuild:mainfrom
anuraaga:makefile-poe

Conversation

@anuraaga
Copy link
Copy Markdown
Contributor

@anuraaga anuraaga commented Jun 4, 2026

Fixes #474

We like to use poe now for Python projects. For reference, connect-python

This also

anuraaga added 3 commits June 4, 2026 16:26
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
@anuraaga anuraaga requested a review from jonbodner-buf June 4, 2026 07:32
Comment thread .github/workflows/ci.yaml Outdated
@@ -48,10 +48,10 @@ jobs:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a stale reference to Makefile?

@jonbodner-buf
Copy link
Copy Markdown
Contributor

Issues found by Claude:

  • uv sync --frozen silently breaks the lowest-direct matrix leg

    The ci job runs a matrix over resolution: ["highest", "lowest-direct"] via UV_RESOLUTION. The old make install ran plain uv sync, which honors UV_RESOLUTION and actually resolves the lowest direct deps. The migration changed this to uv sync --frozen and --frozen installs exactly what's in uv.lock, ignoring UV_RESOLUTION entirely. So the lowest-direct leg now installs the same locked (highest) versions as highest; it tests nothing. This also explains why the dropped CI comment mattered:

# When running with matrix.resolution == lowest-direct, we expect uv.lock to change, but we don't want that file checked in.

That comment was attached to make checkgenerate and is gone. The fix is to not use --frozen in the ci job (keep it only where you want frozen, e.g. lint).

  • Code generation is no longer a clean regen

    The old make generate did rm -rf src && mkdir ... and rm -rf gen before regenerating. The new scripts/generate_protovalidate.py / generate_cel.py / generate-test do no cleanup (confirmed — no rmtree/rm). buf export/buf generate overwrite and add files but never delete, so a proto removed upstream leaves an orphaned *_pb2.py/.pyi that poe diffcheck won't catch (the orphan is already committed → no diff). The migration lost the clean-slate guarantee.

@jonbodner-buf
Copy link
Copy Markdown
Contributor

couple more Claude-discovered issues:

  • poe format doesn't format protos, but poe lint checks them

    Old make format ran buf format --write. The new format task is only format-python + format-toml + add-license-header — no proto formatting. Meanwhile lint-protos still runs buf format -d --exit-code. A contributor with a misformatted .proto (there are hand-written ones: proto/tests/example/v1/validations.proto, test/proto/...) can't fix it with poe format and will fail poe lint. Add a format-protos (buf format -w) step.

  • PROTOVALIDATE_VERSION is no longer overridable

    poe_tasks.toml sets it as a hard [env] value:

  [env]
  PROTOVALIDATE_VERSION = "v1.2.0"

The Makefile used ?= (overridable from the shell). poe's plain [env] assignment overrides the host env, so PROTOVALIDATE_VERSION=… uv run poe generate no longer works. Use the default form:

PROTOVALIDATE_VERSION.default = "v1.2.0".

@anuraaga
Copy link
Copy Markdown
Contributor Author

anuraaga commented Jun 5, 2026

Thanks fixed them

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.

Ensure new protovalidate releases can be validated

2 participants