-
Is your feature request related to a problem? Please describe. Describe the solution you'd like Describe alternatives you've considered Additional context |
Beta Was this translation helpful? Give feedback.
Replies: 13 comments 1 reply
-
This should be a discussion post, or a wiki post, as this isn't an issue with Axmol. The use of ccache is entirely up to the developer. The purpose of the template is to serve as a starting point for developers, with the intention being that the developer modify the project files to suit their requirements. IMHO, adding items unrelated to Axmol into the template is not a good idea, because it adds extra "noise", and becomes yet another item that needs to be maintained. Also, if you do add a wiki post about this, please don't add the PDF file, but just post the text directly in a wiki page. |
Beta Was this translation helpful? Give feedback.
-
Hi Rh101, Having a building time of 15 minutes and having everything rebuild even if you change a single line of code I think this is a Axmol platform issue. This needs to be address. I will agree with you that we may need a different solution to fix the issue. That said, the solution that I'm proposing doesn't force the developers to install ccache. Like I mentioned in the pdf file, If they don't install ccache it will be transparent, nothing will change for them, the build time will long as usual. For the template, I do understand the goal, but I'm sure that anyone would like to have a short build time cycle. Nobody would want to spend 15 minutes building because they changed a single line of code. That's a giving. So my question to you would be how would you like to address the long build time problem. From my understanding Axmol is aiming to be an improvement of coco2d-x, right? The build issue doesn't exist with cocos2d-x, perhaps we can use the same solution that they have if you don't like ccache approach? What do you think? Again, I want to make sure that you understand that I like the Axmol initiative, and I'm supportive of this work. I'm just trying to help to improve things that may be a blocker for some people that would like to make the move. Thank you. |
Beta Was this translation helpful? Give feedback.
-
Sorry, I wasn't quite clear. I didn't mean the Xcode issue is not related to Axmol, but rather that ccache is unrelated to the use of Axmol.
I'm not entirely sure why this is happening, but as far as I can tell, it's only happening with Xcode. It does not happen when creating Windows or Android builds. Perhaps it would be better to find the actual source of this problem than to work-around it with ccache; that is not to say that ccache isn't worthwhile using, it is, but in the end that would be a choice for the developer using Axmol.
As I mentioned previously, the change is not related to the use of Axmol with the project; any developer wishing to use it can simply modify the Adding that unrelated code to the template would place the burden on the maintainers of the project, since that small bit of code still needs to be maintained into the future.
The right thing to do would be to find the underlying issue with Xcode builds, and fix that.
Axmol is a continuation and improvement in terms of functionality and support, and while the API may be somewhat compatible, the code-base has diverged significantly (particularly thirdparty modules). These differences would have some effect on build times, but the build times are not a reflection on whether one engine is better than the other. Documentation, such as the wiki, is there for developers to learn both about Axmol and things that may be useful to them when working with Axmol. Adding a section regarding improving build times is a perfect fit for that, whether or not we discover the true issue causing the long build time in Xcode. Also, just out of curiousity, what are the specs of the Mac used for compilation (CPU/memory etc.)? |
Beta Was this translation helpful? Give feedback.
-
I also agree that the focus should be on figuring out why rebuilds are happening, because ccache doesn't fix the issue, it just scales it down. |
Beta Was this translation helpful? Give feedback.
-
Hi guys, So from my understanding, we have 2 action items:
Please let me know if my understanding is correct. Thank you guys, |
Beta Was this translation helpful? Give feedback.
-
Hi rh101, Thank you, |
Beta Was this translation helpful? Give feedback.
-
Using latest Axmol (current dev branch), Xcode 15.0.1 and CMake 3.29.1, I've attempt many tests so far, changing code in C++, ObjC and Swift source files, and not once has the project re-built from scratch. Is there a step missing from your instructions on how to reproduce this issue? Here is exactly what I attempted on an existing large project: @asnagni What steps am I missing in order to reproduce the issue? Another test: |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Thanks for the information. Just one thing thing that may cause you issues is that you shouldn't be adding the pod file to the build folder. The build folder is temporary, and shouldn't have any file manually placed in there that belongs to the project, especially a file you will be checking into your source control (such as the pod file). Now, with regards to the pod file, it should be placed in the root folder of your project, and in it, set the "project" line as follows (based on your "PROJECT_NAME" example above):
You no longer need to copy it into the build folder. If you need to support multiple architectures, then use text replacement for a An example of that would be the code the
It should replace the I'm not sure if this would make any difference to your builds, but based on the info you posted, the only real difference is the OS and Xcode versions. I'll update my Mac to Sonoma 14.4.1 and Xcode 15.3, and do the test again in a day or so. |
Beta Was this translation helpful? Give feedback.
-
That is excellent news!
When you use Cocoa Pods with your project, you should be loading the Regardless, I'm really glad it is working now. If you're certain that this is resolved, then please close this issue. :) |
Beta Was this translation helpful? Give feedback.
-
Hi rh101,
I was thinking maybe the issue may be in env variables. Something may be wrong. We checked and couldn't see anything. Maybe you may be able to see something: TERM_PROGRAM=Apple_Terminal Thank you, |
Beta Was this translation helpful? Give feedback.
-
This is really strange, and I don't see anything obvious in the environment settings. What is the "random change" you made? Is it just a change to the source code, or did you change anything in the |
Beta Was this translation helpful? Give feedback.
-
It tooks 10+ minutes to build a hello world c++ or lua project, that's .. |
Beta Was this translation helpful? Give feedback.
Hi guys,
Thank you for the feedback, I do really appreciate. I think we are all on the same page here. At the end of the day we want the same thing, which is have an awesome system and people are having fun coding 😊👍.
So from my understanding, we have 2 action items:
1) Action item 1: Based on rh101 proposal, I will publish the ccache solution as a workaround on a wiki page to help anyone that may be facing the same problem. It will help them speed up their build process by a factor 8 minimum.
Please let me know if my understanding is correct.
Thank you guys,
Stay safe