Skip to content
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

No Valid Logs Found #30

Open
bryan1anderson opened this issue May 23, 2016 · 27 comments
Open

No Valid Logs Found #30

bryan1anderson opened this issue May 23, 2016 · 27 comments

Comments

@bryan1anderson
Copy link

screen shot 2016-05-23 at 11 40 33 am

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

screen shot 2016-05-23 at 12 05 13 pm

@RobertGummesson
Copy link
Owner

RobertGummesson commented May 23, 2016

Do you have more than one target in your project? If so, was the flags added to the one you are building?

@bryan1anderson
Copy link
Author

@RobertGummesson no, no other targets. Single target app and they were for sure added to the build settings of the correct target

@RobertGummesson
Copy link
Owner

Just to rule out some possible scenarios, could you try this on another project and see if you have the same issue there?

@RobertGummesson
Copy link
Owner

@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.

@gprasant
Copy link

@RobertGummesson I have the same problem.
When Im building, I see this

building

After the build completes, I see this

no logs

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.

@gprasant
Copy link

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.

@bryan1anderson
Copy link
Author

@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
#30 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AHm2SeWOQghTVqaPj0pFsrnHksBGaDqNks5qHHBsgaJpZM4IkunT
.

@gprasant
Copy link

🏆 . I went through my build settings more thoroughly and changed things and got the profiling to work.

@RobertGummesson
Copy link
Owner

@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:

  • 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.

@bryan1anderson
Copy link
Author

@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
#30 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AHm2SV4EawQ0pABXj1wfCivBiq1jrAuNks5qHH6zgaJpZM4IkunT
.

@bryan1anderson
Copy link
Author

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
#30 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AHm2SduoNbFqygx0PwwbwqsO6WD_Tj_Hks5qHH8DgaJpZM4IkunT
.

@RobertGummesson
Copy link
Owner

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.

@gprasant
Copy link

my theory is that the compiler flags were not applied correctly at the first try. My build settings look like this :

screen shot 2016-05-31 at 11 43 12 am

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 ?

@RobertGummesson
Copy link
Owner

Thanks for sharing. ...and no, there is no specific chatroom set up for this repo.

@Lascorbe
Copy link

Lascorbe commented Jul 26, 2016

Having the same issue on a big project here, it:

  • It's a mix of swift and objc.
  • Uses CocoaPods.
  • Workspace and Target are the same name.

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)

@RobertGummesson
Copy link
Owner

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:

  • Ensure that the compiler flags are added to the appropriate nodes (as per @gprasant's post).
  • Ensure that what you are building matches the target you added the flags to.
  • Check if the build times are being created properly by Xcode (see my last comment from May 31)
  • Clean the project and then rebuild while the window is open.

@Lascorbe
Copy link

Lascorbe commented Jul 28, 2016

Hey @RobertGummesson!

  • Ensure that the compiler flags are added to the appropriate nodes (as per @gprasant's post).
  • Ensure that what you are building matches the target you added the flags to.
  • Check if the build times are being created properly by Xcode (see my last comment from May 31)
  • Clean the project and then rebuild while the window is open.

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 :)

@preraksola
Copy link

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.

@hsleedevelop
Copy link

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?

@d1248966459
Copy link

i have the same problem

@klausbussekw
Copy link

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

@leovido
Copy link

leovido commented Aug 21, 2017

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.

build-time

@AnisovAleksey
Copy link

this issue backed again in 1.0.7 version. in 1.0.6 all ok. Tested with Xcode 9 GM

@RobertGummesson
Copy link
Owner

@threat70 - Thanks for reporting. I just fixed it in v1.0.8.

@AnisovAleksey
Copy link

@RobertGummesson wow, so fast. Thank you :)

@davidbjames
Copy link

Late to this party. For me, the solution was to restart BuildTimeAnalyzer and the logs show up.

@kmcginnes
Copy link

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:

Screen Shot 2019-11-25 at 8 59 56 AM

If I figure out which of the background threads are stomping on which, I'll report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests