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

[Feature request] Conditional/version-gated property definitions in @objcproperties macro #46

Closed
christiangnrd opened this issue Dec 26, 2024 · 1 comment

Comments

@christiangnrd
Copy link
Contributor

christiangnrd commented Dec 26, 2024

Would prevent situations like this:

https://github.com/JuliaGPU/Metal.jl/blob/6a760a60a33b864b2c7fa3e856e38e1e6299f871/lib/mps/ndarray.jl#L52-L75

where the whole code block has to be duplicated just to add 3 definitions.

An in-macro version of this would allow for cleaner code and would allow for easier integration with the AVAILABILITY attributes once Clang header generation is supported.

This would require that either Metal.macos_version() be moved to this package, or maybe the macro take a predicate for each property definition?

@maleadt
Copy link
Member

maleadt commented Jan 7, 2025

Implemented by #48

@maleadt maleadt closed this as completed Jan 7, 2025
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

No branches or pull requests

2 participants