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

Blocklist c.h #940

Closed
wants to merge 1 commit into from
Closed

Blocklist c.h #940

wants to merge 1 commit into from

Conversation

workingjubilee
Copy link
Member

This header is used by Postgres, but is not of real use to PGX, as all it does is include various internally-used interfaces. This also reduces about 1MB from the generated symbols.

It seems to work on our tested Linux distros:
https://github.com/tcdi/pgx/actions/runs/3653997966/jobs/6174023739

@thomcc This affects the bindings significantly.

This header is used by Postgres, but is not of real use to PGX,
as all it does is include various internally-used interfaces.
This also reduces about 1MB from the generated symbols.
@eeeebbbbrrrr
Copy link
Contributor

eeeebbbbrrrr commented Dec 10, 2022

A problem with this is that struct varlena and struct nameData, along with some of their typedefs, are right there in c.h. Because why wouldn't they be?

Not sure we should merge this...

@workingjubilee
Copy link
Member Author

Huh. After generating the bindings for all versions, they continue to include

#[repr(C)]
#[derive(Debug, Default)]
pub struct varlena {
    pub vl_len_: [::std::os::raw::c_char; 4usize],
    pub vl_dat: __IncompleteArrayField<::std::os::raw::c_char>,
}
// more bindings
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nameData {
    pub data: [::std::os::raw::c_char; 64usize],
}

Not sure what to make of this, aside from maybe "blocklisting files doesn't work".

@workingjubilee workingjubilee marked this pull request as draft December 10, 2022 21:32
@thomcc
Copy link
Contributor

thomcc commented Feb 1, 2023

blocklisting files doesn't work

Indeed. Bindgen doesn't really have good ideas about files, sadly.

@workingjubilee workingjubilee deleted the blocklist-c.h branch June 20, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants