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

Add a default cshim feature flag #958

Merged
merged 6 commits into from
Dec 18, 2022
Merged

Add a default cshim feature flag #958

merged 6 commits into from
Dec 18, 2022

Commits on Dec 18, 2022

  1. Add a no-cshim feature flag

    This adds a `no-cshim` feature flag to `pgx` and pushes it down to `pgx-pg-sys` and `pgx-tests`.
    
    With this turned on we lose low-level access to a few things:
    
       - `pgx_list*` functions
       - `pgx_planner_rt_fetch()`
       - `pgx_SpinLock*` functions
    
    From `pgx`' perspective, this means a few modules are just not available under `no-cshim`:
    
       - `hooks` (uses `PgList`)
       - `list` (impl for `PgList` which uses `pgx_list*` functions)
       - `namespace` (uses `PgList`)
       - `spinlock` (uses `pgx_SpinLock*` functions)
    
    This feature flag will hopefully make it easier to cross-compile pgx with only a small bit of compromises.  This feature flag was initially designed with [plrust](https://github.com/tcdi/plrust) user functions in mind, and they won't need access to any of the above.
    eeeebbbbrrrr committed Dec 18, 2022
    Configuration menu
    Copy the full SHA
    50839a3 View commit details
    Browse the repository at this point in the history
  2. codereview cleanups

    eeeebbbbrrrr committed Dec 18, 2022
    Configuration menu
    Copy the full SHA
    ce4bcb8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2936a79 View commit details
    Browse the repository at this point in the history
  4. cleanups

    eeeebbbbrrrr committed Dec 18, 2022
    Configuration menu
    Copy the full SHA
    b944f79 View commit details
    Browse the repository at this point in the history
  5. the pgx-tests crate doesn't have a default cshim feature. This is…

    … due to rust-lang/cargo#7160 and how if it were default we wouldn't be able to turn it off from a top-level `cargo test --all --no-default-features --features pg14`.
    eeeebbbbrrrr committed Dec 18, 2022
    Configuration menu
    Copy the full SHA
    9646bdf View commit details
    Browse the repository at this point in the history
  6. after some thought, we want to make sure the Dockerfile builds explic…

    …itly turn on the cshim feature
    eeeebbbbrrrr committed Dec 18, 2022
    Configuration menu
    Copy the full SHA
    9bddc6e View commit details
    Browse the repository at this point in the history