Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaffold the build interface #1

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Scaffold the build interface #1

merged 1 commit into from
Nov 4, 2024

Conversation

theory
Copy link
Member

@theory theory commented Oct 16, 2024

The Builder struct defines the public interface for building a PGXN release. Internally, it delegates configure, compile, and test commands (so far) to pipeline-specific build modules. Its new constructor reads the pgxn_meta Release pipeline to determine which one to instantiate; in the future it will also fall back on detecting the pipeline where none is specified.

The error module define errors returned by the crate, while the pipeline module defines a trait with the functions Builder expects to dispatch to. All pipelines must implement this trait. This will make it easy to add new pipelines in the future; They just have to implement the trait, add a new Build enum, then add appropriate calls to its methods in Builder's dispatching methods.

For now, the pgxs and pgrx modules alone define structs that implement the pipeline.Pipeline trait with no-op functions.

Add tests for basic functionality of Builder.

@theory theory requested a review from vrmiguel October 16, 2024 16:32
@theory theory self-assigned this Oct 16, 2024
The `Builder` struct defines the public interface for building a PGXN
release. Internally, it delegates `configure`, `compile`, and `test`
commands (so far) to pipeline-specific build modules. Its `new`
constructor reads the pgxn_meta Release pipeline to determine which one
to instantiate; in the future it will also fall back on detecting the
pipeline where none is specified.

The `error` module define errors returned by the crate, while the
`pipeline` module defines a trait with the functions `Builder` expects
to dispatch to. All pipelines must implement this trait. This will make
it easy to add new pipelines in the future; They just have to implement
the trait, add a new `Build` enum, then add appropriate calls to its
methods in `Builder`'s dispatching methods.

For now, the `pgxs` and `pgrx` modules alone define structs that
implement the `pipeline.Pipeline` trait with no-op functions.

Add tests for basic functionality of `Builder`.
@theory theory merged commit 4ae3125 into main Nov 4, 2024
12 checks passed
@theory theory deleted the interface branch November 4, 2024 22:45
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.

2 participants