{"push_id":2018774364,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"f6606679907d03c83f9b247f6429b1c03516decf","before":"05484c915f9bfce146b069455c8e8618b3d18bfd","commits":[{"sha":"f6606679907d03c83f9b247f6429b1c03516decf","author":{"name":"Rolf Bjarne Kvinge","email":"7ef5491181287cce389555cfc27213f1f64295e9@xamarin.com"},"message":"[registrar] Store the attribute type separately for availability attributes saved for the registrar. (#2807)\n\nThe registrar requires the availability attributes to work properly, which is\r\nnon-trivial when the linker is being used, because the linker runs before the\r\nregistrar, and will remove availability attributes.\r\n\r\nFor this reason we store the availability attributes separately when the\r\nlinker removes them so that the registrar can still find them, but\r\nunfortunately it's not enough to store the CustomAttribute instance, because\r\nit may end up crippled: if the attribute type itself is removed by the linker,\r\nthen it's not possible to get the attribute type from the CustomAttribute\r\ninstance, because 'attribute.Constructor.DeclaringType' returns null (the\r\nlinker sets the declaring type of the constructor to null).\r\n\r\nSolution: store the attribute type separately; now we use a Tuple of\r\nCustomAttribute and TypeReference.\r\n\r\nFixes this ugly exception:\r\n\r\n    System.NullReferenceException: Object reference not set to an instance of an object\r\n      at XamCore.Registrar.Registrar.RegisterAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00146] in /work/maccore/master/xamarin-macios/src/ObjCRuntime/Registrar.cs:2316\r\n      at XamCore.Registrar.StaticRegistrar.Generate (System.Collections.Generic.IEnumerable`1[T] assemblies, System.String header_path, System.String source_path) [0x00035] in /work/maccore/master/xamarin-macios/tools/common/StaticRegistrar.cs:4197\r\n      at Xamarin.Bundler.RunRegistrarTask.Execute () [0x00001] in /work/maccore/master/xamarin-macios/tools/mtouch/BuildTasks.mtouch.cs:154","distinct":true,"url":"https://api.github.com/repos/xamarin/xamarin-macios/commits/f6606679907d03c83f9b247f6429b1c03516decf"}]}
{"actor":{"display_login":"rolfbjarne"}}