Skip to content

Conversation

@jonpryor
Copy link
Contributor

@jonpryor jonpryor commented Apr 3, 2017

Commits prior to Java.Interop/5eeb287b had a bug in
Xamarin.Android.Cecil.csproj which would cause it to constantly
generate new assemblies whenever it was built.

The result being that:

xbuild src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj

would always take a lengthy amount of time -- ~36 seconds -- even
when "nothing has changed." In fact, something had changed:
Xamarin.Android.Cecil.dll had changed, necessitating that
every project that references it also be rebuilt, in a cascading
manner:

  Target CoreCompile needs to be built as input file '.../xamarin-android/external/Java.Interop/bin/Debug//Xamarin.Android.Cecil.dll' is newer than output file 'obj/Debug/Xamarin.Android.Tools.Aidl.dll'
  Target CoreCompile needs to be built as input file '.../xamarin-android/external/Java.Interop/bin/Debug//Xamarin.Android.Cecil.dll' is newer than output file 'obj/Debug/Java.Interop.Tools.Diagnostics.dll'
  Target CoreCompile needs to be built as input file '.../xamarin-android/external/Java.Interop/bin/Debug//Java.Interop.Tools.Diagnostics.dll' is newer than output file 'obj/Debug/Java.Interop.Tools.Cecil.dll'
  Target CoreCompile needs to be built as input file '.../xamarin-android/external/Java.Interop/bin/Debug//Java.Interop.Tools.Cecil.dll' is newer than output file 'obj/Debug/Java.Interop.Tools.JavaCallableWrappers.dll'
   Target CoreCompile needs to be built as input file '.../xamarin-android/external/Java.Interop/bin/Debug//Xamarin.Android.Cecil.dll' is newer than output file 'obj/Debug/generator.exe'
   Target CoreCompile needs to be built as input file '.../xamarin-android/external/Java.Interop/bin/Debug//Xamarin.Android.Cecil.dll' is newer than output file 'obj/Debug/jcw-gen.exe'
    Target CoreCompile needs to be built as input file '.../xamarin-android/external/Java.Interop/bin/Debug//Xamarin.Android.Cecil.dll' is newer than output file 'obj/Debug/remap-assembly-ref.exe'
  Target _BuildJNIEnv needs to be built as input file '../../bin/BuildDebug/jnienv-gen.exe' is newer than output file 'Android.Runtime/JNIEnv.g.cs'
  Target _GenerateMonoAndroidDex18 needs to be built as input file '../../bin/Debug/lib/xbuild-frameworks/MonoAndroid/v7.1/mono.android.jar' is newer than output file '../../bin/Debug/lib/xbuild-frameworks/MonoAndroid/v7.1/mono.android.dex'
Target CoreCompile needs to be built as input file 'obj/Debug/Profile.g.cs' is newer than output file 'obj/Debug/Xamarin.Android.Build.Tasks.dll'

This is maddening, and serves no purpose.

Java.Interop/5eeb287b fixed Xamarin.Android.Cecil.csproj so that it
wouldn't constantly regenerate the output assembly, which should help
improve the cascading rebuild situation.

Commits prior to Java.Interop/5eeb287b had a bug in
`Xamarin.Android.Cecil.csproj` which would cause it to constantly
generate new assemblies whenever it was built.

The result being that:

	xbuild src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj

would *always* take a lengthy amount of time -- ~36 seconds -- even
when "nothing has changed." In fact, something *had* changed:
`Xamarin.Android.Cecil.dll` had changed, necessitating that
*every project that references it* also be rebuilt, in a cascading
manner:

	  Target CoreCompile needs to be built as input file '.../xamarin-android/external/Java.Interop/bin/Debug//Xamarin.Android.Cecil.dll' is newer than output file 'obj/Debug/Xamarin.Android.Tools.Aidl.dll'
	  Target CoreCompile needs to be built as input file '.../xamarin-android/external/Java.Interop/bin/Debug//Xamarin.Android.Cecil.dll' is newer than output file 'obj/Debug/Java.Interop.Tools.Diagnostics.dll'
	  Target CoreCompile needs to be built as input file '.../xamarin-android/external/Java.Interop/bin/Debug//Java.Interop.Tools.Diagnostics.dll' is newer than output file 'obj/Debug/Java.Interop.Tools.Cecil.dll'
	  Target CoreCompile needs to be built as input file '.../xamarin-android/external/Java.Interop/bin/Debug//Java.Interop.Tools.Cecil.dll' is newer than output file 'obj/Debug/Java.Interop.Tools.JavaCallableWrappers.dll'
	   Target CoreCompile needs to be built as input file '.../xamarin-android/external/Java.Interop/bin/Debug//Xamarin.Android.Cecil.dll' is newer than output file 'obj/Debug/generator.exe'
	   Target CoreCompile needs to be built as input file '.../xamarin-android/external/Java.Interop/bin/Debug//Xamarin.Android.Cecil.dll' is newer than output file 'obj/Debug/jcw-gen.exe'
	    Target CoreCompile needs to be built as input file '.../xamarin-android/external/Java.Interop/bin/Debug//Xamarin.Android.Cecil.dll' is newer than output file 'obj/Debug/remap-assembly-ref.exe'
	  Target _BuildJNIEnv needs to be built as input file '../../bin/BuildDebug/jnienv-gen.exe' is newer than output file 'Android.Runtime/JNIEnv.g.cs'
	  Target _GenerateMonoAndroidDex18 needs to be built as input file '../../bin/Debug/lib/xbuild-frameworks/MonoAndroid/v7.1/mono.android.jar' is newer than output file '../../bin/Debug/lib/xbuild-frameworks/MonoAndroid/v7.1/mono.android.dex'
	Target CoreCompile needs to be built as input file 'obj/Debug/Profile.g.cs' is newer than output file 'obj/Debug/Xamarin.Android.Build.Tasks.dll'

This is maddening, and serves no purpose.

Java.Interop/5eeb287b fixed `Xamarin.Android.Cecil.csproj` so that it
wouldn't constantly regenerate the output assembly, which should help
improve the cascading rebuild situation.
@jonpryor jonpryor merged commit 518e57c into dotnet:master Apr 3, 2017
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Dec 19, 2019
Changes: dotnet/java-interop@f3553f4...d61b329

  * dotnet/java-interop@d61b329 [Java.Interop-Tests] Relax Exception.Message checks (dotnet#544)
  * dotnet/java-interop@d778204 [Java.Interop] Better linker-friendly JavaObjectArray<T>.ValueMarshaler (dotnet#546)
  * dotnet/java-interop@4bd07e0 [vs-code] Recommend the zbecknell.t4-support extension (dotnet#545)
  * dotnet/java-interop@3b24a2c [Java.Interop] apply AggressiveInlining where profiler shows calls (dotnet#541)
jonpryor added a commit that referenced this pull request Dec 20, 2019
Changes: dotnet/java-interop@f3553f4...d61b329

  * dotnet/java-interop@d61b329 [Java.Interop-Tests] Relax Exception.Message checks (#544)
  * dotnet/java-interop@d778204 [Java.Interop] Better linker-friendly JavaObjectArray<T>.ValueMarshaler (#546)
  * dotnet/java-interop@4bd07e0 [vs-code] Recommend the zbecknell.t4-support extension (#545)
  * dotnet/java-interop@3b24a2c [Java.Interop] apply AggressiveInlining where profiler shows calls (#541)
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants