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
[Project] Remove automatic preprocessor macro named after configuration #4148
Conversation
CocoaPods extended the original Xcodeproj behavior when adding a new configuration. A preprocessor definition named after the newly created configuration was automatically configured. This was done to support the TargetEnvironmentHeader specification of Pods available only on certain build configurations. The TargetEnvironmentHeader was removed meanwhile, but that was left.
I'm not convinced we can get rid of the DEBUG define without breaking lots of pods. |
Changes are fine if we decide the change in behavior is what we want |
Yes, we should try to make a well-thought-out decision on that. If we decide against, which would be reasonable, I would update instead just the comment accordingly. For most cases, this will mean that neither An alternative could be to use a less conflict-prone name for the macro, e.g. /c @CocoaPods/core |
I would say, let's break it now and move to a |
I'm not entirely sure I get this change, can someone ELI5 for me? 👼 |
@orta TIL ELI5 :) CP automatically generates preprocessor defines named after the build configurations right now, e.g. This PR removes those preprocessor defines completely, but as it is hard to replicate their existence manually, there would also be the possibility of renaming them to something less likely to cause naming clashes. In any case, if we change this, Pods that rely on the defines for conditional compilation will break. |
Thinking more about this, I don't think it's a good idea to get rid of the |
I'd agree for |
I don't think the other configurations are strictly necessary, but if its something like |
Scoping for 1.0, as this is a breaking change. |
I have an implementation of this locally, will push up tonight. |
This has been succeeded by #4702. |
This addresses #4143.
CocoaPods extended the original Xcodeproj behavior when adding a new configuration. A preprocessor definition named after the newly created configuration was automatically configured. This was done to support the TargetEnvironmentHeader specification of Pods available only on certain build configurations. The TargetEnvironmentHeader was removed meanwhile, but that was left.
Note:
This has potential to break a lot of pods for debugging, especially those which have relied on the
DEBUG=1
definition.Agreement:
DEBUG=1
should be kept, additionally all other configuration macros should be prefixed byPOD_CONFIGURATION_