Open bryan1anderson opened 8 years ago
Do you have more than one target in your project? If so, was the flags added to the one you are building?
@RobertGummesson no, no other targets. Single target app and they were for sure added to the build settings of the correct target
Just to rule out some possible scenarios, could you try this on another project and see if you have the same issue there?
@bryan1anderson I just managed to experience a similar issue. In my case, I have been playing around with timezones and Xcode got confused when I had log files made in the future and refused to output the build time bodies.
I deleted all folders in the derivedData folder. After that it worked again.
@RobertGummesson I have the same problem. When Im building, I see this
After the build completes, I see this
I followed your advice of deleting derived data. I tried running it on another simpler "New Project" and it worked. But it doesn't work on a larger project that I spend most of my time on. Do you have a troubleshooting list ?
Thanks for this plugin, It will be hugely useful to reduce my build times.
In my case, there is a XCode 'project' and there are multiple XCode 'targets' under that project. I have the settings on the 'target' for my app. But it had the above behavior.
@gprasant I'm afraid deleting derived data hasn't worked for me either
On Tue, May 31, 2016 at 11:31 AM gprasant notifications@github.com wrote:
In my case, there is a XCode 'project' and there are multiple XCode 'targets' under that project. I have the settings on the 'target' for my app. But it had the above behavior.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RobertGummesson/BuildTimeAnalyzer-for-Xcode/issues/30#issuecomment-222760957, or mute the thread https://github.com/notifications/unsubscribe/AHm2SeWOQghTVqaPj0pFsrnHksBGaDqNks5qHHBsgaJpZM4IkunT .
🏆 . I went through my build settings more thoroughly and changed things and got the profiling to work.
@gprasant - Great. What was missing?
@bryan1anderson
It would be useful to narrow down the scope of possible causes. Since I can't reproduce this myself, I will unfortunately need to rely on someone else to give me a hand debugging this.
If I had to guess, the problem is that the productName is not matching workspace name (line 46, CMXcodeWorkspace.swift). If not there, it would be interesting to know where it goes wrong.
To debug this, first build the project you have an issue with to ensure that the build log is created. Then do the following steps:
Something is most likely going wrong in the function logTextForProduct() in CMLogProcessor.swift.
@Gprasant any details that could be helpful to me? On Tue, May 31, 2016 at 12:32 PM gprasant notifications@github.com wrote:
🏆 . I went through my build settings more thoroughly and changed things and got the profiling to work.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RobertGummesson/BuildTimeAnalyzer-for-Xcode/issues/30#issuecomment-222778791, or mute the thread https://github.com/notifications/unsubscribe/AHm2SV4EawQ0pABXj1wfCivBiq1jrAuNks5qHH6zgaJpZM4IkunT .
I'll get on that as soon as I can today and let you know what I find On Tue, May 31, 2016 at 12:33 PM Robert Gummesson notifications@github.com wrote:
@gprasant https://github.com/gprasant - Great. What was missing?
@bryan1anderson https://github.com/bryan1anderson
It would be useful to narrow down the scope of possible causes. Since I can't reproduce this myself, I will unfortunately need to rely on someone else to give me a hand debugging this.
If I had to guess, the problem is that the productName is not matching workspace name (line 46, CMXcodeWorkspace.swift). If not there, it would be interesting to know where it goes wrong.
To debug this, first build the project you have an issue with to ensure that the build log is created. Then do the following steps:
- Download the plug-in source code
- Configure the plug-in to run with Xcode. Edit Scheme. Then select the Run tab. Then under the Info tab, select Xcode as the Debug Executable.
- Run the project. (This launches a second instance of Xcode)
- Open up the project you have an issue with.
- Do Ctrl-Shift B top open up the Build Time Analyzer.
Something is most likely going wrong in the function logTextForProduct() in CMLogProcessor.swift.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RobertGummesson/BuildTimeAnalyzer-for-Xcode/issues/30#issuecomment-222779175, or mute the thread https://github.com/notifications/unsubscribe/AHm2SduoNbFqygx0PwwbwqsO6WD_Tj_Hks5qHH8DgaJpZM4IkunT .
Actually, before debugging the code, it may be worth just checking that the build times are being created properly by Xcode. The steps for manually looking at these are detailed in this post.
my theory is that the compiler flags were not applied correctly at the first try. My build settings look like this :
When I added the compiler flags ( -Xfrontend -debug-time-function-bodies ), it did not get added to the leaf nodes in that tree (The ones that say 'Any Architecture | Any SDK' ). In my second try, I had to make sure the flags were set on the leaf nodes as well. It worked after that. @RobertGummesson is there a chatroom for this repo ?
Thanks for sharing. ...and no, there is no specific chatroom set up for this repo.
Having the same issue on a big project here, it:
Any clue about it? Or do you know how can I debug it?
Thank you! (and thank you for this plugin, it's great! :D)
Hi @Lascorbe
I've used it on projects using CocoaPods and a mix of Swift and Obj-C so at least that can be ruled out as a possible cause. To summarize some of the points you can try:
Hey @RobertGummesson!
Looks like everything is fine but... I'm seeing the same as gprasant here
I'm gonna try different flags configurations and see if I can get it working.
Thank you for your help :)
I have the same behaviour. I tried deleting the DerivedData folder contents but of no use.
I have multiple targets in my application, and I added the flags in Build Settings of my project (not targets). In targets I have ($inherited)
so they all got the flags.
I have the same problem, in my case Derived data option is Relative so that BTA is not working and then I've changed this option to default that BTA is working, but I need to set the derived data option is Relative. Any idea?
i have the same problem
Actually I ran into this because I had globally set the derived data folder to a custom location… so check your derived data path in your XCode > Preferences > Locations
In my case I had my Unit and UI Tests in the App's Target. By setting only the App as a target, it should work.
this issue backed again in 1.0.7 version. in 1.0.6 all ok. Tested with Xcode 9 GM
@threat70 - Thanks for reporting. I just fixed it in v1.0.8.
@RobertGummesson wow, so fast. Thank you :)
Late to this party. For me, the solution was to restart BuildTimeAnalyzer and the logs show up.
I was having these issues and decided to start debugging to see if I could figure out what the issue is. I haven't pin pointed the exact cause, but it does seem to be a timing/threading issue.
I put breakpoints in a few places and as I was stepping through the log processing bit I noticed it was working where it didn't work before. If I turn off the breakpoints it doesn't work again.
Here are the breakpoints that I used:
If I figure out which of the background threads are stomping on which, I'll report back.
Everything seems to be working. I hit build, Build Time Analyzer updates and shows that a build is in progress, but it ends with Status: "No valid logs found"
I have verified that the two Swift flags have been added to the correct target, but still nada