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

Change the way "provisional" works for Darwin availability. #28105

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

Instead of treating it as "not supported" and not generating code at all, generate the code but wrap some of it in MTR_ENABLE_PROVISIONAL and mark the rest with MTR_PROVISIONALLY_AVAILABLE.

The definition of MTR_PROVISIONALLY_AVAILABLE in turn depends on whether MTR_ENABLE_PROVISIONAL is defined. If it's not, those things are marked as NS_UNAVAILABLE and hidden linker visibility, to avoid people depending on them.

This allows compiling the framework with support for the provisional things, while making the default not support them.

darwin-framework-tool is changed to set MTR_ENABLE_PROVISIONAL when YAML tests are enabled, so we can stop excluding tests from there.

Instead of treating it as "not supported" and not generating code at all,
generate the code but wrap some of it in MTR_ENABLE_PROVISIONAL and mark the
rest with MTR_PROVISIONALLY_AVAILABLE.

The definition of MTR_PROVISIONALLY_AVAILABLE in turn depends on whether
MTR_ENABLE_PROVISIONAL is defined.  If it's not, those things are marked as
NS_UNAVAILABLE and hidden linker visibility, to avoid people depending on them.

This allows compiling the framework with support for the provisional things,
while making the default not support them.

darwin-framework-tool is changed to set MTR_ENABLE_PROVISIONAL when YAML tests
are enabled, so we can stop excluding tests from there.
@bzbarsky-apple bzbarsky-apple merged commit f684b80 into project-chip:master Jul 20, 2023
@bzbarsky-apple bzbarsky-apple deleted the darwin-provisional branch July 20, 2023 20:57
erwinpan1 pushed a commit to erwinpan1/connectedhomeip that referenced this pull request Jul 21, 2023
…chip#28105)

Instead of treating it as "not supported" and not generating code at all,
generate the code but wrap some of it in MTR_ENABLE_PROVISIONAL and mark the
rest with MTR_PROVISIONALLY_AVAILABLE.

The definition of MTR_PROVISIONALLY_AVAILABLE in turn depends on whether
MTR_ENABLE_PROVISIONAL is defined.  If it's not, those things are marked as
NS_UNAVAILABLE and hidden linker visibility, to avoid people depending on them.

This allows compiling the framework with support for the provisional things,
while making the default not support them.

darwin-framework-tool is changed to set MTR_ENABLE_PROVISIONAL when YAML tests
are enabled, so we can stop excluding tests from there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants