Bug 30223 - _CompileToNative rebuilding when not necessary (Wrong input/output?)
Summary: _CompileToNative rebuilding when not necessary (Wrong input/output?)
Status: RESOLVED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: MSBuild ()
Version: 2.0.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2015-05-19 10:20 UTC by Chris Hamons
Modified: 2015-09-08 16:31 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Chris Hamons 2015-05-19 10:20:59 UTC

    
Comment 1 Chris Hamons 2015-05-19 10:21:20 UTC
See log here: https://gist.githubusercontent.com/alanmcgovern/ff4f693543e87e1ca8f9/raw/gistfile1.txt

Alan - trigger it by building github.com/xamarin/interactive
Comment 2 Chris Hamons 2015-05-19 10:22:05 UTC
@Jeff - I believe this is a bug in the msbuild logic? Is this something on your side of the house?

If not, pass back to me.
Comment 3 Jeffrey Stedfast 2015-07-30 11:53:03 UTC
I'm confused. The log says that it is *not* running the _CompileToNative task because the outputs are already up-to-date:

Done building target "_CompileEntitlements" in project "/Users/alan/Projects/md-addins/external/interactive/Xamarin.Interactive.Agents.iOS.Unified/Xamarin.Interactive.Agents.iOS.Unified.csproj" ("/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets"); "_CompileToNative" depends on it.
			Target _CompileToNative:
			Skipping target "_CompileToNative" because its outputs are up-to-date.
			Done building target "_CompileToNative" in project "/Users/alan/Projects/md-addins/external/interactive/Xamarin.Interactive.Agents.iOS.Unified/Xamarin.Interactive.Agents.iOS.Unified.csproj".
		Done building target "_CompileToNative" in project "/Users/alan/Projects/md-addins/external/interactive/Xamarin.Interactive.Agents.iOS.Unified/Xamarin.Interactive.Agents.iOS.Unified.csproj"


Yet the title of this bug report says that it is running _CompileToNative when it *shouldn't*?
Comment 4 Rolf Bjarne Kvinge [MSFT] 2015-07-31 05:02:40 UTC
@Jeff, I think you're looking at the wrong _CompileToNative Task: 

> Building target "_CompileToNative" in project "/Users/alan/Projects/md-addins/external/interactive/Xamarin.Interactive.Agents.Mac/Xamarin.Interactive.Agents.Mac.csproj" ("/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets"); "_CreateAppBundle" depends on it.
> Building target "_CompileEntitlements" in project "/Users/alan/Projects/md-addins/external/interactive/Xamarin.Interactive.Agents.Mac/Xamarin.Interactive.Agents.Mac.csproj" ("/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets"); "_CompileToNative" depends on it.
> Target _CompileEntitlements skipped due to false condition: '$(EnableCodeSigning)'
> Done building target "_CompileEntitlements" in project "/Users/alan/Projects/md-addins/external/interactive/Xamarin.Interactive.Agents.Mac/Xamarin.Interactive.Agents.Mac.csproj" ("/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets"); "_CompileToNative" depends on it.
> 	Target _CompileToNative:
> 	Target _CompileToNative needs to be built as output file '../bin/XamarinInteractiveAgentsMac.app/XamarinInteractiveAgentsMac.exe' does not exist.
> 	Task "Mmp"
Comment 5 Jeffrey Stedfast 2015-07-31 08:05:01 UTC
Oh, in that case, yes, this is a bug in the targets file. The Outputs value is looking for the exe in the wrong place.
Comment 6 Jeffrey Stedfast 2015-09-08 16:31:12 UTC
fixed in the xcode7 branch

commit 4e33167fe933873089e076b334f9776442db07cf
Author: Jeffrey Stedfast <jeff@xamarin.com>
Date:   Tue Sep 8 16:30:13 2015 -0400

    [msbuild] Fixed Mac targets to check proper output path for native exe
    
    Fixes bug #30223