Xcake sets build settings to targets in a strange way
maximkhatskevich opened this issue · 16 comments
It seems like my settings only being set on the Build Configurations that are named "Debug" and "Release". Even if I define custom build configurations in the beginning of the file, anything except "Debug" and "Release" is being ignored, so the other build configurations are getting default Xcode settings.
Xcake 0.8.8
@maximkhatskevich do you have a cakefile and example project file ? Will be good to see how these configurations are created :)
@jcampbell05 my Cakefile looks almost identical as the sample Cakefile I added to the repo. The same structure.
@maximkhatskevich I'll run it now and see what happens.
Okay, thanks! Let me know if you can reproduce it on your side @jcampbell05
@maximkhatskevich So I've picked up what the problem is.
It seems either Xcake is incorrectly creating or Xcode is automatically adding the Release and Debug configurations under certain conditions. The fact the build settings are missing, makes me believe it could be Xcode doing this and Xcake needs to add in the information to stop it doing this.
If it turns out that Xcode is hardcoded to do this (Which I suspect it is) then I guess we will always have to have Debug and Release configurations declared in Xcake (Which is probably a sensible thing to do anyways).
When you declare at least one debug or release configuration then Xcake stops automatically generating the Release or Debug configurations and will generate all the ones you've specified.
In the Cakemania one the Debug one is explicitly declared along with Staging so when the all_configurations method is used the settings are set but Release isn't explicitly declared but we have declared more than one release configuration, so to Xcake there is no Release configuration however it looks like Xcode creates it with the default settings.
Okay, good that you can see it on your side as well. Are you going to investigate it more? Keep me posted, please. That's important thing.
@maximkhatskevich I am looking into what happens between Xcake generating it and Xcode opening it to see if we have any options.
For now you should add declarations for Debug and Release in your Cakefile to fix it as a Workaround:
project.debug_configuration :Debug
project.release_configuration :Release
Let me know if this fixes it
Although I re-read your description and it seems I'm getting opposite problem to you.
Yes, obviously if I stick with just standard Build Configurations - then the issue is gone. Okay, got it.
Really?
What do you mean by "opposite"? Your settings are being set to custom configurations only, except standard "Debug" and "Release"?
What do you mean by "opposite"? Your settings are being set to custom configurations only, except standard "Debug" and "Release"?
Yes, Debug and Release are only set if.
a) I have no custom configurations
b) I have custom configurations and I declare the Debug and Release configurations explicitly, like so:
project.debug_configuration :Debug
project.release_configuration :Release
Then I think the issue is the same :) Whatever I set Configurations explicitly or not - the only configurations are properly configured in the result project file are "Debug" and "Release". Any custom Configurations (if were presented in Cakefile along with explicitly declared "Debug" and "Release") stay misconfigured - configured with default Xcode settings, not the custom one I define in Cakefile.
Does it make sense? Are we experiencing the same issue? :)
@maximkhatskevich I think its the same however the otherway around, from what I understand your custom configurations don't get the settings you are configuring however the default configurations do.
For me its the other way round, my custom configurations get the build settings but the default debug and release configurations are misconfigured unless explicity declared (Cakemania for example declares the Debug configuration so the Debug and custom configurations are fine but Release is not since that isn't declared).
I've been testing with Ruby 2.3 and I think you use the System ruby so let me just quickly check there isn't any subtle language difference.
@maximkhatskevich can you see what happens when you make the Cakemania project. I just did it and I got these:
This should be fixed on the f/Fix0.8.10
branch which we will release in 0.8.10