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

1983 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge a4dbb289b6 [mtouch] Make the linker output a list of AssemblyDefinition instead of paths.
Have the linker return the paths for AssemblyDefinitions is just redundant if
we immediately use those paths to re-load the AssemblyDefinitions.
2017-02-10 14:12:02 +01:00
Rolf Bjarne Kvinge 6545897ccf [tests] Add test for MT0003. 2017-02-10 14:03:25 +01:00
Rolf Bjarne Kvinge ce2d9fac32 [docs] Improve MT0099 error help text a little bit. 2017-02-10 14:03:25 +01:00
Rolf Bjarne Kvinge 209ac7e58e [tests] Some simulator builds can disable the linker to build slightly faster. 2017-02-10 14:03:25 +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
Rolf Bjarne Kvinge 7bfe13396e Bump maccore to get potential fix for #47750. (#1587)
https://bugzilla.xamarin.com/show_bug.cgi?id=47750
2017-01-31 07:07:02 +01:00
Rolf Bjarne Kvinge 76587376e9 [xharness] Fix code to compile with csc. (#1586) 2017-01-30 10:04:59 +01:00
Rolf Bjarne Kvinge 8b17770d36 [xharness] Make 'IncludeMac' an general switch for all macOS tests. (#1582) 2017-01-27 18:24:10 +01:00
Rolf Bjarne Kvinge 71e61b4b04 [xharness] Always add the mmp test to the list of tests, but mark it as ignored when it shouldn't be executed. (#1580) 2017-01-27 17:02:21 +01:00
Rolf Bjarne Kvinge c0c1136d70 [xharness] Get the INCLUDE_ make variables and disable tests accordingly. (#1578) 2017-01-27 10:52:49 +01:00
Rolf Bjarne Kvinge 92659752df [xharness] No need to run the mac binding projects twice. (#1577) 2017-01-27 10:36:09 +01:00
Rolf Bjarne Kvinge 47a7568f9b [tests] Refactor many of the mtouch tests to use new testing infrastructure. (#1569)
This makes a couple of future optimizations easier:

* Cache the compilation of test assemblies.
* Load mtouch.exe directly in the test process.
2017-01-27 07:35:32 +01:00
Rolf Bjarne Kvinge 98feef8dff [tests] The mtouch tests now require Cecil, so add the expected project reference to the solution. (#1568) 2017-01-27 07:32:44 +01:00
Jeffrey Stedfast f5b725e2af [msbuild] Added ProcessEnums property for ObjC Binding projects (#1557)
The new ProcessEnums property specifies whether or not to
pass /process-enums to the btouch task for iOS/Mac binding
projects.

Part of the fix for https://bugzilla.xamarin.com/show_bug.cgi?id=51753
2017-01-26 11:24:14 -05:00