* [Foundation] Simplify NSValue code to use [No*] instead of ifdefs.
Also enable the MKCoordinateSpan and CLLocationCoordinate2D values for NSValue
in macOS, since they're now available (since macOS 10.9).
Type Changed: Foundation.NSValue
Added properties:
public virtual MapKit.MKCoordinateSpan CoordinateSpanValue { get; }
public virtual CoreLocation.CLLocationCoordinate2D CoordinateValue { get; }
* [Foundation] Mark the new NSValue selectors as 64-bit only.
* [xharness] Add support for running XI projects with different platform configurations.
* [xharness] Run dont link, link all and link sdk tests in both Debug and Release in the simulator. Fixes#53181.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=53181.
* [tests] Fix dont link to always optimize C# code in release mode.
* [tests] No need to weak link GameController anymore in dont link.
This was removed long ago from the Debug configurations, so remove it from the
Release configuration as well.
- Obsolete `ARFaceAnchor`'s default constructor because it's marked as unavailable.
- Obsolete `CreateFaceGeometry` in `ARSCNFaceGeometry` in favor of `Create` (same as `ARSCNPlaneGeometry`).
* [xharness] Ask mono to not attach gdb/ldb when XM tests crash.
Attaching gdb/ldb usually hangs, thus causing the test run to time out instead
of finishing early (due to the crash).
Also bump the timeout for finding crash reports to 60 seconds when the tests
crash, since macOS can be quite slow to create the crash report.
* [xharness] Timestamp mac logs to aid diagnostics.
We must call VerifyRun for each subtest in the aggregated simulator test run
in order to mark those subtests as failed if there's no available device.
Fixes https://github.com/xamarin/maccore/issues/623.
This class and protocol were incorrectly added to our macOS bindings.
The catch is that we can't remove them because it would break backwards
compatibility, so mark them for removal in XAMCORE_4_0.
* [ObjCRuntime] Add a BindingImplAttribute.
* [linker] Make ProviderToString an extension method on ICustomAttributeProvider to make it more discoverable.
* [generator] Use [BindingImpl] instead of [CompilerGenerated].
The entire diff is big (89MB), so it can't be gisted. However, most of it is
either removal of `using System.Runtime.CompilerServices;` or the change from
`[CompilerGenerated]` to `[BindingImpl (...)]` like this:
https://gist.github.com/rolfbjarne/8bfda3ed37b956d0342a1c1e9b079244
If I remove those parts of the diff, there's nothing significant left:
https://gist.github.com/rolfbjarne/4156164d6bdb1376366200394eb8a091
* [linker] Teach the linker about the new [BindingImpl] attribute.
In addition to the existing logic where the linker would optimize some
[CompilerGenerated] code (sometimes with additional requirements), it will now
also optimize all [BindingImpl (Optimizable)] code (without any additional
requirements).
* [tests] Add tests to make sure [BindingImpl (Optimizable)] works as expected.
* [linker] Check for [BindingImpl] before [CompilerGenerated] and stop checking for [CompilerGenerated] in XAMCORE_4_0.
Check for [BindingImpl] before checking for [CompilerGenerated], since the
former is more common.
Also stop checking for [CompilerGenerated] (at least to mean that code is
optimizable) in our next non-compatible evolutionary leap (XAMCORE_4_0):
* [introspection] Impl a better typo check.
Fixes this test failure:
1) Failed : Xamarin.MMP.Tests.MMPTests.UnifiedWithLinking_ShouldHaveFewFrameworkClangLines
Found more framework entries in clang invocation then expected - Foundation AppKit QuartzCore CoreData Quartz CoreFoundation CoreServices Security Carbon CloudKit
xcrun -sdk macosx clang -mmacosx-version-min=10.7 -arch x86_64 -fobjc-runtime=macosx -Wno-unguarded-availability-new -ObjC -framework Foundation -framework AppKit -framework QuartzCore -framework CoreData -framework Quartz -framework CoreFoundation -framework CoreServices -framework Security -framework Carbon -weak_framework CloudKit -u _xamarin_timezone_get_data -u _xamarin_get_block_descriptor /work/maccore/master/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/libxammac.a -o /work/maccore/master/xamarin-macios/tests/mmptest/bin/Debug/tmp-test-dir/Xamarin.MMP.Tests.MMPTests.RunMMPTest/bin/Debug/UnifiedExample.app/Contents/MacOS/UnifiedExample -D_THREAD_SAFE -I/work/maccore/master/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/pkgconfig/../../include/mono-2.0 /work/maccore/master/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/pkgconfig/../../lib/libmonosgen-2.0.a -liconv -x objective-c++ -I/work/maccore/master/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/include /work/maccore/master/xamarin-macios/tests/mmptest/bin/Debug/tmp-test-dir/Xamarin.MMP.Tests.MMPTests.RunMMPTest/obj/Debug/mmp-cache/registrar.m -fno-caret-diagnostics -fno-diagnostics-fixit-info -isysroot /Applications/Xcode92.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk /work/maccore/master/xamarin-macios/tests/mmptest/bin/Debug/tmp-test-dir/Xamarin.MMP.Tests.MMPTests.RunMMPTest/obj/Debug/mmp-cache/main.m
Expected: less than 10
But was: 10
This regressed in 4da8016db4, where new API is
partially unremovable by the linker, and as such causes XM to link with more
frameworks at build time.
This is expected, so change the test to accept more frameworks (11).
Fixes https://github.com/xamarin/maccore/issues/615.
Fixes this test failure on High Sierra:
Xamarin.Mac.Tests.EveryFrameworkSmokeTests.ExpectedLibrariesAreLoaded: CoreSpotlightLibrary (/System/Library/Frameworks/CoreSpotlight.framework/CoreSpotlight) failed to load but this was not expected
Make sure to package the linker tests when packaging XM tests (this broke
recently because the dontlink tests were moved).
Fixes this problem when running the packaged tests:
make[2]: linker-mac/dont link/bin/x86/Debug/dont link.app/Contents/MacOS/dont link: No such file or directory
make[2]: *** [exec-mac-classic-dont link] Error 1
make[2]: linker-mac/dont link/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link: No such file or directory
make[2]: *** [exec-mac-unified-dont link] Error 1
make[2]: linker-mac/dont link/bin/x86/Debug-unifiedXM45/dont link.app/Contents/MacOS/dont link: No such file or directory
make[2]: *** [exec-mac-unifiedXM45-dont link] Error 1
make[2]: linker-mac/dont link/bin/x86/Debug-unified-32/dont link.app/Contents/MacOS/dont link: No such file or directory
make[2]: *** [exec-mac-unified32-dont link] Error 1
make[2]: linker-mac/dont link/bin/x86/Debug-unifiedXM45-32/dont link.app/Contents/MacOS/dont link: No such file or directory
make[2]: *** [exec-mac-unifiedXM4532-dont link] Error 1
exec-mac-classic-dont\ link failed
exec-mac-unified-dont\ link failed
exec-mac-unifiedXM45-dont\ link failed
exec-mac-unified32-dont\ link failed
exec-mac-unifiedXM4532-dont\ link failed
make[1]: *** [exec-mac-dontlink] Error 1
* [mtouch/mmp] Give users more control over optimizations, and share more code between mtouch and mmp.
1. Add an --optimize flag to mtouch/mmp that allows users to select which
optimizations to apply (or not). This makes it easier to add future
optimizations, and allow users to disable any optimization that causes
problems without having to disable many other features.
2. Share as much optimization code as possible between mtouch and mmp. This
immediately gives a benefit to mmp, which has three new optimizations only
mtouch had: NSObject.IsDirectBinding inlining, IntPtr.Size inlining and
dead code elimination.
This results in ~6kb of disk space saved for a linked Xamarin.Mac app:
* link sdk: [Debug][1], [Release][2]
* link all: [Debug][3], [Release][4]
Testing also verifies that monotouchtest ([Debug][5], [Release][6]) has not
changed size at all, which means that no default optimizations have changed
inadvertedly.
[1]: https://gist.github.com/rolfbjarne/6b731e3b5ca6170355662e6505c3d492#link-sdk-mac--debug
[2]: https://gist.github.com/rolfbjarne/6b731e3b5ca6170355662e6505c3d492#link-sdk-mac--release
[3]: https://gist.github.com/rolfbjarne/6b731e3b5ca6170355662e6505c3d492#link-all-mac--debug
[4]: https://gist.github.com/rolfbjarne/6b731e3b5ca6170355662e6505c3d492#link-all-mac--release
[5]: https://gist.github.com/rolfbjarne/6b731e3b5ca6170355662e6505c3d492#monotouchtest-iphonedebug64
[6]: https://gist.github.com/rolfbjarne/6b731e3b5ca6170355662e6505c3d492#monotouchtest-iphonerelease64
* [tools] Don't enable the IsDirectBinding optimization by default for Xamarin.Mac apps, it's not safe.
* Fix whitespace issues.
* [doc] Document optimizations.
* Officially support optimizations by adding them to the Versions.plist.
* [linker] Improve IntPtr.Size inliner + dead code eliminatior and add tests.
* Properly handle operands for the ldc_i4_s instruction (they're sbyte).
* Fix less-than condition to actually do a less-than comparison.
* Make sure to look up the bitness in the Target, not the Application, since
the Application's value will be incorrect when building fat apps (both
Is32Build and Is64Build will be true).
* Remove unnecessary checks for the IntPtr.Size inliner: this optimization
does not depend on other instructions than the IntPtr.get_Size call, so
remove the checks that verify surrounding instructions. This makes the
IntPtr.Size inliner kick in in more scenarios (such as the new tests).
* Add tests.
* [tests] Add mmp tests for optimizations.
* [tests] Fix XM optimization tests.
* [tests] Fix test build error.
* [mtouch] Make sure the xamarin_localized_string_format* functions are available in simlauncher. Fixes#3265.
Fixes https://github.com/xamarin/xamarin-macios/issues/3265.
* [mtouch] Add test for simlauncher symbols, add add more missing symbols.
Fixes this rather puzzling build problem when building monotouch-test using xharness:
obj/iPhoneSimulator/Debug-unified/Xamarin.iOS,Version=v1.0.AssemblyAttribute.cs(2,12): error CS0579: Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute
It happens only on Wrench (where it consistently fails), but it didn't happen
in the PR when this broke, nor could I reproduce it locally at first.
Initial investigation proved frustrating (searching for the file name
`Xamarin.iOS,Version=v1.0.AssemblyAttribute.cs` in the build log confirmed
that it was included multiple times on Wrench, but not locally), but after a
while I realized that there were multiple files with the same file name in the
build log:
/Users/builder/data/lanes/1381/daf07005/source/xamarin-macios/tests/monotouch-test/obj/iPhone/Release64-unified/Xamarin.iOS,Version=v1.0.AssemblyAttribute.cs
obj/iPhoneSimulator/Debug-unified/Xamarin.iOS,Version=v1.0.AssemblyAttribute.cs
One full path, and one relative, and one is obviously wrong.
Even more so once I realized that the full path's Platform/Configuration
(`iPhone/Release64-unified`) doesn't match the relative path's
Platform/Configuration (`iPhoneSimulator/Debug-unified`).
It's not even a test configuration we execute on Wrench, so how come the file
got there in the first place?
But it made it possible to reproduce locally: I just had to build monotouch-
test for device first, using tests.sln. Then I could reproduce the build error
when executing monotouch-test from xharness, since now I had the extraneous
file on my file system.
xharness will clone project files (to avoid parallel issues when building
multiple projects in parallel, all projects are built in their own
directories), and it turns out we didn't properly fixup all paths.
In particular the following:
<Compile Include="**\*.cs" Exclude="obj\**">
<Link>%(RecursiveDir)%(Filename).cs</Link>
</Compile>
would be transformed into:
<Compile Include="\Users\builder\data\lanes\1381\daf07005\source\xamarin-macios\tests\monotouch-test\**\*.cs" Exclude="obj\**">
<Link>%(RecursiveDir)%(Filename).cs</Link>
</Compile>
which meant that we'd include all files recursively in the monotouch-test
directory, excluding files from the project file's obj sub directory. And
since the project file was cloned, it would be in a different directory, and
thus not able to exclude files from the original monotouch-test/obj directory.
And with this knowledge the simple oneliner to fix it was trivial.
One mystery remained though: how was the extraneous
`Xamarin.iOS,Version=v1.0.AssemblyAttribute.cs` file generated when we don't
execute device tests on Wrench? After a while I remembered that the MTouch
tests build monotouch-test for device, even though they're not executed.
And this explains why the problem happens on wrench only: Jenkins didn't
execute the MTouch tests.
The original, now obsoleted, `LocalizedString` API returned a .net
`string` which does not work in most cases.
Different versions of iOS seems to return different (public or internal)
subclasses of `NSString` that are understood by other API (like NSString
`localizedStringWithFormat:`) for further customization.
Our logic to convert NSString to string is correct but it cannot
recreate the custom, required subclass to continue the localization.
So the new API return an `NSString` publicly (which is actually a
subclass) that can do the required job.
Adding a test in monotouch-test is presently blocked by #3265 [2]
[1] https://bugzilla.xamarin.com/show_bug.cgi?id=41292
[2] https://github.com/xamarin/xamarin-macios/issues/3265
* Add tests for new (and old) NSBundle API and adjust old ones since adding a Base.lproj directories changes things
* Add localization to xammac_tests since it shares the same, updated tests
When determining the color for a collection of tests, first check if the
execution result is identical for all tests in the collection, in which case
just use the corresponding color for a single test.
- Fixes bug #59272: [xtro] Report !missing-protocol-conformance! when protocols are defined in categories
(https://bugzilla.xamarin.com/show_bug.cgi?id=59272)
- Implemented missing protocol conformances based on tool's new data.
- Remove Internal check from VisitObjCCategoryDecl and VisitObjCInterfaceDecl
- Ignore previewItemTitle failure (normal since it's optional)
- Only skip UIStateRestoring for subclasses of UIViewController
- Ignore UIStateRestoring test on watchOS (UIViewController not available)
- Remove protocol conformances that generated wrong availability attributes (https://github.com/xamarin/xamarin-macios/issues/3213)
- Avoid new virtual or virtual when adding protocol conformance (https://github.com/xamarin/xamarin-macios/issues/3217)
xharness needs a solution in order to ask for a nuget restore, so make sure to
provide the path to the solution.
This fixes a build issue where the install source tests would fail to build
due to picking up the system's nunit.framework.dll because the nuget one
wasn't found/restored:
MonoPathManglerTest.cs(8,3): error CS0619: 'TestFixtureAttribute' is obsolete: 'The NUnit framework shipped with Mono is deprecated and will be removed in a future release. It was based on NUnit 2.4 which is long outdated. Please move to the NUnit NuGet package or some other form of acquiring NUnit.'
XamarinSourcesPathManglerTest.cs(8,3): error CS0619: 'TestFixtureAttribute' is obsolete: 'The NUnit framework shipped with Mono is deprecated and will be removed in a future release. It was based on NUnit 2.4 which is long outdated. Please move to the NUnit NuGet package or some other form of acquiring NUnit.'
OpenTKManglerTest.cs(8,3): error CS0619: 'TestFixtureAttribute' is obsolete: 'The NUnit framework shipped with Mono is deprecated and will be removed in a future release. It was based on NUnit 2.4 which is long outdated. Please move to the NUnit NuGet package or some other form of acquiring NUnit.'
PathManclerFactoryTests.cs(8,3): error CS0619: 'TestFixtureAttribute' is obsolete: 'The NUnit framework shipped with Mono is deprecated and will be removed in a future release. It was based on NUnit 2.4 which is long outdated. Please move to the NUnit NuGet package or some other form of acquiring NUnit.'
OpenTKManglerTest.cs(29,4): error CS0616: 'TestCase' is not an attribute class
OpenTKManglerTest.cs(30,4): error CS0616: 'TestCase' is not an attribute class
MonoPathManglerTest.cs(29,4): error CS0616: 'TestCase' is not an attribute class
MonoPathManglerTest.cs(30,4): error CS0616: 'TestCase' is not an attribute class
MonoPathManglerTest.cs(31,4): error CS0616: 'TestCase' is not an attribute class
XamarinSourcesPathManglerTest.cs(33,4): error CS0616: 'TestCase' is not an attribute class
XamarinSourcesPathManglerTest.cs(35,4): error CS0616: 'TestCase' is not an attribute class
XamarinSourcesPathManglerTest.cs(37,4): error CS0616: 'TestCase' is not an attribute class
OpenTKManglerTest.cs(36,4): error CS0616: 'TestCase' is not an attribute class
OpenTKManglerTest.cs(37,4): error CS0616: 'TestCase' is not an attribute class
MonoPathManglerTest.cs(37,4): error CS0616: 'TestCase' is not an attribute class
MonoPathManglerTest.cs(38,4): error CS0616: 'TestCase' is not an attribute class
MonoPathManglerTest.cs(39,4): error CS0616: 'TestCase' is not an attribute class
XamarinSourcesPathManglerTest.cs(47,4): error CS0616: 'TestCase' is not an attribute class
These targets will already be properly escaped (using backslash), so adding
quotes will cause make to treat the backslashes literally (and break).
Fixes an issue with package-tests:
$ make package-tests
[...]
build-mac-classic-dont\ link failed
build-mac-unified-dont\ link failed
build-mac-unifiedXM45-dont\ link failed
build-mac-unified32-dont\ link failed
build-mac-unifiedXM4532-dont\ link failed
build-mac-unified-link\ all failed
build-mac-unified-link\ sdk failed
make[4]: *** [build-mac] Error 1
make[3]: *** [mac-test-package.zip] Error 2
make[2]: *** [package-tests] Error 2
* [xharness] Run monotouch-test both with and without the static registrar in the simulator.
This way we catch (some) problems with the static registrar without having to run on device.
* [xharness] Add comments to explain extra test configurations.
* [xharness] Fix how projects are cloned.
Fix how projects are cloned so that xharness doesn't end up confused when
multiple test tasks share the same build task.
Previously xharness would iterate over all test tasks and modifying their
build tasks, now it will create the build tasks correctly in the first place.
* [tests] Add 'link all' test for XM.
* [tests] Add 'link sdk' test for XM.
* [tests] Move dontlink-mac tests to linker-mac directory to have the same directory layout as linker-ios.
These were accidentally not disabled when we started running tests on Wrench
like we do on Jenkins.
So disable them, to avoid duplicate work on Wrench.
and ensure the temporary `NSString` instance is disposed asap.
Found will debugging something else. Unit tests added to confirm there
is no behavior change when the API are used.
* [mtouch][mmp] Report invalid debug symbols files. Fixes#3200
Try to read the assembly with symbols and, if that fails, warn and
fallback to loading them without symbols.
This fixes cases were it's not easy to update or delete (e.g. nuget)
bad symbols files - so this cannot be an error without causing a lot
of pain.
However it needs to be reported, otherwise it wont be fixed (by the
publisher) and it can limit the debugability of the application and
the usefulness of the stacktraces.
Finally merge most of the resolver's code between mtouch and mmp so
we don't have to fix such issue twice anymore.
note: this needs to be slightly updated once we get a version of cecil
that can give us a more precise error message.
Also bring Rolf's tests from
https://github.com/xamarin/xamarin-macios/pull/3079
reference:
https://github.com/xamarin/xamarin-macios/issues/3200
This now formal `CAAnimationDelegate` protocol had to be reverted [1]
because we did not support `FormalSince` at the time - and this broke the
static registrar when used with older SDK. Support was added in [2] but
did not include `CAAnimationDelegate` (but `CALayerDelegate` was fixed).
Because this was not a protocol the `Delegate` property expose it as a
`CAAnimationDelegate`, the concrete/model type, and not an interface.
The workaround so `ICAAnimationDelegate` can be used, thru the
`WeakDelegate`, requires to manually re-bind some API because the
generator won't allow this anymore (it's bad to expose a [Model]
when a [Protocol] exists).
xtro data updated
[1] https://github.com/xamarin/xamarin-macios/pull/698
[2] https://github.com/xamarin/xamarin-macios/pull/2130
In particular the mmp tests build a lot of project files, which means they can
find issues whenever something in the MSBuild logic changes, so run them.
They would have caught https://github.com/xamarin/maccore/issues/612 for instance.
Fixesxamarin/xamarin-macios#3166
Apple broke `addAnimation:forKey:` API by changing `CAAnimation` parameter into a
`ISCNAnimationProtocol` that was introduced in Xcode 9 (iOS 11 and company).
We can't break the existing API but we can add an extension method that
reuses the `CAAnimation` overload but takes a `SCNAnimation` and we
turn the `SCNAnimation` into a `CAAnimation` behind the scenes.
For XAMCORE_4_0 we corrected the protocol signature to take `ISCNAnimationProtocol` so there won't be a need for the extension method anymore.
Largely related to somewhat recent frameworks/API additions to XM
ExternalAccessory was added to macOS 10.13 (Xcode9) and can't be run before that (including on the jenkins sierra bots). Also enable that test on tvOS (which added support in Xcode8)
Sadly this creates a breaking change since the `ScaleTransform`
property was re-introduced with an incorrect signature in the new
base class `MPSImageScale`
Unless someone has an idea how to avoid it (I don't see an option)
then we'll have to document it in the 15.7 release notes.
Also add missing _SetScaleTransform call and related unit tests
Don't *always* codesign, especially for Xcode 8 which seems to break.
iOS Simulator builds should only be codesigned if they require
Entitlements (signified by RequireProvisionProfile).
Don't *always* codesign, especially for iOS8 which seems to break.
iOS Simulator builds should only be codesigned if they require
Entitlements (signified by RequireProvisionProfile).
Previous PMCS removal changes froze XamMac.BindingAttributes.dll but not bgen.exe which causes interesting issues when we make changes there and run classic XM tests.
This can be seen here: #3147
This PR freezes bgen-classic in macios-binaries (which will need to be added to master and bumped before this goes in) and update various scripts/tests.
Before XAMCORE_4_0 the setter will throw an `NotImplementedException`
which is better, and more accurate, than a native exception.
Found by xtro. Data file updated.
We normally frown on large scale _cosmetic_ changes, mostly because it breaks git's history (very useful) and makes merging branches harder and more error prone (very annoying).
However we require, right now, such changes to remove our old, mcs-based, pre-processor (pmcs) so it's a _good_ time to address the old, unneeded availability attributes - since most of them are re-written for our next milestone.
This won't change the final application size in most cases, as the linker removes them, but it will make the (unlinked) platform assemblies smaller. This means they will load faster (e.g. by mtouch, mmp, IDE, workbooks...) and will reduce the time/memory needed to reflect them.
* SLComposeServiceViewController has [Mac] specific stuff but was
excluded under a (too large) `#if !MONOMAC`
* SLComposeSheetConfigurationItem::init is a designated initializer
* SLRequest::addMultipartData:withName:type: is macOS-only and missing
xtro results:
!missing-designated-initializer! SLComposeSheetConfigurationItem::init is missing an [DesignatedInitializer] attribute
!missing-selector! SLComposeServiceViewController::charactersRemaining not bound
!missing-selector! SLComposeServiceViewController::contentText not bound
!missing-selector! SLComposeServiceViewController::placeholder not bound
!missing-selector! SLComposeServiceViewController::setCharactersRemaining: not bound
!missing-selector! SLComposeServiceViewController::setPlaceholder: not bound
!missing-selector! SLComposeServiceViewController::textView not bound
!missing-selector! SLRequest::addMultipartData:withName:type: not bound
!missing-type! SLComposeServiceViewController not bound
* PHLivePhotoView only available on 64 bits
xtro results:
!missing-enum! PHLivePhotoViewContentMode not bound
!missing-enum! PHLivePhotoViewPlaybackStyle not bound
!missing-protocol! PHLivePhotoViewDelegate not bound
!missing-selector! PHLivePhotoView::audioVolume not bound
!missing-selector! PHLivePhotoView::contentMode not bound
!missing-selector! PHLivePhotoView::delegate not bound
!missing-selector! PHLivePhotoView::isMuted not bound
!missing-selector! PHLivePhotoView::livePhoto not bound
!missing-selector! PHLivePhotoView::livePhotoBadgeView not bound
!missing-selector! PHLivePhotoView::setAudioVolume: not bound
!missing-selector! PHLivePhotoView::setContentMode: not bound
!missing-selector! PHLivePhotoView::setDelegate: not bound
!missing-selector! PHLivePhotoView::setLivePhoto: not bound
!missing-selector! PHLivePhotoView::setMuted: not bound
!missing-selector! PHLivePhotoView::startPlaybackWithStyle: not bound
!missing-selector! PHLivePhotoView::stopPlaybackAnimated: not bound
!missing-type! PHLivePhotoView not bound
* [xtro] Sort earlier in EnumCheck so we don't have to duplicate checks (or get random failures)
That fix a NRE while running xtro
12:55:31.4682580 System.NullReferenceException: Object reference not set to an instance of an object
12:55:31.4682960 at Extrospection.Helpers.GetFramework (Mono.Cecil.TypeReference type) [0x00012] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xtro-sharpie/Helpers.cs:284
12:55:31.4683110 at Extrospection.EnumCheck.VisitManagedType (Mono.Cecil.TypeDefinition type) [0x0006c] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xtro-sharpie/EnumCheck.cs:28
12:55:31.4683210 at Extrospection.AssemblyReader.ProcessType (Extrospection.BaseVisitor v, Mono.Cecil.TypeDefinition type) [0x00001] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xtro-sharpie/Runner.cs:78
12:55:31.4683320 at Extrospection.AssemblyReader.Load (System.String filename) [0x00079] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xtro-sharpie/Runner.cs:71
12:55:31.4684210 at Extrospection.Runner.Execute (System.String pchFile, System.Collections.Generic.IEnumerable`1[T] assemblyNames) [0x000f2] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xtro-sharpie/Runner.cs:41
12:55:31.4684400 at Extrospection.MainClass.Main (System.String[] args) [0x00046] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xtro-sharpie/Program.cs:20
https://jenkins.mono-project.com/job/xamarin-macios-pr-builder/5845/Test_Report/
Short story: PR #3096 adds **non public** attributes without a namespace
so they take precedence over existing ones.
xtro enum check also needed to discard them.
- XamarinPreprocessorVisitor handled processing/generating availability
attributes but needs to be removed as it depends on PMCS
- Because processing was handled at a preprocessor/token level before and
now inside generator.cs a number of changes were needed avoid checking
in a million line diff (literally)
- This commit creates a "shadow" set of availability attributes, with
the desired names [Mac] [Watch] [NoTV], etc when not in existence before
- Instead of adding hundreds of using statements to force resolution of these
shadow types, I abuse C# type resolution by storing them in the root
(not namespaced) so they are resolved first.
- generator-attributes-manager was taught how to process the multitude of
old-style attributes and how to generate the new-style attributes
- Generator's bug57070 is no longer valid, since we _can_ and do convert [iOS]
We can't trust Apple's native linker to pick the right (non private)
framework when an older TargetVersion is used. It just prefer what's
available - even if specified with a WeakFramework :(
That was already dealt with for applications. However the native linking
of the Xamarin.Sdk.framework (code sharing with extensions) is done with
the `LinkTask` instead of the `NativeLinkTask` so it did not have the
"auto correct" code.
Unit test added.
reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=61039
We can't trust Apple's native linker to pick the right (non private)
framework when an older TargetVersion is used. It just prefer what's
available - even if specified with a WeakFramework :(
That was already dealt with for applications. However the native linking
of the Xamarin.Sdk.framework (code sharing with extensions) is done with
the `LinkTask` instead of the `NativeLinkTask` so it did not have the
"auto correct" code.
Unit test added.
reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=61039
According to documentation this was added in watchOS 4.0
xtro reported:
!missing-pinvoke! vImageBoxConvolve_ARGB8888 is not bound
!missing-pinvoke! vImageBoxConvolve_Planar8 is not bound
!missing-pinvoke! vImageConvolve_ARGB8888 is not bound
!missing-pinvoke! vImageConvolve_ARGBFFFF is not bound
!missing-pinvoke! vImageConvolve_Planar8 is not bound
!missing-pinvoke! vImageConvolve_PlanarF is not bound
!missing-pinvoke! vImageConvolveMultiKernel_ARGB8888 is not bound
!missing-pinvoke! vImageConvolveMultiKernel_ARGBFFFF is not bound
!missing-pinvoke! vImageConvolveWithBias_ARGB8888 is not bound
!missing-pinvoke! vImageConvolveWithBias_ARGBFFFF is not bound
!missing-pinvoke! vImageConvolveWithBias_Planar8 is not bound
!missing-pinvoke! vImageConvolveWithBias_PlanarF is not bound
!missing-pinvoke! vImageMatrixMultiply_ARGB8888 is not bound
!missing-pinvoke! vImageRichardsonLucyDeConvolve_ARGB8888 is not bound
!missing-pinvoke! vImageRichardsonLucyDeConvolve_ARGBFFFF is not bound
!missing-pinvoke! vImageRichardsonLucyDeConvolve_Planar8 is not bound
!missing-pinvoke! vImageRichardsonLucyDeConvolve_PlanarF is not bound
!missing-pinvoke! vImageTentConvolve_ARGB8888 is not bound
!missing-pinvoke! vImageTentConvolve_Planar8 is not bound
Beside eliminating a bit of code duplication this solve the random
(metadata order) xtro report
> ?unknown-entry? !unknown-pinvoke! close bound in 'macOS-ObjCRuntime.ignore'
because it was reported against two namespaces and we don't check
for duplicate p/invokes (largely because there's tons of them in
OpenTK)
Fixes https://github.com/xamarin/maccore/issues/602
The original test was to cover both X509Certificate and X509Certiicate2
when using with SecTrust. However the code diverged over time. That and
the different certificates used caused the `*2` tests to hit a time
loop (designed to reduce incorrect errors randomly reported).
We want to keep the "delay" logic for it's intended purpose - but it
should not be needed normally.
The tests have been refactored to reuse the same logic (between both
types of certificates) which solve this (when used with the same
certificates)
Replace https://github.com/xamarin/xamarin-macios/pull/3068
When a method signature contains any ref/out parameters
it is a hint that this method is not a candidate to be
used with [Async] we now error BI1062 in the generator.
The reason of an error instead of a warning is that we
currently generate not compilable code when ref/out is
used on the method signature or in the signature of the
delegate (completion handler), it is very unlikely we are
breaking someone now that we emit an error instead of broken
code.
* Fix Anchor and Clarify the addition of BI1117 Warning into docs/website/generator-errors.md
BI1117 Warning documentation was missing from docs/website/generator-errors.md
so I added it.
* Not every old annotations have been migrated (work in progress, to be completed in another PR);
* Sanitation of the data files (e.g. removal of dupes and fixed, by Apple, entries) is done, but not automated (also a work in progress)
Even then this is immediately useful, i.e. better merged before 15.6 gets branched.
* [Debugger] Allow to step into Xamarin code.
The tool now detects the different sources and mangles the path to
ensure that the correct paths are installed in the following location:
/Library/Frameworks/Xamarin.iOS/Versions/Current/src
/Library/Frameworks/Xamarin.Mac/Versions/Current/src
The tool will detect if the path map command was used in the mdb and pub files, will point to the correct source code and will copy it to the installation dir.
Tests have been added that will be ran both by wrench and jenkins ensuring that changes in the manglers do not change it behaviour.
Facts:
* xtro-sharpie references Mono.Cecil 0.9.6 from a nuget.
* If a local Mono.Cecil.dll can't be found (according to the HintPath in the
csproj, which points to the nuget), then msbuild will look in the system
Mono.
* Mono 5.8 ships Mono.Cecil 0.10.
* Mono.Cecil 0.10 is not source compatible with 0.9.6 (there's a small issue
with interfaces).
* xtro-sharpie's source code works with v0.10.
This all means that xtro-sharpie will build fine as long as the 0.9.6 nuget
has *not* been restored. This can manifest itself confusingly ("msbuild xtro-
sharpie.sln" works fine from the command line, open the solution in VSfM and
it doesn't build anymore, not even from the command line, because VSfM
automatically restored nugets in the background).
Update the source code to work with Mono.Cecil 0.9.6 because there's no 0.10
nuget yet (yet keeping the code for v0.10 clearly marked as such for future
updates to v0.10).
Also bump from 0.9.6.1 to 0.9.6.4 since that's the latest available.
* [MSBuild] Do not set CFBundleDevelopmentRegion if not present.
This is a complicated fix. This is a regression introduced by Apple.
CFLocaleCopyCurrent(), used in the iOS code, will return the value of
the application's CFBundleDevelopmentRegion Info.plist key if all of the
following conditions are true:
* CFBundleDevelopmentRegion is present in the Info.plist
* The CFBundleDevelopmentRegion language is in the list of preferred
languages on the iOS device, but isn't the first one
* There are no localized resources (i.e. no .lproj directory) in the app
for the first preferred locale
This differs from iOS 10 where the presence of the
CFBundleDevelopmentRegion key had no effect.
Note that if the CFBundleDevelopmentRegion key is not present at all,
CFLocaleCopyCurrent() always returns the first preferred locale as it
did in iOS 10.
We are adding the key by default in the plist of the applications which confuses users since they do not see the key in the .plist added by the template. This commit removes it to be more explicit and help users understand the behaviour.
* [generator] Properly set the IsDirectBinding value.
Properly set the IsDirectBinding value to false for models and synthetic types.
This also means we can now stop excluding models when testing if the
IsDirectBinding value is correct.
Also set IsDirectBinding value to true for sealed wrapper types, since those
will always be direct bindings since they can't be subclassed.
https://gist.github.com/rolfbjarne/24028bf944db848fed4083c460d0ec71
* [tests] Add introspection exclusion for XM.
* [introspection] Add back exclusions for Classic, since we can't modify/fix Classic assemblies anymore.
* [generator] Print the correct protocol name with the protocol attribute.
Fixes this test failure:
[FAIL] Foundation.NSUrlDownloadDelegate : ConformsToProtocol(null) failed
because our binding code claimed that our `NSUrlDownloadDelegate` class
implemented the `NSUrlDownloadDelegate` protocol, but since the
`NSUrlDownloadDelegate` protocol doesn't exist (it's `NSURLDownloadDelegate` -
different case), we'd verify against a null protocol (and return true from
`ConformsToProtocol(null)`, which would fail the test).
* [xtro] Only treat interfaces as protocols.
Unfortunately we add [Protocol] to [Model]s as well as on interfaces, but we
must not process those in xtro, since they don't correspond with the actual protocol.
MetalPerformanceShadersLibrary is new in macOS 10.13 and only available
for 64bits.
from https://wrench.internalx.com/Wrench/WebServices/Download.aspx?workfile_id=19778531
Tests run: 248, Passed: 238, Errors: 0, Failures: 1, Inconclusive: 0
Not run: 9, Invalid: 0, Ignored: 9, Skipped: 0
Elapsed time: 00:00:11.3800000
Errors and Failures:
1) ExpectedLibrariesAreLoaded (Xamarin.Mac.Tests.EveryFrameworkSmokeTests.ExpectedLibrariesAreLoaded)
MetalPerformanceShadersLibrary (/System/Library/Frameworks/MetalPerformanceShaders.framework/MetalPerformanceShaders) failed to load but this was not expected
at Xamarin.Mac.Tests.EveryFrameworkSmokeTests.ExpectedLibrariesAreLoaded () [0x000c5] in /Users/builder/data/lanes/5665/74d2dcad/source/xamarin-macios/tests/apitest/src/EveryFrameworkSmokeTest.cs:99
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Library/Frameworks/Xamarin.Mac.framework/Versions/4.1.1.45/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
Since tvOS 11 there's not a single font, on that platform, that
has the ligatures that the test verified.
Test remains enabled for other platforms.
reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=58929
* [tests] Fix introspection tests for macOS
It seems that apple forgot to ship SSLSetALPNProtocols and SSLCopyALPNProtocols in macOS
there are already radars filled about this https://bugs.swift.org/browse/SR-6131
So this test will fail once Apple fixes this issue. when this happens we need to do two things, reenable
the API and reenable the [Get|Set]AlpnProtocols tests, the one insides 'StreamDefaults' for the mac.
* Implement feedback
Wrench runs `wrench-mac-xammac_tests`, but since there were no such target,
make would execute the `wrench-%` target, which is disabled when iOS is
disabled.
Thus this strange behavior would be seen on wrench for xammac tests when iOS
is disabled:
/Applications/Xcode92-beta2.app/Contents/Developer/usr/bin/make -C /Users/builder/data/lanes/5665/d2b1b757/source/xamarin-macios/tests wrench-mac-xammac_tests
git clean -xfdq
iOS tests have been disabled [wrench-mac-xammac_tests]
By creating the `wrench-mac-xammac_tests` target, we'll end up doing the right
thing instead.
* [MetalPerformanceShaders] Activate bindings for Xamarin.Mac and add n… (#2816)
* [MetalPerformaceShaders] Several MPSCnnKernel properties should be readonly (#2938)
The subclasses versions of the properties need Override, cannot be removed since it would break visibility for iOS 10
* Remove some [Model] attributes that sholdn't be needed
* Fix introspection test crashes
* More introspection fixes
* NN does not need to be PascalCased
Remove unneeded Models and BaseTypes
* PR Whitespace fixes and renamings
* Paste fail
* More fixes from PR comments
* [MPS] Adds new intro test, fixes ctors and xtro output
* Removes duplicated availability attributes.
* Removes obsoleted API from macOS since mps is new to it.
* Fixes xtro output.
* Adds missing API.
* Fixes parameterless ctors, some of them do not really work, found
by our new intro test and disabled the one that seem to not make
sense due to the presence of DesignatedInitializers.
* Fixes a selector typo.
* Adds new `ShouldNotExposeDefaultCtorTest` to intro.
ShouldNotExposeDefaultCtorTest
==============================
This test checks for types with a parameterless ctor that are subclasses
of `NSObject` and then cheks if the BaseType of said objects also expose
a parameterless ctor (all in .NET land), if this is not the case it reports
them and so they can manually audited. Also this test has the ability to
print alloc/init ObjC code by setting `genObjCTestCode` to `true` so you can
take this code into an Xcode project and easily tests the ctors.
It seems that xtro (sharpie) does not have a complete picture of when a ctor
must be exposed hence the hability to generate this code and manually test.
Right now this test is just enabled for MPS since it is the scope of this PR.
In the future it should be enabled for all other frameworks and the output be
manually audited.
* [MPS] Fixes premature collection possible in bindings (bug 59547) and implements feedback.
https://bugzilla.xamarin.com/show_bug.cgi?id=59547
* Fixes premature collection possible in bindings im MPSKernel.cs
* Fixes MPSImageHistogramTest from using deprecated API.
* Removes renamed selectors and typos from ApiSelectorTest and ApiTypoTest.
* [MPS] Reenable Copy API and DesignatedInitializer xtro feedback
* Implement more feedback
* More feedback
Make the collection of logs (the `Logs` class) more capable by making it
disposable (which will dispose all contained logs) and give it a Directory
property to state where the logs should be stored. This makes it possible to
simplify a few repeated path calculations. It also allows us to easily dispose
the entire collection of logs when done with a test, as opposed to dispoing
the logs one by one.
Make LogFile more capable:
* Add support for writing byte arrays.
* Add support for logging after disposal: this will still write to the file,
and not keep any files open after finished writing. This fixes a problem
where writing to a log after it was disposed would crash xharness (which is
not all that uncommon, given the async nature of how xharness runs tests).
This makes it possible to get rid of LogStream, and use LogFile instead.
* [msbuild] Pack all iOS MSBuild Task assemblies into a single assembly
* Fixed the build
* Renamed ProcessArgumentBuilder to CommandLineArgumentBuilder
This is needed to prevent symbol conflicts with Xamarin.MacDev's
ProcessArgumentBuilder (which is functionally different from
Xamarin.MacDev.Tasks.Core's class of the same name).
* Fixed ILRepack logic for filtering dll's to repack
* Fixed building of Xamarin.iOS.Tasks.Tests now that X.iOS.Tasks.dll contains all symbols
* Updated Makefile now that only 1 iOS Task assembly needs to be distributed
* ILRepack Xamarin.Mac.Tasks as well
* Fixed up *.targets to specify The One Assembly To Rule Them All
* [xharness] Build MSBuild tests with MSBuild.
* Touch the ilrepack stamp file *after* invoking ILRepack, not before.
* Same for Xamarin.Mac.Tasks
The mmp regression tests are already executed in parallel (using `make -j8` in
the Makefile), and they're quite CPU intensitive, which means that if xharness
runs other tests in addition to the these tests, then those other tests may
fail randomly.
However there's a small window between the time we get a pointer
and the call to the native selector where the memory is not fixed.
During this time the GC can move the memory resulting in hard to
diagnose crashes.
Note: `initWithValues:count:` copies the provided memory so what
happens afterward is not an issue.
Dispose logs (so that the corresponding files are closed) when we're done with
them, and also don't open a file log by default (usually we just want a
filename to pass to somebody else), but instead open the file if needed.
This should decrease the number of open file descriptors in xharness, which
sometimes become a problem when running many tests.
* [tests] Add support for passing arguments to XM unit tests from the command line.
* [xharness] Get xml results for mac unit tests and parse it to show failures inline in the html report.
The parsing done by `System.Version` does not accept a major-only string,
e.g. providing "11" would throw an exception.
Since people generally refer version as iOS 11 (and not iOS 11.0) this
is, at best, a nuisance. Xcode toolchain accept "11" as a valid string.
The first part of message was updated to show both the option name and
the (user provided) value.
The 2nd part remain the text of the .net exception message, i.e. what
`Version.Parse` tells you when it validates the string. Seeing the input
value should make it more obvious for other, incorrect version strings.
reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=60280
Usually an exit code of neither 0 nor 1 means a test run crashed (in
particular if the exit code is 130+), but this may not always be true, so
report the exit code as well so that a human can evaluate properly.
Also disables typo check for XM classic because:
`We have 823 typos!`
I'm not sure why but switching to the new API, which specify `en_US`,
seems to report more errors.
Unified API are already fixed and I don't see value in adding _ignore_
entries for classic (we don't add classic-only API anyway) so this
just makes then test built/executed for XAMCORE_2_0
Change [Intermediate]OutputPath of Xamarin.Mac test projects to include the
project flavor, so that they don't build into (and run from) the same location
(which leads to random and incorrect behavior for at least one of the
flavors).
Fixes https://github.com/xamarin/maccore/issues/584
* [xharness] Add support for executing a command periodically.
This will be used to run 'rsync' on bots to upload the html report somewhere
while the tests are running.
* [tests] Disable all the wrench test targets, and instead run the jenkins target (only) on wrench.
* [xharness] Write xharness log to stdout as well on wrench.
Wrench has a 30-min stdout timeout: if nothing is printed in 30 minutes, then
the step fails. Printing the harness log to stdout makes us not hit this
timeout.
* [xharness] Timestamp a few more logs.
* [xharness] Disable the @MonkeyWrench calls, since we're not uploading directly to wrench anymore.
This is a case of NSString enum extensibility - even if this framework does not use the usual `NS_EXTENSIBLE_STRING_ENUM` macro (which is recent and have not been applied for all framework / headers).
Minimally we need to provide alternative, weakly typed, `NSString`-based API wherever the (extensible) enums types are used. Not the best API (even if we can minimize it's use with `[EditorBrowsable (EditorBrowsableState.Advanced)]`) but C# enums can't be extended this way.
Also, even if less urgent, we need to make the enum-generated helper aware of the extensibility so they do not throw, making it easier to mix strongly and weakly typed code (instead of choosing one over the other).
Taking the first step for `xcode92` with the enum-backed constants in HomeKit, i.e.
* HMAccessoryCategoryType
* HMCharacteristicType
* HMServiceType
* HMSignificantEvent
Reference
https://bugzilla.xamarin.com/show_bug.cgi?id=60303
* [tests] WeakSignificantEvent is a weakly typed alternative (not a weak argument semantic)
* [tests][generator] Port bindas1048error to NUnit.
* [tests][generator] Port bindas1049error to NUnit.
* [tests][generator] Port bindas1050modelerror to NUnit.
* [tests][generator] Port bindas1050protocolerror to NUnit.
* [tests][generator] Port bug42855 to NUnit.
* [tests][generator] Port bug57070 to NUnit.
* [tests][generator] Port bug52570classinternal to NUnit.
* [tests][generator] Port bug52570methodinternal to NUnit.
* [tests][generator] Port bug52570allowstaticmembers to NUnit.
* [tests][generator] Port protocol-duplicate-abstract-error to NUnit.
* [tests][generator] Port protocol-duplicate-method-diff-length to NUnit.
* [tests][generator] Port protocol-duplicate-method-diff-out to NUnit.
* [tests][generator] Port protocol-duplicate-method-diff-type to NUnit.
* [tests][generator] Port protocol-duplicate-method-diff-return to NUnit.
* [tests][generator] Port warnaserror to NUnit.
* [tests][generator] Port nowarn to NUnit.
* [tests][generator] Add support for inspecting/asserting the generated content.
* [tests][generator] Port some Xamarin.Mac tests to NUnit.
Ported:
* bmac_smoke
* bmac-with-hyphen-in-name
* property-redefination-mac
* NSApplicationPublicEnsureMethods
* protocol-duplicate-abstract
* [tests][generator] Point bgen to our local installation.
* [tests][generator] Port the bug31788 test to a unit test.
* [generator] Make the 'bgen' helper target more complete.
* [tests][generator] Port non-custom iOS tests to unit tests.
* [tests][generator] Add new test.
* [tests][generator] Port the forum54078 test to a unit test.
* [tests][generator] Port the desk63279 test to a unit test.
* [tests][generator] Port the desk79124 test to a unit test.
* [tests][generator] Port the multiple-api-definitions tests to unit tests.
* [generator] Use mono code style.
* [tests][generator] Port the bug29493 test to a unit test.
* [tests][generator] Port the classNameCollision test to a unit test.
* [tests][generator] Port the bi1036 test to a unit test.
* [tests][generator] Port the bug37527 test to a unit test.
Also fix BI1112 and BI1113 to show up as errors in the console output (since
they're exceptions they're already treated as errors and would cause bgen to
fail).
* [tests][generator] Port the bug27986 test to a unit test.
* [tests][generator] Port the bug35176 test to a unit test.
* [tests][generator] Port the bi1046 test to a unit test.
* [tests][generator] Port the virtualwrap test to a unit test.
* [tests][generator] Port the bug42742 test to a unit test.
* [tests][generator] Port the noasyncinternalwrapper test to a unit test.
* [tests][generator] Port the noasyncwarningcs0219 test to a unit test.
* [tests][generator] Port the bug53076 test to a unit test.
* [tests][generator] Port the bug53076withmodel test to a unit test.
* [tests][generator] Port the fieldenumtests test to a unit test.
* [tests][generator] Port the smartenumwithframework test to a unit test.
* [tests][generator] Port the forcedtype test to a unit test.
* [tests][generator] Port the bug46292 test to a unit test.
* [tests][generator] Build tests with MSBuild.
There's no need to use xbuild for these tests.
* [tests][generator] Remove dead code.
* [xharness] Don't run the makefile-based generator tests anymore.
Since there aren't any makefile-based generator tests anymore, they've all
been ported to NUnit tests.
* [tests][generator] Make the bug39614 test do what it was supposed to do: make sure a namespace isn't required (but recommended).
- Fixes bug #59296: [coreimage] Some `kCI*`keys are not bound
(https://bugzilla.xamarin.com/show_bug.cgi?id=59296)
- Generate a StrongDictionary for `CIImageInitializationOptions` to avoid manual code.
- Move `CGImageProperties Properties { get; set; }` to parent type `CIImageInitializationOptions` (avoid 2 strong dictionaries).
Reason:
Even though the headers give us an indication of which constructors should use some CIImage keys it's hard to apply that
to all constructors consistently.
We could have 1 strong dictionary per constructor (duplicate members) with just the exact members we know it supports (based on headers) however
it's better to have a single strong dictionary and document the options because A might be available only in X today and Y next too next year.
- Fix `DictionaryContainer`'s `GetStrongDictionary` to return null
and not throw if target StrongDictionary is not yet set.
Basically:
```
var options = new CIImageInitializationOptionsWithMetadata ();
Assert.That (options.Dictionary.Count, Is.EqualTo (0), "Count");
```
Would throw:
```
System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
----> System.ArgumentNullException : Value cannot be null.
```
- Fixes bug #57350: Review new CoreImage filters added in Xcode 9
(https://bugzilla.xamarin.com/show_bug.cgi?id=57350).
- Adds `AVCameraCalibrationData` and `CIBarcodeDescriptor` to `generator-filters`.
- Fixes `ApiCoreImageFiltersTest`'s `GenerateBinding` to use valid `[CoreImageFilterProperty]`.
- In `CheckManagedFilters` generate code of SuperClass when detected so it's easier to bind.
Hopefully third time's the charm...
Don't do date math (adding hours) to a local datetime, since DST *will* muddy
the waters and prove that 1=2.
Instead convert the date we want to calculate on to UTC, which should be DST-agnostic.
I've tested this by running the test for every hour during the next 10 years,
so that should cover mostly everything (although I'm still waiting for the
Delorean I ordered to be able to test both in the future and the past).
Previous attempts:
0442cdf9c05caddb3571
Should fix https://github.com/xamarin/maccore/issues/573.
* [mtouch/mmp/bgen] Add support for response files.
This is the first part of the fix for #56501.
https://bugzilla.xamarin.com/show_bug.cgi?id=56501
* [tests] Make sure no single argument starting with a '@' is passed to mtouch unless it's a response file.
--assembly-build-target takes arguments starting with '@', for instance:
--assembly-build-target @all=framework
which does not work anymore, because that's interpreted as a response file
(mtouch tries to read the file '@all=framework', which obviously doesn't
exist).
The fix is simple, don't put a space between the two arguments:
--assembly-build-target=@all=framework
* Add --root-assembly to mtouch/mmp and make the MSBuild tasks use this new option.
This makes it possible to pass root assemblies starting with `@` to mtouch/mmp
without getting mistaken for response files.
* [msbuild] Always use the command-line option that takes an equals or colon.
Always use the command-line option that takes an equals or colon instead of a
space.
Do either of these:
--foo=something
--foo:something
instead of this:
--foo something
so that `something` can start with an at (`@`) sign without being mistaken for
a response file.
* [msbuild] Fix tests according to recent task changes.
* Update the function name used to initialize libmono-profiler-log, its called mono_profiler_init_log () now.
* [builds] Pass --with-cross-offsets= to crosstv's configure.
* Bump mono to 2017-08.
* Bump mono to 2017-08.
* Force disable 'futimens' and 'utimensat' so that we build with Xcode 9.
This is also needed to build with Xcode 8.3 on High Sierra.
* Remove old AppleTls implementation.
* Bump mono.
* Bump mono to 2017-08.
* Bump mono to 2017-08
* Reenable link-keep-resources-2 test
- This reverts commit 76b759ef22.
- 2017-08 has linker fix
* Bump mono to 2017-10
* Revert "Bump mono to 2017-10"
This reverts commit bb7832724e.
* Bump system mono to 2017-10
* Bump embedded mono to 2017-10
* [runtime] reflect eglib move
9be68f8952
* bump mono
* [btouch] remove Security.Tls usage from test
* [mtouch tests] update the function name used to initialize libmono-profiler-log, its called mono_profiler_init_log () now.
see
ea4e4a9ef6
fixes:
```
1) Failed : Xamarin.MTouch.Profiling(tvOS)
_mono_profiler_startup_log
Expected: collection containing "_mono_profiler_startup_log"
But was: < "_mono_profiler_init_log" >
at Xamarin.MTouch.Profiling (Xamarin.Profile profile) [0x00106] in <511889694a624cc9a50e0e9b259b05c5>:0
2) Failed : Xamarin.MTouch.Profiling(watchOS)
_mono_profiler_startup_log
Expected: collection containing "_mono_profiler_startup_log"
But was: < "_xamarin_get_block_descriptor", "_mono_profiler_init_log" >
at Xamarin.MTouch.Profiling (Xamarin.Profile profile) [0x00106] in <511889694a624cc9a50e0e9b259b05c5>:0
```
* [mmptest] update log profiler options.
826558a4af
deprecated the dash prefix for the mlpd path.
`noallocs` or `nocalls` are not needed, neither of them are default anymore.
* [mmptest] fix link-keep-resources-2 test to cope with more corlib resources.
another corlib resource (mscorlib.xml) was added:
https://github.com/mono/mono/commit/11e95169e787#diff-2d1c64decd91d9a6e8842ab0f0e9438d
* Revert "[mmptest] fix link-keep-resources-2 test to cope with more corlib resources."
This reverts commit 350eb3c174.
* [XHarness] Add the Mono.Data.Tds tests.
* Address comments from rolf in the review.
* [mmp regresssion tests] bump mono linker, so mscorlib.xml gets stripped
the test was failing in that way:
> Executing link-keep-resources-2...
> [FAIL] i18n 4/2 data files present: charinfo.nlp, collation.core.bin, collation.tailoring.bin, mscorlib.xml
also update the output, because it's actually expected at least three
elements.
fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=59277
* bump mono
fixes crash in tvOS: https://github.com/mono/mono/pull/5812
* bump mono for updated BCL tests
see https://github.com/mono/mono/pull/5820
* [mono] set 2017-10 branch in .gitmodules
* [macos] Fix guiunit error on clean builds by depending on correct copy (#2912)
* [macos] Fix guiunit error on clean builds by depending on correct copy
- From a clean build making a BCL test would error due to the non-mobile guiunit not being built
- This was because the Makefile-mac.inc target was incorrect
- This was because xharness assumed that non variation based targets were always Modern
- However, BCL tests are Full, not Modern
* Code review change
* Swap to var to reduce diff
* Revert changes in the paths for GuiUnit.
* [XHarness] Add the System.IO.Compression bcl tests. (#2918)
* [XHarness] Add the System.IO.Compression bcl tests.
* [XHarness] Add bcl tests for System.IO.Compression.FileSystem. (#2924)
* [XHarness] Add the System.IO.Compression bcl tests.
* Ensure that resources are correctly copied in the bundles.
* [XHarness] Add bcl tests for System.IO.Compression.FileSystem.
* As per review, make the Mac test app name match the tests that are ran.
* [XHarness] Add Mono.CSharp tests on ios. (#2927)
* [XHarness] Add Mono.CSharp tests on ios.
* Bump mono to bring changes in the mono.csharp tests.
* [xtro-sharpie] fix TypeDefinition access due to Cecil change
* Bump mono
* bump mono
fixes
- https://bugzilla.xamarin.com/show_bug.cgi?id=60480
- https://bugzilla.xamarin.com/show_bug.cgi?id=60482
* bump mono
more fixes around conflicting paths when tests are run in parallel.
* Bump for mono/mono@2017-10
- Fixes bug #59928: SKCloudServiceSetupViewController.LoadAsync() does not work correctly when passed an SKCloudServiceSetupOptions object instead of a manually-created NSDictionary
(https://bugzilla.xamarin.com/show_bug.cgi?id=59928)
* [generator] Improve BI1014 - include name of unsupported field and update valid types on docs, fixes bug 57094.
https://bugzilla.xamarin.com/show_bug.cgi?id=57094
* Implement feedback
* fix error message
* More feedback
* [Generator] BindAs attribute for smart enums of an array of nullable values generates code that doesn't compile, Fixes bug 57797
https://bugzilla.xamarin.com/show_bug.cgi?id=57797
We now correctly compiles the array nullabe types
* Disable Nullable array types in BindAs until we add registrar support
For some reason this happens with the watchOS 4.2 simulator on our
Jenkins bots (but not locally for me).
The test is updated to ignore errors as depending on the sim default
content does not seems possible.
In 0442cdf9c0 the `now` variable was changed to
be a UTC date, but unfortunately the code that compares it to a local date
(NSDate.Now) wasn't updated.
Only year/month/day values were compared, which meant the test would fail if
run when UTC and local time didn't represent the same date (and conversely
would pass if the UTC and local date was the same date, which is why the
changed did not fail the PR test run: the PR was tested during the 19 hours of
the day when EST and UTC represent the sam date).
Fix this by converting the UTC `now` to NSDate instead of using NSDate.Now.
This has the additional benefit of also fixing a (much smaller) race
condition: if midnight occurred just between calculating `now` and NSDate.Now,
the test would also fail.
monotouch-test has a wildcard to automatically include new test files, but
this should not include generated files, because:
* The generated files are generated when needed, which means we can't rely on
the wildcard to trigger their generation, because the wildcard won't find
them before they exist, and as such msbuild won't detect that they're
needed.
* This means the generated files must be listed separately, but in that case
they shouldn't be found by the wildcard too, because that leads to:
/Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/msbuild/15.0/bin/Roslyn/Microsoft.CSharp.Core.targets(84,5): error MSB3105: The item "ObjCRuntime/TrampolineTest.generated.cs" was specified more than once in the "Sources" parameter. Duplicate items are not supported by the "Sources" parameter.
So move the generated files to a different directory, so that the wildcard
doesn't find them.
At 2:00 AM on November 5h 2017, winter came to our bots in Boston.
This meant that between 2:00 and 3:00 AM, subtracting 1h from the current
time yielded a time difference of 2h.
This was caught by our observant tests:
[FAIL] CalendarTest.DateComponentsTest : b hour
Expected: 1
But was: 2
To avoid such issues next time this test happens to run during this single
hour of the entire year that causes problems, change the test to use time
calculcation using UTC instead.
This test fails on the bots:
[FAIL] MDLVoxelArrayTest.BoundingBoxTest : MaxX (M)
Expected: -1.0f
But was: 0.0f
For some unknown reason I'm not able to reproduce locally, but the actual
values look normal, so update the test to accept those as well.
* The original API was incorrect. Lack of documentation at binding time?
* Use a strong dictionary to expose the credentials
The fixed version cannot be unit tested since it popups an UI.
The test case attached to the bug report [1] can be used to verify it.
reference:
[1] https://bugzilla.xamarin.com/show_bug.cgi?id=60423
Detect MT1111 from mlaunch (which means mlaunch won't wait for the app to
exit), and instead use test run completion to determine test completion.
The main drawback is that if the test app crashes, it won't be detected (the
test run will time out, and reported as such), but it's still an improvement
over the current behavior (the tests may complete successfully, and still be
reported as timed out).
This also requires bumping maccore to get an updated mlaunch (one that reports
MT1111).
* [monotouch-test][GameplayKit] GKAgent3D isn't available on iOS 9.
Fixes this test failure:
> [FAIL] GKAgent3DTest.RotationTest : ObjCRuntime.RuntimeException : Wrapper type 'GameplayKit.GKAgent3D' is missing its native ObjectiveC class 'GKAgent3D'.
* [monotouch-test][MPS] MPSImageHistogram.HistogramSizeForSourceFormat doesn't seem to work on iOS 9.
Calling MPSImageHistogram.HistogramSizeForSourceFormat seems to abort on iOS 9
due to invalid arguments no matter which pixel format I use:
> /BuildRoot/Library/Caches/com.apple.xbs/Sources/MetalImage/MetalImage-39.3/MetalImage/Filters/MIHistogram.mm:103: failed assertion `[MPSImageHistogram histogramSizeForSourceFormat:] unsupported texture format: 114'
So only call this method on iOS 10+.
* [tests][mtouch] Convert MT4162 to new syntax.
This also means adding support for custom usings in test code, and adding
support for asserting filename/linenumber with error patterns, and custom
pattern syntax.
* [tests][mtouch] Add test case for bug #59617.
This amounts to running the MT4162 test with the linker enabled.
https://bugzilla.xamarin.com/show_bug.cgi?id=59617
This will add Objective Sharpie as an optional dependency, only enforced if
actually trying to run the xtro tests.
The wrench/jenkins tests will show up as green for now (since there are known
failures in the xtro tests that have to be addressed first).
The explicit operator did all it's math using `long` (the internal
representation for DateTime) so the fractional part of the NSDate was
lost. E.g.
> original: 530499149.239266
> roundtrip: 530499149.0
However even when using `double` computations we're still losing some
precision - parts just can be held in the `long` (Ticks) representation
of DateTime.
> original: 530499149.239266
> roundtrip: 530499149.23927
Reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=32022
Don't assume that a marked method has a caller, since a method can be marked
from XML as well.
This fixes a NullReferenceException:
> error : Could not link assemblies.
> Type: `System.Reflection.RuntimeParameterInfo`
> Assembly: `mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e`
> Reason: Object reference not set to an instance of an object
> --- inner exception
> System.NullReferenceException: Object reference not set to an instance of an object (Aufgaben-ID: 165)
> at MonoTouch.Tuner.MonoTouchMarkStep.MarkMethod (Mono.Cecil.MethodReference reference) [0x0004f] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/tools/linker/MonoTouch.Tuner/MonoTouchMarkStep.cs:105
> at Mono.Linker.Steps.MarkStep.MarkMethodCollection (System.Collections.IEnumerable methods) [0x00017] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:1163
> at Mono.Linker.Steps.MarkStep.MarkMethods (Mono.Cecil.TypeDefinition type) [0x0000b] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:1157
> at Xamarin.Linker.Steps.MobileMarkStep.MarkMethods (Mono.Cecil.TypeDefinition type) [0x0000b] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/tools/linker/MobileMarkStep.cs:123
> at Mono.Linker.Steps.MarkStep.ApplyPreserveInfo (Mono.Cecil.TypeDefinition type) [0x0004a] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:1102
> at Mono.Linker.Steps.MarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x001ee] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:607
> at Xamarin.Linker.Steps.MobileMarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00001] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/tools/linker/MobileMarkStep.cs:71
> at Xamarin.Linker.Steps.CoreMarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00046] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/tools/linker/CoreMarkStep.cs:156
> at MonoTouch.Tuner.MonoTouchMarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00001] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/tools/linker/MonoTouch.Tuner/MonoTouchMarkStep.cs:84
> at Mono.Linker.Steps.MarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x0007d] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:566
> at Xamarin.Linker.Steps.MobileMarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00001] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/tools/linker/MobileMarkStep.cs:71
> at Xamarin.Linker.Steps.CoreMarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00046] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/tools/linker/CoreMarkStep.cs:156
> at MonoTouch.Tuner.MonoTouchMarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00001] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/tools/linker/MonoTouch.Tuner/MonoTouchMarkStep.cs:84
> at Mono.Linker.Steps.MarkStep.InitializeType (Mono.Cecil.TypeDefinition type) [0x0005b] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:94
> at Mono.Linker.Steps.MarkStep.InitializeAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00025] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:81
> at Mono.Linker.Steps.MarkStep.Initialize () [0x00016] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:73
> at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x00008] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:66
> at Xamarin.Linker.Steps.MobileMarkStep.Process (Mono.Linker.LinkContext context) [0x00001] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/tools/linker/MobileMarkStep.cs:33
> at Xamarin.Linker.Steps.CoreMarkStep.Process (Mono.Linker.LinkContext context) [0x00017] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/tools/linker/CoreMarkStep.cs:26
> at MonoTouch.Tuner.MonoTouchMarkStep.Process (Mono.Linker.LinkContext context) [0x0001d] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/tools/linker/MonoTouch.Tuner/MonoTouchMarkStep.cs:36
> at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00023] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/external/linker/linker/Mono.Linker/Pipeline.cs:128
> at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, MonoTouch.Tuner.MonoTouchLinkContext& context, System.Collections.Generic.List`1[Mono.Cecil.AssemblyDefinition]& assemblies) [0x000e0] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/tools/mtouch/Tuning.cs:82
https://bugzilla.xamarin.com/show_bug.cgi?id=60176
* [macos] Fix guiunit error on clean builds by depending on correct copy
- From a clean build making a BCL test would error due to the non-mobile guiunit not being built
- This was because the Makefile-mac.inc target was incorrect
- This was because xharness assumed that non variation based targets were always Modern
- However, BCL tests are Full, not Modern
* Code review change
* Swap to var to reduce diff
Fix typo and change how to count unknown/wrong API to not count when the
Makefile is read ($(shell ...) - before executing the tests, and as such not
finding anything wrong), but instead when printing the count (using
backticks).
* [CoreText] Adds API bindings from Xcode 9 Beta 1 to stable
* implement feedback and commit missing test update...
* use NSNumber instead of CFBool
* more feedback
* Fix naming, Offset to BaselineOffset to match other props
This will add Objective Sharpie as an optional dependency, only enforced if
actually trying to run the xtro tests.
The wrench/jenkins tests will show up as green for now (since there are known
failures in the xtro tests that have to be addressed first).
* [CoreMedia] Adds API bindings from Xcode 9 Beta 1 to stable
* Bindings for CoreMedia API from Xcode 9 beta 1 to Stable
* Adds test for manual bindings of CMVideoFormatDescription HEVC APIs
* Fixed TODO of pending exposure of CMSampleBufferAttachmentSettings API
* Derived of the TODO renamed some internal keys inside CMSampleAttachmentKey
static class in order for them to follow the [StrongDictionary] conventions
to avoid uneccesary [Export] on StrongDictionary members. Also removed a
#if !MONOMAC conditional in favour of [NoMac].
* implement feedback
* [NetworkExtension] Update binding from Xcode 9 Beta 1 to Stable
Also found some minor issues on the macOS side of older API
checking xtro, fixed all of them in XAMCORE_4_0.
```
!unknown-field! NEFilterProviderRemediationMapRemediationButtonTexts bound
!unknown-field! NEFilterProviderRemediationMapRemediationURLs bound
!unknown-type! NEFilterProvider bound
```
* implement feedback and fix a build registrar issue
* change TLS to Tls
When we fail to create an InputAudioQueue, we need to free the local GCHandle
we previously created, not the instance GCHandle where we'd put the local
GCHandle in case of success.
This fixes bug #59911 to throw the correct (invalid parameter) exception (and
not leak the local GCHandle either).
https://bugzilla.xamarin.com/show_bug.cgi?id=59911
The media library permission API (to either query the permission status or ask
for permission) was introduced in iOS 9.3, so we need to make sure to not call
it on earlier iOS versions.
If running on older iOS versions, then just don't do anything (unless we're
asked to ignore tests that put up permission dialogs, in which case ignore the
test, since that's the safe approach).
https://bugzilla.xamarin.com/show_bug.cgi?id=59995
* [tests][mtouch] Add support for reading binary plists.
Some plists in Xcode 9 are now binary plists (instead of just plain xml files
like they were in previous versions of Xcode). This causes trouble for some of
our tests, so make sure we handle binary plists as well.
Fixes these failures:
1. Xamarin.MTouch.MT0091(tvOS,"tvOS") : System.Xml.XmlException : Data at the root level is invalid. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) [0x00027] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at System.Xml.XmlTextReaderImpl.Throw (System.String res, System.String arg) [0x00029] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at System.Xml.XmlTextReaderImpl.Throw (System.String res) [0x00000] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace () [0x0012c] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at System.Xml.XmlTextReaderImpl.ParseDocumentContent () [0x002d4] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at System.Xml.XmlTextReaderImpl.Read () [0x0008c] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at System.Xml.XmlLoader.Load (System.Xml.XmlDocument doc, System.Xml.XmlReader reader, System.Boolean preserveWhitespace) [0x000a6] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at System.Xml.XmlDocument.Load (System.Xml.XmlReader reader) [0x0002e] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at Xamarin.Tests.Configuration.GetPListStringValue (System.String plist, System.String key) [0x00028] in <44c95c7e3d1e488ab633a77d9a794653>:0
at Xamarin.MTouch.MT0091 (Xamarin.Profile profile, System.String name) [0x000ae] in <44c95c7e3d1e488ab633a77d9a794653>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <400071ddcfe64ed8a3531490bb763536>:0
2. Xamarin.MTouch.MT0091(iOS,"iOS") : System.Xml.XmlException : Data at the root level is invalid. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) [0x00027] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at System.Xml.XmlTextReaderImpl.Throw (System.String res, System.String arg) [0x00029] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at System.Xml.XmlTextReaderImpl.Throw (System.String res) [0x00000] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace () [0x0012c] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at System.Xml.XmlTextReaderImpl.ParseDocumentContent () [0x002d4] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at System.Xml.XmlTextReaderImpl.Read () [0x0008c] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at System.Xml.XmlLoader.Load (System.Xml.XmlDocument doc, System.Xml.XmlReader reader, System.Boolean preserveWhitespace) [0x000a6] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at System.Xml.XmlDocument.Load (System.Xml.XmlReader reader) [0x0002e] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
at Xamarin.Tests.Configuration.GetPListStringValue (System.String plist, System.String key) [0x00028] in <44c95c7e3d1e488ab633a77d9a794653>:0
at Xamarin.MTouch.MT0091 (Xamarin.Profile profile, System.String name) [0x000ae] in <44c95c7e3d1e488ab633a77d9a794653>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <400071ddcfe64ed8a3531490bb763536>:0
* [tests] The MSBuild tests now need a reference to StringUtils.
Fix tests causing trouble for the AOT compiler by not building those tests on
device (they're testing error conditions in the simulator, which means it's
acceptable to exclude these tests for device builds).
This fixes an AOT-compiler assert:
> * Assertion at /Users/builder/data/lanes/1381/d264709b/source/xamarin-macios/external/mono/mono/metadata/marshal.c:8497, condition `sig->param_count == invoke_sig->param_count + 1' not met
due to invalid [MonoPInvokeCallback] attributes.
Exclude tests whose category is !BITCODE when running on watchOS/Release. This
also requires a minor update to xharness to add a BITCODE conditional
compilation flag to generated watchOS/Release projects configurations.
This partially fixes#59947 (the fix will be complete once we bump to mono/2017-08).
https://bugzilla.xamarin.com/show_bug.cgi?id=59947
* [HealthKit] Update to Xcode 9 GM
* Add new xcode 9 beta APIs
* Fix PR comments
Marking SyncVersion as an int based on SpeedySloth sample from Apple:
guard let version = route.metadata?[HKMetadataKeySyncVersion] as? NSNumber else {
print("Route does not have a sync version for route \(route)")
return
}
if version.intValue == 1 {
self.makeWorkoutRouteSlothy(workout: workout, route: route)
}
* Didn't save after deleting the FIXME
* Fix build issue
* Fix introspection tests
* Add new enum values to HKQuantityType.ToKey
* QuantityTypeIdentifierTest needs xcode version check for new enum types
The registrar requires the availability attributes to work properly, which is
non-trivial when the linker is being used, because the linker runs before the
registrar, and will remove availability attributes.
For this reason we store the availability attributes separately when the
linker removes them so that the registrar can still find them, but
unfortunately it's not enough to store the CustomAttribute instance, because
it may end up crippled: if the attribute type itself is removed by the linker,
then it's not possible to get the attribute type from the CustomAttribute
instance, because 'attribute.Constructor.DeclaringType' returns null (the
linker sets the declaring type of the constructor to null).
Solution: store the attribute type separately; now we use a Tuple of
CustomAttribute and TypeReference.
Fixes this ugly exception:
System.NullReferenceException: Object reference not set to an instance of an object
at XamCore.Registrar.Registrar.RegisterAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00146] in /work/maccore/master/xamarin-macios/src/ObjCRuntime/Registrar.cs:2316
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
at Xamarin.Bundler.RunRegistrarTask.Execute () [0x00001] in /work/maccore/master/xamarin-macios/tools/mtouch/BuildTasks.mtouch.cs:154
* Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as the trampoline.
Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as
the trampoline, so that it's safer for normal users (crashes due to incorrect
usage are rare and random, and as such they're also hard to track down).
Additionally introduce a BlockLiteral.SetupBlockUnsafe method, that still has
the old behavior, so that we can use it in our own (reviewed) code.
* [ObjCRuntime] Add some validation to BlockLiteral.SetupBlock.
* Use BlockLiteral.SetupBlockUnsafe instead of .SetupBlock
Use SetupBlockUnsafe in our own code, because we know our own code is using it
correctly (by passing a trampoline stored in a static field, so that the GC
doesn't free it).
* [tests] Fix xammac tests build.
* [xharness] Don't list unusable devices.
* [xharness] Show the list of candidate devices in the html report.
* [xharness] Prioritize devices depending on the interface speed.
* [xharness] Simplify code a bit.
Logs are TextWriters by themselves, so no need to get a StreamWriter to pass
to API that takes TextWriter, when we can just pass the log instance itself.
This makes it possible to timestamp external process output (because
Log.Timestamp is honored instead of bypassed).
* [xharness] Timestamp install logs.
So that we get exact numbers of how long it takes to install on watch (and if
the watch installation stalls, or just times out because it takes too long).
Always wait for processes to exit, even if they're killed.
Also make absolutely sure that we can safely handle any exception when getting
the ExitCode, no matter what.
https://bugzilla.xamarin.com/show_bug.cgi?id=57846
* [ios11-b1] CoreGraphics bindings
* Updated with feedback from Sebastien
* Fix build, optimize checks
* Add version information
* Address comments
* Tests
* Remove Apply code, add special code for typo
* [CoreGraphics] Add comma after last enum value.
* [CoreGraphics] No need to bind CGColorSpaceGetName.
* [CoreGraphics] Add new field in Xcode 9 beta 5.
* [CoreGraphics] Move kCGPDFContextAccessPermissions to the correct dictionary container and implement the corresponding manual code.
* [CoreGraphics] Adjust nullability acceptance based on new attributes for CGColorSpace.CreateCalibratedGray/RGB functions.
* [CoreGraphics] Bind CGColorSpaceCreateLab, introduced in Xcode 9 beta 5.
* [CoreGraphics] Adjust CGColorSpaceCreateWithICCData and CGColorSpaceCreateWithICCProfile bindings according to Xcode 9 beta 2.
Apple introduced CGColorSpaceCreateWithICCData in b1, and made
CGColorSpaceCreateWithICCProfile a typedef to CGColorSpaceCreateWithICCData.
Apple reversed the typedef in b2 (probably because it creates broken
executables when targetting earlier versions of macOS, since those executables
would use CGColorSpaceCreateWithICCData, which would not exist), and instead
made CGColorSpaceCreateWithICCProfile a normal deprecated method.
So copy this logic in our bindings: deprecate CreateICCProfile, and introduce
CreateICCProfile, with two overloads for NSData and CGDataProvider (since
that's what's accepted according to the documentation).
* [CoreGraphics] Add CGContextPDF constructors to make parity between different overloads.
There are two types of CGContextPDF constructors: the first argument is either
an NSUrl or a CGDataConsumer. Previously the NSUrl type had more overloads,
and also allowed a null CGRect for the second argument. With the overloads are
identical between the two types of CGContextPDF constructors.
Existing constructors:
CGContextPDF (NSUrl, CGRect, CGPDFInfo)
CGContextPDF (NSUrl, CGRect)
CGContextPDF (NSUrl, CGPDFInfo)
CGContextPDF (NSUrl)
CGContextPDF (CGDataConsumer, CGRect, CGPDFInfo)
Added constructors:
CGContextPDF (CGDataConsumer, CGRect)
CGContextPDF (CGDataConsumer, CGPDFInfo)
CGContextPDF (CGDataConsumer)
Additionally the code has been fixed to not throw NullReferenceExceptions if
null is passed for any of the values and instead pass on any null values to
the native `CGPDFContextCreate` method (since `CGPDFContextCreate`'s arguments
are all `__nullable`).
* [tests] Add and improve existing tests for new and some existing CoreGraphics API.
* Undo accidental whitespace noise.
* [tests] Remove random characters in assert message.
* [CoreGraphics] Improve argument exception messages in CGColorSpace according to review.
* [CoreGraphics] Use 'Icc' instead of 'ICC' for new API, and also make the change for XAMCORE_4_0.
* [CoreGraphics] Fix availability attribute for High Sierra.
* [tests] Update monotouch-test after API changes.
The registrar requires the availability attributes to work properly, which is
non-trivial when the linker is being used, because the linker runs before the
registrar, and will remove availability attributes.
For this reason we store the availability attributes separately when the
linker removes them so that the registrar can still find them, but
unfortunately it's not enough to store the CustomAttribute instance, because
it may end up crippled: if the attribute type itself is removed by the linker,
then it's not possible to get the attribute type from the CustomAttribute
instance, because 'attribute.Constructor.DeclaringType' returns null (the
linker sets the declaring type of the constructor to null).
Solution: store the attribute type separately; now we use a Tuple of
CustomAttribute and TypeReference.
Fixes this ugly exception:
System.NullReferenceException: Object reference not set to an instance of an object
at XamCore.Registrar.Registrar.RegisterAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00146] in /work/maccore/master/xamarin-macios/src/ObjCRuntime/Registrar.cs:2316
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
at Xamarin.Bundler.RunRegistrarTask.Execute () [0x00001] in /work/maccore/master/xamarin-macios/tools/mtouch/BuildTasks.mtouch.cs:154
Re-based from Miguel's PR #2476 including reviewers feedback.
[1] https://github.com/xamarin/xamarin-macios/pull/2476
* [spritekit] Add GKSceneRootNodeType to SKScene too and adjust intro tests
* [tests][intro][macos] Don't skip protocol checks for SceneKit on 64 bits
It's not needed, because protocol members don't end up in the registrar output
anyway (and would thus not prevent the registrar code from compiling).
Classes that implement any protocol members would still run into the SDK
check, so this should not prevent real problematic code from being reported
either.
https://bugzilla.xamarin.com/show_bug.cgi?id=59617
* [registrar] Remove useless interface.
* [registrar] Don't store LinkContext in the static registrar when in can be fetched from the Target. Partially fixes#59617.
This avoids a problem where our code would store null because LinkContext
wasn't created yet when the static registrar instance was created.
This fixes the missing error from bug #59617.
https://bugzilla.xamarin.com/show_bug.cgi?id=59617
* [registrar] Don't verify the SDK for protocol members. Partially fixes#59617.
It's not needed, because protocol members don't end up in the registrar output
anyway (and would thus not prevent the registrar code from compiling).
Classes that implement any protocol members would still run into the SDK
check, so this should not prevent real problematic code from being reported
either.
https://bugzilla.xamarin.com/show_bug.cgi?id=59617
* [tests][mtouch] Fix tests after registrar changes.
It does not make sense to create Xamarin.iOS projects that don't reference
Xamarin.iOS.dll, so make this an explicit error.
This fixes a NullReferenceException which could (when building for device, or
when not using simlauncher) occur, and instead shows the MT0123 error.
> MTOUCH : error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
> System.NullReferenceException: Object reference not set to an instance of an object
> at Xamarin.Bundler.Target.GatherFrameworks () [0x00065] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/common/Target.cs:122
> at Xamarin.Bundler.Target.ProcessAssemblies () [0x000c2] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Target.cs:802
> at Xamarin.Bundler.Application.ProcessAssemblies () [0x0002f] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Application.cs:1407
> at Xamarin.Bundler.Application.BuildManaged () [0x00001] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Application.cs:831
> at Xamarin.Bundler.Application+<>c.<BuildAll>b__134_1 (Xamarin.Bundler.Application v) [0x00000] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Application.cs:779
> at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in <48b95f3df5804531818f80e28ec60191>:0
> at Xamarin.Bundler.Application.BuildAll () [0x00050] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Application.cs:779
> at Xamarin.Bundler.Driver.Main2 (System.String[] args) [0x00481] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/mtouch.cs:1420
> at Xamarin.Bundler.Driver.Main (System.String[] args) [0x0000f] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/mtouch.cs:945
https://bugzilla.xamarin.com/show_bug.cgi?id=59798