Closed thiagohmcruz closed 3 years ago
Added 1 suggestion inline - I was also curious about if this was some internal thing or part of the cocoapods spec?
This is to support dogfood builds in internal apps but I'm trying to find a generic solution here, suggestions appreciated!
So the predicate configuration
is in cocoapods? I noticed it in the docs here:
https://guides.cocoapods.org/syntax/podspec.html#dependency
I'm not super familiar with how that logic is working: e.g. doesn't that add the dependencies to both of them? I'd suggest to follow that behavior as the source of truth / requirements.
So the predicate
configuration
is in cocoapods? I noticed it in the docs here:https://guides.cocoapods.org/syntax/podspec.html#dependency
I'm not super familiar with how that logic is working: e.g. doesn't that add the dependencies to both of them? I'd suggest to follow that behavior as the source of truth / requirements.
I think I have a way to solve it without introducing a breaking change
Thx for the feedback here, will push the changes soon!
@congt @jerrymarino this changed significantly and it's now a opt-in feature, PTAL.
Could you document the usage of deps_config_setting_overrides
somewhere?
FYI working on some changes discussed offline with @congt. Essentially we'll go back to the original implementation here but as an opt-in feature instead of changing behaviour.
We agreed that giving the users the ability to override the configs with any arbitrary config can cause confusion and depending on the usage client side can become fragile (the bazel config can be anything, and that can cause conflicts in the select()
statements depending on the consumer's setup).
So I'll make the API here more strict, the underlying behaviour will be the same. A consumer will be able to set a boolean saying feature_custom_deps_config_name = true/false
(or something like that) and then cocoapods-bazel
will generate
//Pods/cocoapods-bazel:deps_debug
//Pods/cocoapods-bazel:deps_release
Instead of //Pods/cocoapods-bazel:debug
//Pods/cocoapods-bazel:release
Only for the deps
attr. This way we decouple other attrs and deps
and the API is still limited to a strict set of values defined by cocoapods-bazel
.
One other opt-in feature will be something like feature_deps_generate_debug_and_release = true/false
so on top of the above a consumer can also ask cocoapods-bazel
to generate debug_and_release
deps (to address the use case mentioned in the PR description)
These feature can be combined or used independently
.podspec
specification in favour of generatingBUILD
files that enable usage of bazel features that not necessarily exist in cocoapods.Podfile
config remain untouched, trade off here is that tests were duplicated so all cases can be validated against a run with experimental features enabled.experimental_deps_debug_and_release
with this description: