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

Trying to contribute OpenDirectory framework #673

Open
sheagcraig opened this issue Nov 27, 2024 · 1 comment
Open

Trying to contribute OpenDirectory framework #673

sheagcraig opened this issue Nov 27, 2024 · 1 comment
Labels
A-framework Affects the framework crates and the translator for them enhancement New feature or request

Comments

@sheagcraig
Copy link

Hi! Awesome project that I'm just discovering. I'm working on a project that needs the OpenDirectory framework and I thought I'd take a crack at contributing that.

I added a new workspace crate to /framework-crates/objc2-open-directory and filled in the translation-config.toml as follows:

framework = "OpenDirectory"
crate = "objc2-open-directory"
required-dependencies = ["objc2-foundation"]
macos = "10.6"
maccatalyst = "13.0"

I have Xcode 16.1 with the macOS 15.1 platform support available.

On running cargo run --bin header-translator -- /Applications/Xcode.app/Contents/Developer header-translator starts to get really angry with me:

│ ├─ERROR expected module to be available in library, location=Location { path_components: ["OpenDirectory", "CFOpenDirectory"] }
│ ├─ERROR expected module to be available in library, location=Location { path_components: ["OpenDirectory", "CFOpenDirectory", "CFOpenDirectoryConstants"] }
│ ├─ERROR unknown unexposed attribute, name="__OSX_AVAILABLE_BUT_DEPRECATED_MSG", fnlike=true
│ ├─ERROR unknown unexposed attribute, name="__OSX_AVAILABLE_BUT_DEPRECATED_MSG", fnlike=true
│ ├─ERROR unknown unexposed attribute, name="__OSX_AVAILABLE_BUT_DEPRECATED_MSG", fnlike=true
│ ├─ERROR unknown unexposed attribute, name="__OSX_AVAILABLE_BUT_DEPRECATED_MSG", fnlike=true
│ ├─ERROR expected module to be available in library, location=Location { path_components: ["OpenDirectory", "CFOpenDirectory", "CFODContext"] }
│ ├─ERROR expected module to be available in library, location=Location { path_components: ["OpenDirectory", "CFOpenDirectory", "CFODNode"] }
│ ├─ERROR unknown attribute, attr=ReturnsRetained
│ ├─ERROR unknown attribute, attr=ReturnsRetained
│ ├─ERROR unknown unexposed attribute, name="__OSX_AVAILABLE_BUT_DEPRECATED_MSG", fnlike=true
│ ├─ERROR unknown unexposed attribute, name="__OSX_AVAILABLE_BUT_DEPRECATED_MSG", fnlike=true
│ ├─ERROR unknown unexposed attribute, name="__OSX_AVAILABLE_BUT_DEPRECATED_MSG", fnlike=true
│ ├─ERROR unknown unexposed attribute, name="__OSX_AVAILABLE_BUT_DEPRECATED_MSG", fnlike=true
│ ├─ERROR unknown attribute, attr=ReturnsRetained
│ ├─ERROR expected module to be available in library, location=Location { path_components: ["OpenDirectory", "CFOpenDirectory", "CFODQuery"] }

There's more, but figured I'd start there. Can you give me a nudge in the right direction?

@madsmtm
Copy link
Owner

madsmtm commented Nov 27, 2024

The unknown unexposed attribute ones are easy, should be enough to add them to crates/header-translator/src/unexposed_attr.rs.

I am unsure of the expected module to be available in library, might be because OpenDirectory re-exports CFOpenDirectory too? And I don't think header-translator properly supports that at the moment.

See also #640, I think we might need that to be resolved before OpenDirectory is possible?

@madsmtm madsmtm added enhancement New feature or request A-framework Affects the framework crates and the translator for them labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-framework Affects the framework crates and the translator for them enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants