Граф коммитов

1992 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge e8fbb7f0a6 [tests][mtouch] There's no need to delete a temporary directory we create ourselves. (#1711)
Deleting the directory when the test completes just makes it harder to copy-
paste the failing command.

Any directories created by Cache.CreateTemporaryDirectory will automatically
be deleted at the next test run, so this won't use up disk space.
2017-02-17 16:01:05 +01:00
Rolf Bjarne Kvinge cf14456cd5 [mtouch] Add docs and improve MT4146 to be an error if we can detect the generated code won't compile. Fixes #52530. (#1712)
https://bugzilla.xamarin.com/show_bug.cgi?id=52530
2017-02-17 16:00:53 +01:00
Sebastien Pouliot eb415136d0 [gamecontroller] Change some handlers to properties (#1710)
In the old days we could only set them (but not read them back) so we
used methods. Today it's possible to expose them as nicer properties.

Even nicer Alex's PR#1707 makes it possible to do those changes without
needing any manual code (outside of the binding file).

reference:
!missing-selector! GCControllerButtonInput::pressedChangedHandler not bound
!missing-selector! GCControllerButtonInput::valueChangedHandler not bound
!missing-selector! GCMotion::valueChangedHandler not bound
2017-02-17 08:37:39 -05:00
Alex Soto a021c0cd3c [generator] Have WrapAttribute generate virtual members (#1707)
* [generator] Have WrapAttribute generate virtual members

WrapAttribute now has a boolean optional parameter named isVirtual,
this instructs the generator to add the virtual keyword to generated
members.

This is useful when fixing breaking changes so we can keep the wrong
signature generated instead of having manual code files.

* [docs] Add docs about virtual to WrapAttribute
2017-02-16 17:24:40 -06:00
Alex Soto 61c72afd78 Fix Bug 51514 - [generator] Missing [Wrap] from protocol/interface when parent has a [Wrap] itself (#1708)
https://bugzilla.xamarin.com/show_bug.cgi?id=51514

The generator used a list of strings (selector names) to determine
what methods are needed to be generated. Unfortunately this info
is not available (null) when looking for it on [Wrap] decorated members
so it would only generate the first [Bind] it would find. Now it uses
a HashSet of MemberInformation objects to compare.

The removal of SCNView.HitTest inside scenekit.cs was done because
this is now correctly generated from SCNSceneRenderer interface
2017-02-16 17:19:40 -06:00
Sebastien Pouliot a4af7e5878 [mono] Bump mono for: [jit] Disable llvm for overly complex methods, to avoid compilation slowdowns. Fixes #52475. (#1698)
https://bugzilla.xamarin.com/show_bug.cgi?id=52475
2017-02-15 19:05:42 -05:00
Rolf Bjarne Kvinge 72ec3ad168 [mtouch/mmp] Add support for --nowarn and --warnaserror. (#1689)
Besides the obvious reasons, this is also useful when testing warnings, since
by making warnings errors, mtouch/mmp will exit a lot faster (and the tests
will finish faster).
2017-02-14 17:46:26 +01:00
Alex Soto 80e0620155 [AVFoundation] Add BindAs to fix bug 44015 & 48235 (#1683)
https://bugzilla.xamarin.com/show_bug.cgi?id=48235
https://bugzilla.xamarin.com/show_bug.cgi?id=44015

* Adding BindAs to AVCaptureVideoDataOutput.AvailableVideoCVPixelFormatTypes
* Adding BindAs to AVCapturePhotoOutput.SupportedFlashModes

Both only if XAMCORE_4_0 ever happens
2017-02-13 19:36:07 -06:00
Rolf Bjarne Kvinge a1245c8db6 [generator] Generate the list of frameworks in each platform based on the information in the makefiles. (#1687)
Generate the list of frameworks in each platform based on the information in
the makefiles and use that information to remove the remaining framework-
specific ifdefs in the generator.

There are still platform-specific checks when determining the UINamespaces and
ImplicitNamespaces, to make sure the generated code doesn't change. Ideally
we'll remove the platform-specific logic at some point, but that's not the
goal with this commit.

Generator diff: https://gist.github.com/rolfbjarne/6803740e37a5976e139afb28e16b4ccf
The generated generator-frameworks.cs: https://gist.github.com/rolfbjarne/6d1a3452db4cecb8f163c4d91d622082
2017-02-13 18:01:16 +01:00
Zoltan Varga 884c86befd [mmp] Apply the changes in dea2dde259 to the mscorlib.xml descriptor in mmp as well. Fixes #52186. (#1685) 2017-02-13 10:16:42 +01:00
Rolf Bjarne Kvinge 4a0ffa3110 [mtouch tests] Refactor registrar tests a little bit to not cause trouble in Xamarin Studio. (#1679)
Change how the registrar calls mtouch a bit, so that we don't use API that
throws an exception with the entire output in the exception message.

The problem is that if the process has a lot of output, XS slows down to a
crawl when showing the exception message in the test result pad.

Instead print the output to the terminal.
2017-02-10 18:24:37 +01:00
Rolf Bjarne Kvinge d3137d0b95 [tests/link sdk] Fix watchOS version check. (#1678)
* [tests/link sdk] Remove defines that are set by default.

And these defines varies by platform, which means they're not correct for tvOS/watchOS.

* [tests/link sdk] Fix watchOS version check.
2017-02-10 18:22:46 +01:00
Rolf Bjarne Kvinge abc138a3da [generator] Explicitly load NSNumber from the api assembly for core builds. (#1676)
* [generator] Explicitly load NSNumber from the api assembly for core builds.

This fixes an issue where we'd run into a type comparison failure otherwise,
when using the `BindAs` attribute in the api definition for our platform
assemblies, because we end up with NSNumber loaded from two different
assemblies:

Foundation.NSNumber, **temp**, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

Foundation.NSNumber, **core**, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

* [generator] Explicitly load NSValue too from the api assembly for core builds.
2017-02-10 17:32:46 +01:00
Rolf Bjarne Kvinge 5fb09b1b84 [linker] Remove static state, and put the state inside DerivedLinkContext instead. (#1657)
Remove the usage of static variables in the linker so that one day we can run
the linker in parallel over multiple assembly sets.
2017-02-10 07:45:42 +01:00
Rolf Bjarne Kvinge dd0180b389 Set max mono version to Cycle 9's mono. (#1670)
It looks like mono master has become incompatible, builds now fail with:

    error: File '/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/bin/net_4_5/GuiUnit.exe.mdb' is missing.
    make[4]: *** [build-mac-classic-introspection] Error 1

so restrict to C9 only, until we can fix these issues.
2017-02-09 11:34:56 -05:00
Rolf Bjarne Kvinge 0e27b4a812 [mtouch tests] Add sleep to fix #47696. (#1662)
Sometimes, when the stars align, fastsim can build an app in less than a
second.

Coupled with the fact that HFS+'s filestamp resolution is 1 second, we can't
assert that filestamps change without making sure enough time passes by.

So sleep for a second.

https://bugzilla.xamarin.com/show_bug.cgi?id=47696
2017-02-09 11:53:18 +01:00
Sebastien Pouliot eed503e422 [mtouch] Reload symbols before saving an assembly again (when needed). Fixes #51667 (#1651) (#1653)
Cecil cannot save an assembly more than once without reloading its
debugging symbols. There was code for this, in the special case where
an assembly could be saved more than once. However the order of the
operations changed and the code to reload symbols was now located too
late.

https://bugzilla.xamarin.com/show_bug.cgi?id=51667
2017-02-08 20:50:29 -05:00
Rolf Bjarne Kvinge 38abe50b58 [generator] Add a class to take care of all the attributes. (#1661)
IKVM's API to get attributes does not match System.Reflection's API, so
abstract all we need out to a separate class to make it easier to port it to
IKVM later.
2017-02-08 19:01:24 -05:00
Vincent Dondain 6ff7fac731 [README] Add Xamarin.iOS + Xamarin.Mac banner (#1665) 2017-02-08 17:42:48 -05:00
Chris Hamons 2c835c5294 [XM] Add hybrid/standard AOT option and improve AOT code (#1650)
* [XM] Seperate parsing from compilation in AOT code

- Parsing command line options was too entangled with actually compiling
- Refactor test code to centralize Compile, reducing some complexity of tests
- Groundwork for hybrid vs non-hybrid AOT work

* Add hybrid/standard AOT support

* Add xammac_tests to makefile/jenkins

* Add flag to force AOT

* Disable MonoTouchFixtures.Contacts.ContactStoreTest.GetUnifiedContacts on XM due to prompts on Jenkins
2017-02-08 13:40:48 -06:00
Timothy Risi 9c79a7102d Remove MediaPlayer from XM Classic and 32-bit Unified (#1579)
Make new MediaPlayer APIs 64 bit only and remove from classic
2017-02-08 09:47:18 -09:00
Chris Hamons 03926bc72b [XM] Fix APIBreaks (#1638) (#1643)
AVCaptureAutoFocusSystem was removed in:

	commit 65ffc88
	Author: Manuel de la Pena v-mandel@microsoft.com
	Date: Thu Aug 11 14:22:59 2016 +0200

	[AVFoundation] Update bindings for XCode8. Focus on enums and structs. (#591)

public virtual bool WriteToUrl (Foundation.NSUrl url, Foundation.NSDictionary options, SCNSceneExportDelegate handler, SCNSceneExportProgressHandler exportProgressHandler) was in:

	commit 58a0e61
	Author: Alex Soto dalexsoto@gmail.com
	Date: Fri Aug 5 07:23:02 2016 -0500

	[Scenekit] Update SceneKit to Xcode8 Beta 4 (#552)

public SCNView (CoreGraphics.CGRect frame, SCNRenderingOptions options); was in:

	commit 921b254
	Author: Sebastien Pouliot sebastien.pouliot@gmail.com
	Date: Sat Aug 6 10:59:16 2016 -0400

	[watchos][scenekit] Enable SceneKit on watchOS (#563)

Also fixing

Type Changed: AppKit.INSAccessibility

Added property:

	public virtual bool AccessibilityRequired { get; set; }

Type Changed: GameKit.IGKTurnBasedEventHandlerDelegate

Added method:

	public virtual void HandleTurnEvent (GKTurnBasedMatch match, bool activated);

Type Changed: Metal.IMTLRenderCommandEncoder

Added methods:

	public virtual void DrawIndexedPatches (uint numberOfPatchControlPoints, IMTLBuffer patchIndexBuffer, uint patchIndexBufferOffset, IMTLBuffer controlPointIndexBuffer, uint controlPointIndexBufferOffset, IMTLBuffer indirectBuffer, uint indirectBufferOffset);
	public virtual void DrawPatches (uint numberOfPatchControlPoints, IMTLBuffer patchIndexBuffer, uint patchIndexBufferOffset, IMTLBuffer indirectBuffer, uint indirectBufferOffset);
	public virtual void TextureBarrier ();
2017-02-08 10:11:59 -06:00
Rolf Bjarne Kvinge 84953af5de [mtouch/mmp] Fix cecil dependencies. (#1656)
Make sure mtouch/mmp rebuild cecil when anything changes in cecil.
2017-02-08 14:57:37 +01:00
Rolf Bjarne Kvinge be12544444 [mtouch] Remove unused file from the build. (#1655) 2017-02-08 13:45:57 +01:00
Rolf Bjarne Kvinge e4a127aab8 [generator] Remove a few XAMCORE_2_0 ifdefs in favor of a Unified runtime check. (#1647) 2017-02-07 14:47:04 +01:00
Rolf Bjarne Kvinge 13bbda632e [generator] Add type manager. (#1637)
* [generator] Add type manager.

`typeof` expressions can't be used with IKVM, so add a type manager that
handles all the type lookup. For now it just uses `typeof`s to find types, but
that'll change to be a string-based lookup instead (which would be IKVM-
compatible).

* [generator] Move the type manager to its own file.

* [generator] Load missing type.
2017-02-07 12:15:36 +01:00
Ankit Jain e3166fbb15 [msbuild][fsharp] Copy .mdb files when building with msbuild (#1641)
Mono's fork of msbuild uses a `$(_DebugFileExt)` property to specify
the debug file extension (.pdb/.mdb) to use. It defaults to .pdb. So,
with XI/XM, .mdb files don't get copied to the output folder.

We also add a `$(FscDebugFileExt)` property, which allows our default of
`.mdb` to be overridden.

But the `$(_DebugFileExt)` support  is not in upstream msbuild yet. So,
we can't ask the F# upstream to add it. Hence, this is being added to
our FSharp target files. Once, all this is upstream, we can remove the
overrides from our files.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=51148
2017-02-06 15:27:07 -05:00
Jeffrey Stedfast bc251403c2 [msbuild] Properly decide on when to re-codesign app bundle (#1625)
If the user makes changes to an App Extension or Watch app,
then those bundles would change within the main app bundle
but the main app bundle would not get re-codesigned because
it was not properly considering those files as inputs in the
_CodesignAppBundle target.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52165
2017-02-06 13:52:30 -05:00
Chris Hamons f6918bdc43 Update xm apidiff to cycle8 (#1624) 2017-02-06 08:40:43 -06:00
Sebastien Pouliot a94e4dc423 Revert c633bd378f and fix #51805 with a new Cecil API (#1640)
* Revert "[mtouch][linker] Remove type forwarders. Fixes #51805 (#1589) (#1600)"

This reverts commit c633bd378f.

* [mono] Bump mono to get latest cecil (cycle9) and fix linker's ExternalType.Scope. Fixes #52187 and #51805

Original fix for bug #51805 was reverted since it caused a regression [2]
when type forwarders are used thru reflection, which happens when
serializing some types.

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=51805
[2] https://bugzilla.xamarin.com/show_bug.cgi?id=52187
2017-02-03 16:12:28 -05:00
Alex Soto 3b0f1baf69 [mmp/btouch] Better error when bad xml linker input is given to mmp/mtouch (#1614)
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=52238

If you give mtouch/mmp a linker xml file with bad input for
example a Xamarin.iOS app and the linker.xml has a reference
to Xamarin.Mac instead of X.I.dll i.e.

<?xml version="1.0" encoding="UTF-8" ?>
<linker>
	<assembly fullname="Xamarin.Mac">
    	<type fullname="ObjCRuntime.Constants"/>
	</assembly>
</linker>

You will get a not so helpful generic error

MT2001 Could not link assemblies. Reason: Failed to process XML description: <unspecified>

It seems that when you use a xml file for linker you get a
`XmlResolutionException` from cecil when it fails to resolve
and the better error comes from the inner exception so we use
that instead.

New error output for XmlResolutionException:

MT2017: Could not process XML description: Failed to resolve assembly: 'Xamarin.Mac, Culture=neutral, PublicKeyToken=null'
2017-02-03 14:04:06 -06:00
Chris Hamons 9775b2e4a4 Fix block warning on RegisterCloudKitShare (#1533) 2017-02-03 10:08:51 -06:00
Rolf Bjarne Kvinge 818ef24336 [generator] Don't use type initializers with ifdefs. (#1634)
Because that won't work when those ifdefs are converted to normal ifs.
2017-02-03 14:13:31 +01:00
Rolf Bjarne Kvinge a22cda6eb3 [mtouch tests] Adjust FastDev_LinkWithTest after fe17d5db9f. (#1633)
We disabled fastdev for tvOS/watchOS projects with binding projects in
bac02538, and that broke the FastDev_LinkWithTest:

    Errors and Failures:
    1) Test Failure : Xamarin.MTouch.FastDev_LinkWithTest(TVOS)
         Binding symbol not in executable
      Expected: no item String ending with " T _theUltimateAnswer"
      But was:  < ... >

So adjust the test to match the new behavior.
2017-02-03 11:02:07 +01:00
Rolf Bjarne Kvinge e3eedb62d3 [mmptest] Use the right location for mono64. (#1630) 2017-02-03 09:24:35 +01:00
Rolf Bjarne Kvinge d9c23c2ba8 [mtouch] Automatically enable bitcode if LLVM is enabled. Fixes #52241. (#1620)
Currently we can't build watchOS projects if LLVM is enabled, but bitcode is
not (see bug #51634).

Additionally the IDEs do not have UI to select if bitcode is enabled or not,
so automatically enable it if LLVM is enabled (since most likely people will
be building for the App Store if LLVM is enabled).

https://bugzilla.xamarin.com/show_bug.cgi?id=51634
https://bugzilla.xamarin.com/show_bug.cgi?id=52241
2017-02-03 07:16:17 +01:00
Rolf Bjarne Kvinge 68415e88c5 [mtouch] Fix build error with fastdev & libpinvokes & paths with spaces. (#1618) 2017-02-02 18:09:42 +01:00
Sebastien Pouliot cc0f41f1a7 [mono] Bump to latest revison of mono-4.8.0-branch (#1611) 2017-02-01 15:42:58 -05:00
Chris Hamons 1db1ce5a40 [XM] Add BCL tests (#1447) 2017-02-01 11:05:08 -05:00
Rolf Bjarne Kvinge cf1157d1a8 [generator] Replace target-specific ifdefs with feature-specific ifdefs. (#1583)
Eventually these ifdefs will be replaced with normal ifs.
2017-02-01 16:21:03 +01:00
Rolf Bjarne Kvinge e9eb52a78a [docs] Improve MT0091's documentation a little bit. (#1609) 2017-02-01 14:58:54 +01:00
Rolf Bjarne Kvinge 35b17da170 [doc] Add blurb about MT1009. (#1608) 2017-02-01 14:30:45 +01:00
Rolf Bjarne Kvinge 76fadce1a3 Validate file permissions of installed files. (#1607)
Validate file permissions of installed files, so that we don't run into
bug #52113 again.

https://bugzilla.xamarin.com/show_bug.cgi?id=52113
2017-02-01 14:30:29 +01:00
Rolf Bjarne Kvinge 743a45456d [builds] Fix mdb permissions. Fixes #52113. (#1605) 2017-02-01 10:47:46 +01:00
Timothy Risi 48682b27aa Resource files for mac should be copied to the app bundle (#1500)
Resource files for mac should be copied to the app bundle
* Move the Satellite code used by mac to tools/common/Assembly.cs
* Add EmbeddedResources test to xammac_tests
2017-01-31 15:59:08 -09:00
Timothy Risi f3ebfc3cce Fix NSOpenGLPixelFormat ConvertToAttributes method (#1539)
Fix NSOpenGLPixelFormat ConvertToAttributes

* Add OpenGLProfile to list of NSOpenGLPixelFormatAttributes that require a value.  Check for 0 terminating the array
* Use InitializeHandle instead of 'Handle = '
* Add tests
2017-01-31 15:52:09 -09:00
Timothy Risi 406fe61266 NSSliderTouchBarItem.ValueAccesoryWidth should be nfloat, not double (#1585) 2017-01-31 14:31:14 -09:00
Sebastien Pouliot c633bd378f [mtouch][linker] Remove type forwarders. Fixes #51805 (#1589) (#1600)
a. System.Net.Http.Primitives.dll is user code *and* contains type
forwarders (it's like a facade) to another facade assembly,
System.Net.Primitives.dll, that ships with the SDK;

b. The former, System.Net.Http.Primitives.dll, is not processed by
the linker, e.g. no code is removed and the assembly cannot be deleted.
However we save back (as much as we can [1]) the result of any type
being resolved;

c. It also means the later, System.Net.Primitives.dll, is fully linked
and (in many cases) can be removed from the final application (as it's
mostly forwarders).

d. This means the final, re-saved, System.Net.Http.Primitives.dll binary
could point to non-existing metadata, i.e. the removed
System.Net.Primitives.dll, because of [1].

Because we resolve (and save) the forwarders *and* because we do not
allow code downloads or generation (Apple restriction) it is possible to
remove the forwarders, which will fix the issue for XI.

[1] The scope of exported types cannot be updated
abb4e902da/Mono.Cecil/ExportedType.cs (L41)

There is also a enhancement bug, #11165, about this but it predated our
PCL support and the resolve-n-save that we now do for forwarders. This
is now _fully_ fixed.

References:
* https://bugzilla.xamarin.com/show_bug.cgi?id=11165 (enhancement)
* https://bugzilla.xamarin.com/show_bug.cgi?id=51805
2017-01-31 16:22:34 -05:00
Sebastien Pouliot de090b86d4 [tests][macos][intro] Fix XM classic introspection tests. Fixes #52065 (#1595) (#1597)
The latest Sierra had a few surprises:

* CITextFeature is now 64bits only;
* The MediaPlayer framework is now 64bits only [1]

Both made the classic tests fails for XM.

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=52065
2017-01-31 14:45:30 -05:00
Rolf Bjarne Kvinge bac0253848 [mtouch] Automatically disable incremental builds if building to bitcode and any third-party bindings were found. Works around bug #51710. (#1592)
Most projects building to bitcode (any kind of bitcode, this includes the
marker-only version as well), will fail to link when linking with third-party
libraries and incremental builds are enabled.

So automatically disable incremental builds when we detect this scenario.

This is only a workaround until we can make this scenario build correctly.

https://bugzilla.xamarin.com/show_bug.cgi?id=51710
2017-01-31 14:55:54 +01:00