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

1710 Коммитов

Автор SHA1 Сообщение Дата
Chris Hamons 6fc5d5b527 [XM] Add 32-bit variants of apitest and introspection and fix bindings (#1234)
* [XM] Add 32-bit variants of apitest and introspection and fix bindings

- Previous to this we were only running 64-bit tests, which caused us
to make mistakes

* Fix cherry-pick to build

* Correctly skip jenkins XM45 when asked

* Fix logic

* Run 32-bit tests on Jenkins

* Fix Jenkins grouping by respecting -32 suffix

* More fixing of jenkins. This time make enum for 32-bit types
2016-11-30 16:38:32 +01:00
Sebastien Pouliot 07fc03144c [networkextension] Mark NEPacketTunnelNetworkSettings default .ctor obsolete (#1267)
The returned instance cannot be used [1]. However removing it would be
a breaking change so we're obsoleting the API (until a new version of
the profile).

[1] https://github.com/xamarin/xamarin-macios/pull/1158#discussion_r90044577
2016-11-30 09:55:05 -05:00
Emanuel dfcea77a69 Changes GetVirtualProjectPath to make relative paths when building from VS
This change fixes the build of solutions that contain Shared Projects with BundleResources from VS. In that case the ItemSpec of the BundleResource is the full Windows path, so we ended up with an invalid path.

Fixes Bug #47570 - On building "FilterDemoApp", it gives "path's format is not supported" build error.

https://bugzilla.xamarin.com/show_bug.cgi?id=47570
2016-11-30 11:40:20 -03:00
batmaninpink 26e640ce84 [networkextension] Fix some API that works only from an extension with specific entitlements (#1158)
* Enable default constructor on NEPacketTunnelProvider
* NEPacketTunnelNetworkSettings needs the same constructor as parent class
* skip NEPacketTunnelProvider in ctor init test

From @VincentDondain 

`NEPacketTunnelProvider *a = [[NEPacketTunnelProvider alloc] init];` return `nil` without these entitlements:

```
<key>com.apple.developer.networking.networkextension</key>
<array>
    <string>packet-tunnel-provider</string>
    <string>app-proxy-provider</string>
    <string>content-filter-provider</string>
</array>
```

Note: you're also supposed to call it from its "extension process" otherwise you get: `NEProvider objects cannot be instantiated from non-extension processes.`

Hence from an iOS App Extension that has the `com.apple.networkextension.packet-tunnel` extension point.
2016-11-29 14:20:48 -05:00
Timothy Risi 7d88592a68 [45243] NSObject Binding methods should use NSString for the binding, not string (#992)
Added [Sealed] to new apis and keep old ones as bindings instead of wrapping
2016-11-29 14:14:53 -05:00
Chris Hamons cc99d21ff6 [XM] Change mmp defaults to static registrar and disable lldb attach … (#1256)
* [XM] Change mmp defaults to static registrar and disable lldb attach in release mode

- Static registrar is now proven and can be flipped on for default on release
- LLDB attach isn't very helpful in release mode and pops up the install xcode dialog
- Relax Unified_HelloWorld_ShouldHaveNoWarnings to exclude static registrar warnings due to https://bugzilla.xamarin.com/show_bug.cgi?id=48311
2016-11-29 12:44:05 -06:00
Rolf Bjarne Kvinge 1e89690cd7 [generator] Include Xamarin.Mac apps in --link-with support. (#1260)
Xamarin.Mac apps now support binding projects, so there's no reason to not
support --link-with in the generator.
2016-11-29 11:09:42 -05:00
Rolf Bjarne Kvinge 65192596ad [generator] Remove support for [Alpha]. (#1258)
* We don't use it.
* It's not documented.
* It's not in Unified.
* I've never seen a customer project using it.

So remove it to simplify our code.
2016-11-29 14:29:01 +01:00
Rolf Bjarne Kvinge d991d5744e [generator] Remove an ifdef that controls an obsolete option (and instead just hide the option). (#1259) 2016-11-29 14:28:26 +01:00
Jeffrey Stedfast 5682c4d8e9 [msbuild] Touch the .dSYM Info.plist after stripping the native exe (#1233)
The idea here is to prevent future builds from calling dsymutil
if the native executable hasn't changed since the previous build.

The reason we need to touch the dSYM Info.plist after stripping
is because the SymbolStrip task *may* modify the native executable
thereby giving it a newer mtime timestamp than the dSYM Info.plist
which would cause later builds to re-run the dsymutil task on an
already-stripped native executable.

It should be noted, however, that the _CodesignAppBundle target
already updates the mtime timestamp of the dSYM Info.plist for
precisely the same reason and since it is run *after* the
_GenerateDebugSymbols target, the 'touch' should generally not
be needed in the _GenerateDebugSymbols target.
2016-11-29 08:16:48 -05:00
Rolf Bjarne Kvinge c2dc129a7e [generator] Simplify a few command-line options to not use ifdefs. (#1257) 2016-11-29 12:40:48 +01:00
Sebastien Pouliot ef2f730b53 [foundation] Use a smart enum for NSStringTransform (#1255)
and reduce the amount of manual code required.
2016-11-28 17:16:32 -05:00
Alex Soto feac0d2315 [Foundation] Adds single object notifications to Notifications class (#1075)
Trello: https://trello.com/c/mKsUDti8

This adds a new overload to our Notifications class

Current:

public static NSObject ObserveDidStart (EventHandler<NSNotificationEventArgs> handler)

New overload:

public static NSObject ObserveDidStart (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)

This allows our users to have single object subscription to our
easy to find notifications.

Also this commit adds an Advice attribute encouraging to use the
Notifications class instead of the NSString based notifications
2016-11-28 10:19:21 -06:00
Rolf Bjarne Kvinge 1fa6bf0861 [generator] Rename 'buildNewStyle' to 'Unified', and don't make its use compile-time conditional. (#1253) 2016-11-28 16:18:11 +01:00
Chris Hamons 24e041068f Merge pull request #1232 from xamarin/xm_mmp_native_lib_crash
[XM] Fix crash in mmp when native reference path matches dllimport found
2016-11-28 08:54:30 -06:00
Sebastien Pouliot f647130061 [generator] Optimize smart enums support (#1249)
* Reduce the required metadata, i.e. from one field per constant to a
  single array of `IntPtr`;

* Don't store/create the `NSString` unless required, i.e. keep `IntPtr`
  for comparison (but still compare them as `NSString`, not pointers);

* Avoid `NSString ==` as it will do a null check for the first paramater
  everytime, and there's a (single) check already in place for this;

Size						before		after
---------------------------	--------		--------
Xamarin.iOS.dll (32bits)	12507136	12502528
Xamarin.iOS.dll (64bits)	12507648	12503040
Xamarin.TVOS.dll			 8819712	 	8815104
Xamarin.WatchOS.dll		 4781568	 4773888

Not a huge difference *yet* but we're only starting to use, and replace
manual code with, smart enums.
2016-11-28 08:32:15 -05:00
Rolf Bjarne Kvinge 45fd1c3bb0 [xharness] Fix listing modified files for pull requests. (#1252)
The previous method of getting the base and head sha from the pull request
doesn't work if the pull request has been rebased.

Example: https://github.com/xamarin/xamarin-macios/pull/1238

Resulted in this [1]:

    Fetching modified files for commit range cf07825667aa444c988c82b7e29cefc5f8ba7bcd..6aa2b9517ac35374dfa4ded41d1e2ff52778da07
    git diff-tree --no-commit-id --name-only -r cf07825667aa444c988c82b7e29cefc5f8ba7bcd..6aa2b9517ac35374dfa4ded41d1e2ff52778da07
    Found 20 modified file(s) in the pull request #1238.
        Makefile
        Versions-ios.plist.in
        Versions-mac.plist.in
        external/llvm
        external/mono
        msbuild/Xamarin.Mac.Tasks.Core/Tasks/MmpTaskBase.cs
        msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.props
        msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets
        msbuild/Xamarin.iOS.Tasks.Core/Tasks/MTouchTaskBase.cs
        msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.props
        msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets
        src/Makefile
        src/UIKit/UIScreen.cs
        src/appkit.cs
        src/generator-diff.mk
        tests/introspection/ApiTypoTest.cs
        tests/introspection/Mac/MacApiTypoTest.cs
        tests/introspection/Mac/introspection-mac.csproj
        tests/xharness/Harness.cs
        versions-check.csharp

which is listing way too many files.

[1]: https://jenkins.mono-project.com/job/xamarin-macios-pr-builder/2118/Test_Report/Harness.log
2016-11-28 13:44:12 +01:00
Marek Safar 16809581e9 Merge pull request #1250 from marek-safar/watch-fixes
Add missing watch drawing sources
2016-11-28 13:40:39 +01:00
Rolf Bjarne Kvinge 083f5ad850 [generator] Add a CurrentPlatform field to BindingTouch. (#1247)
This allows us to remove a few ifdefs, which is a required step
in order to create an ikvm-based generator.
2016-11-28 12:34:12 +01:00
Marek Safar df5e8d4c35 Add missing watch drawing sources 2016-11-28 11:11:31 +01:00
Alex Soto 0d966e8802 [CoreMedia] Fix a null check in CMBlockBuffer ReplaceDataBytes (#1231) 2016-11-27 16:38:21 -06:00
Sebastien Pouliot fb7cb19459 [avfoundation] Fix availability/visibility for AVAssetExportSessionPreset enum (#1248)
1. it's not available from watchOS

references (watchos.unclassified):
!unknown-field! AVAssetExportPreset1280x720 bound
!unknown-field! AVAssetExportPreset1920x1080 bound
!unknown-field! AVAssetExportPreset3840x2160 bound
!unknown-field! AVAssetExportPreset640x480 bound
!unknown-field! AVAssetExportPreset960x540 bound
!unknown-field! AVAssetExportPresetAppleM4A bound
!unknown-field! AVAssetExportPresetHighestQuality bound
!unknown-field! AVAssetExportPresetLowQuality bound
!unknown-field! AVAssetExportPresetMediumQuality bound
!unknown-field! AVAssetExportPresetPassthrough bound

2. AVAssetExportPreset3840x2160 was decorated with [Mac (10,10)] but
   inside a `#if !MONOMAC`

reference:
osx.unclassified:!missing-field! AVAssetExportPreset3840x2160 not bound
2016-11-27 09:37:26 -05:00
Sebastien Pouliot 44f14cf768 [generator] Support [Sealed] on types. Fixes #43995 (#1227)
* Add `sealed` on types decorated with `[Sealed]` as it's already a valid
  target for the attribute [1];

* Do not generated `protected .ctor (NSObjectFlag)` on sealed types;

* Do not generate virtual methods inside sealed types, which simplifies
  their implementation [2]

* Add [Sealed] for RPScreenRecorder (mentioned in bug report) under
  `XAMCORE_4_0`

[1] `AVPictureInPictureController` was already using `[Sealed]` even if
it was **not** supported so this has been moved under `XAMCORE_4_0`.

[2] Some of the advantages (reduced ize and registrar time) might not be
very visible as the linker/optimizer already does the same (in most cases)

References
* https://bugzilla.xamarin.com/show_bug.cgi?id=43995
2016-11-25 13:21:31 -05:00
Rolf Bjarne Kvinge 43e6f82803 [xharness] Look for mlaunch next to mtouch. (#1243) 2016-11-25 12:37:02 +01:00
Rolf Bjarne Kvinge 7535eae204 [xharness] Fix mlaunch download if extraction dir already exists. (#1241) 2016-11-25 11:27:08 +01:00
Christian Resma Helle cf07825667 Improve UIScreen Capture() support for complex views (#1235)
Use DrawViewHierarchy to capture a snapshot of the current screen
2016-11-24 16:30:33 +01:00
Vincent Dondain 8ea1509dec [msbuild] Add msbuild error code logic
- `LoggingExtensions` has a new `MTError` extension method that helps generate
  an msbuild error with the proper MTxxx format.
- Added error codes for 44 msbuild errors.
- Updated `docs/website/mtouch-errors.md` and `tools/mtouch/error.cs` accordingly.
- MT7001 contains some extra documentation (troubleshooting steps).
2016-11-24 15:24:30 +01:00
Rolf Bjarne Kvinge 77d4769f54 [xharness] Make sure DownloadMlaunch isn't run multiple times simultaneously. (#1236) 2016-11-24 15:12:51 +01:00
Chris Hamons ce464cacc3 [XM] Fix crash in mmp when native reference path matches dllimport found
- When native_libs.Add (nr, null) was hit above and then we later matched
 we would call methods.AddRange (kvp.Value) on an empty methods
2016-11-23 14:00:01 -06:00
Rolf Bjarne Kvinge 6d8421e966 Bump mono to get fix for #45140. (#1228)
https://bugzilla.xamarin.com/show_bug.cgi?id=45140
2016-11-23 16:31:10 +01:00
Zoltan Varga f0640443a9 Bump llvm to the tip of the 'master' branch. (#1225) 2016-11-23 07:30:31 -05:00
Rolf Bjarne Kvinge 30cf039f63 [src] Add makefile targets to calculate a diff of generated source code. (#1230) 2016-11-23 12:29:44 +01:00
Rolf Bjarne Kvinge 3a771eaf09 Add and ship file that lists the SDK versions XI/XM supports. (#1162)
* Add and ship file that lists the SDK versions XI supports.

Add and ship a file that lists the SDK versions of the various SDKs XI supports.

Also list the minimum SDK version for each extension.

And add a script that verifies that the current SDK version is in this file,
which should ensure every SDK version bump ends up in the file.

* [mtouch] Remove generated file from source control.

* [SdkVersions] Remove versions not in master yet.

* [SdkVersions] Improve detection script to verify that versions are between min and max, and that both min and max are in the list.

* Move things around a bit and add macOS support.

* Update Versions-mac.plist.in with extension info
2016-11-22 14:41:50 +01:00
Timothy Risi 23221f92f3 Fix test failure (#1223) 2016-11-21 16:38:01 -05:00
Timothy Risi 2dcace0c7a [Mac] Add ApiTypoTest (#1190) 2016-11-21 16:35:57 -05:00
Vincent Dondain 42775bac58 Update reference to maccore
Includes xamarin-analysis bump with rule XIA0003.
2016-11-21 16:14:09 +01:00
Rolf Bjarne Kvinge c00dbbb30c [runtime] Assert instead of exiting with a printf. (#1222)
Asserting produces a potentially useful crash report, while just exiting doesn't.
2016-11-21 14:39:16 +01:00
Rolf Bjarne Kvinge ea24c1d3b4 [runtime] Remove unused variable. (#1221) 2016-11-21 14:38:14 +01:00
Manuel de la Pena 576563fa0a Revert "[tests] Disable the docs tests until the documentation process is fixed. (#965)" (#1220)
Test have been fixed in
maccore/master/7284688c05cd1420274858a57b7c7616dfbe1d0b

This reverts commit 0a0503a6e9.
2016-11-21 13:09:54 +01:00
iain 94e47a09b4 [CoreMidi] Make FindByUniqueId public (#1218) 2016-11-21 10:30:56 +01:00
Rolf Bjarne Kvinge 657d603b03 [runtime] Fix signature for mono_thread_detach_if_exiting. (#1217) 2016-11-18 20:42:31 +01:00
Rolf Bjarne Kvinge 3cf0eb89d1 [builds] Rely on the mono repo automatically cloning the binaries for the offset tool. (#1215) 2016-11-18 12:32:51 +01:00
Rolf Bjarne Kvinge 3ac54f01a4 Bump mono to get fix for #45369. (#1212) 2016-11-18 10:17:10 +01:00
Rolf Bjarne Kvinge db00a33848 [xharness] Add support for [skip|run]-all-tests labels. (#1208) 2016-11-18 07:11:14 +01:00
Zoltan Varga 4c8898f3ee [mtouch] Convert .file directives containing backslashes correctly. Fixes #44733. (#1211) 2016-11-18 07:02:41 +01:00
Rolf Bjarne Kvinge fad320462c [apitest] Skip IKPictureTaker. Fixes #46624. (#1209)
https://bugzilla.xamarin.com/show_bug.cgi?id=46624
2016-11-17 19:23:13 +01:00
Rolf Bjarne Kvinge 077b0d3343 [tests] Update README. (#1207) 2016-11-17 14:18:39 +01:00
Rolf Bjarne Kvinge 66f82d1f94 [jenkins] Add support for enabling device builds using labels. (#1184)
* [jenkins] Add support for enabling device builds using labels.

* [xharness] Give the iOS MSBuild tests 30 minutes to finish.

* [mtouch tests] Give the BuildTestProject 10 minutes to compile each test case.

Wrench bots build the dontlink test in ~3m40, but that's apparently not enough
for the Jenkins bots (slower bots?), which time out the test after 5 minutes.

So double the timeout to 10 minutes, which will hopefully give the Jenkins
bots enough time to run the test to completion.
2016-11-17 10:22:26 +01:00
Rolf Bjarne Kvinge 89757e6f60 [xharness] Capture entire log files on wrench. (#1206) 2016-11-17 08:07:09 +01:00
Martin Baulig 80fb556c30 [AppleTls]: Fix AppleTlsContext.PeerDomainName and include it in MonoTlsConnectionInfo.PeerDomainName. (#1205)
SSLGetPeerDomainName() may sometimes include a trailing \0 character,
which we need to remove.

We now also set MonoTlsConnectionInfo.PeerDomainName.
2016-11-17 07:36:51 +01:00