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

3773 Коммитов

Автор SHA1 Сообщение Дата
Alex Soto f8d7c54a0f [generator] Disallow the use of [Async] when the signature contains ref/out parameters, fixes bug 58792. (#3059)
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.
2017-12-18 09:21:23 -05:00
Jeffrey Stedfast ddf9d63078 bumped Xamarin.MacDev to fix bug #60377 (#3094) 2017-12-15 17:48:37 -05:00
Sebastien Pouliot 8d854a0f3d
[xtro] Split results by framework and add an HTML report (#3093)
* 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.
2017-12-15 14:08:09 -05:00
Manuel de la Pena cb688be5c4
[CoreAnimation] Ensure that we increase the handle refenrece count in MakeMutable. Fixes #3089 (#3099)
* [CoreAnimation] Ensure that we increate the handle referene in MakeMutable. Fixes 3089

Fixes https://github.com/xamarin/xamarin-macios/issues/3089
2017-12-15 16:13:42 +01:00
Emanuel Fernandez Dell'Oca 53f260166d Bumps maccore to get Xamarin Analysis fix for XVS (#3105)
Gets the latest version of Xamarin Analysis that includes a fix to copy the Xamarin.iOS.Analysis.targets file to the build output directory
2017-12-14 20:03:59 -05:00
Emanuel c84f0dac3d [msbuild] Fixes MoveTaskBase inclusion
MoveTaskBase inherits from Microsoft.Build.Tasks.Move, and Mono has a different implementation of it, so when building from a Mac we need to include XBuildMoveTaskBase.cs instead. The previous condition does no apply any more, because we're now using MSBuild to build, but the Move task implementation didn't change so it doesn't matter if we're using Xbuild or MSBuild.

This issue is preventing us (XVS) from merging features to our master branch
2017-12-14 19:37:15 -03:00
Chris Hamons b357bb4e1e [macos] NSView.LocationInView should accept null (#3103)
- https://bugzilla.xamarin.com/show_bug.cgi?id=61101
2017-12-14 15:57:07 -05:00
Emanuel 4526a3cf74 Bump maccore to get fix for package step issue 2017-12-14 15:23:37 -03:00
Sebastien Pouliot d414072b74
Update API diff references with xcode92 data (#3097) 2017-12-14 11:48:19 -05:00
Sebastien Pouliot bb330468ec
Bump maccore and guiunit to HEAD (#3098)
There's a separate PR for mono
https://github.com/xamarin/xamarin-macios/pull/3082
2017-12-14 09:48:37 -05:00
Emanuel Fernandez Dell'Oca 37683f771e [xvs] Bump maccore to get msbuild.zip changes (#3095)
We need xamarin/maccore@f819228 because it changes the msbuild.zip to include Xamarin Analysis targets and binaries.
2017-12-13 10:53:52 -05:00
Vincent Dondain 808c67017d
[msbuild] Add support for optionally explaining why inapplicable certificates are not applicable (#3085)
Help fix #58251: When looking for valid signing certificates, print out each invalid certificate and state why it's not valid
(https://bugzilla.xamarin.com/show_bug.cgi?id=58251)
2017-12-12 14:25:04 -05:00
Jeffrey Stedfast b52a38bd33
[msbuild] Catch json parser exceptions to provide better error reporting (#2992)
* [msbuild] Catch json parser exceptions to provide better error reporting

This is in response to https://bugzilla.xamarin.com/show_bug.cgi?id=60536

* Added unit test
2017-12-12 13:54:09 -05:00
Vincent Dondain 79e1d3613e
[xamarin-analysis] Add rule #6 and updated md file (#3088)
- Add XIA0006: HttpClientAvoidManaged.
- Add documentation on how the rules work and how to activate them.
  Also mention that they need to be ran on each active configuration.
- Bump maccore to include XIA 0006.
2017-12-12 12:43:36 -05:00
Vincent Dondain 8899158260
[arkit] Fix 'Vertices', 'TextureCoordinates' and 'TriangleIndices' in 'ARFaceGeometry' (#3090)
- Fixes bug #61056: [ARKit] TriangleIndices, Vertices and TextureCoordinates should be respectively short [], Vector3 [] and Vector2 []
(https://bugzilla.xamarin.com/show_bug.cgi?id=61056)
- Obsolete `short TriangleIndices`.
- Obsolete `Vector3 Vertices`.
- Obsolete `Vector2 TextureCoordinates`.
- Introduced new `short [] GetTriangleIndices ()`.
- Introduced new `Vector3 [] GetVertices ()`.
- Introduced new `Vector2 [] GetTextureCoordinates ()`.
2017-12-12 12:33:48 -05:00
Manuel de la Pena 1e777cdfca
[Tools] Reduce the verbosity of install sources which is in debugging mode. (#3092) 2017-12-12 12:30:34 +01:00
Sebastien Pouliot c32474b7e9
Merge pull request #3086 from VincentDondain/xcode9.2-merge
Xcode 9.2 merge
2017-12-07 08:51:07 -05:00
Vincent Dondain 18378d752e Fix merge mistake in monotouch-test.csproj 2017-12-06 15:18:11 -05:00
Chris Hamons c85c1a1b11 Add initial github issue template (#3080)
* Add initial github issue template

* Update template to not suggest pasting huge build logs inline

* Update template

* Update template some more
2017-12-06 15:03:12 -05:00
Vincent Dondain d7b7a6ea02 Merge branch 'xcode9.2' 2017-12-06 14:41:13 -05:00
Vincent Dondain 479733c386 [Make.config] Add TODO for PACKAGE_VERSION_REV (#3083)
In my bump to Xcode 9.2 final: https://github.com/xamarin/xamarin-macios/pull/3081 I updated the `IOS_PACKAGE_VERSION`'s minor # (for the release) but forgot to update `PACKAGE_VERSION_REV` (genuinely didn't know about it).

In retrospect, I should have read the bloc of text a couple lines above that says: "A release branch requires updating". Therefore in a desperate attempt to avoid that future me missing this I added a `/!\ README /!\`. I also updated the comment above `PACKAGE_VERSION_REV` to better highlight the importance of resetting to 0 and a TODO to, again, help future me see this (:
2017-12-06 09:36:08 -05:00
Vincent Dondain 565d710f4f
[msbuild] Don't run Xamarin.Analysis on library projects (#3084)
Avoid bug #59697: iOS Library projects fail CompileEntitlements when Analysis is enabled
(https://bugzilla.xamarin.com/show_bug.cgi?id=59697)

Note: bug #59697 happens because XIA0002_TestCloudAgentReleaseRule depends on `_CompileToNative` which
depends on `CompileEntitlements` which then requires the `AppBundleDir` parameter that isn't provided
for library project.

If we ever decide to enable Xamarin.Analysis on library projects we'll have to run a subset of the rules that
doesn't include rules like XIA0002 using the same condition this fix is using.
2017-12-05 16:35:29 -05:00
Manuel de la Pena 8ed3f85c07
[Debugger] Allow to step into Xamarin code. (#1663)
* [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.
2017-12-05 14:13:59 +01:00
Sebastien Pouliot 6857dfccf2
Merge pull request #3081 from VincentDondain/storekit-xc92-final
Bump to xcode 9.2 final
2017-12-04 19:48:44 -05:00
Vincent Dondain 9568331b34 [storekit] Update for Xcode 9.2 final 2017-12-04 17:13:27 -05:00
Vincent Dondain dfd10bd5b7 Bump xcode to 9.2 final 2017-12-04 17:13:27 -05:00
Chris Hamons db5a49050a
[macOS] NSGestureRecognizer.State should be get/set like UIKit's (#3074)
- https://bugzilla.xamarin.com/show_bug.cgi?id=60935
- This allows subclassing to work
- Add advice for NSGestureRecognizer/UIGestureRecognizer to match header file note
2017-12-04 09:44:47 -06:00
Chris Hamons 4c966e3e71 Fix macOS 10.13 test failures (#3066) 2017-12-03 19:45:28 -05:00
Rolf Bjarne Kvinge 9a5d952678
[xtro] Fix broken build with Mono.Cecil 0.9.6.4. (#3076)
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.
2017-12-01 19:31:46 +01:00
Rolf Bjarne Kvinge 113e518d9d
[monotouch-test] Update permission checks. (#3071)
Apparently iOS 11 shows system dialogs for more API, so sprinkle permission
checks in more places.
2017-12-01 17:46:47 +01:00
Manuel de la Pena 6135a6c4d8
[MSBuild] Do not set CFBundleDevelopmentRegion if not present. (#2779)
* [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.
2017-12-01 16:52:25 +01:00
Rolf Bjarne Kvinge dd95d17b5f
[generator] Properly set the IsDirectBinding value. (#3063)
* [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.
2017-12-01 15:18:20 +01:00
Rolf Bjarne Kvinge 616c0638be
[xtro] Update csproj to Xcode 9.1 (#3075) 2017-12-01 15:05:09 +01:00
Chris Hamons b87b3ba878
Fix test failures on 10.13 (#3065) (#3072) 2017-12-01 06:40:56 -06:00
Chris Hamons 31742eb3fb
Fix test failures on 10.13 (#3065) 2017-11-30 12:55:58 -06:00
Rolf Bjarne Kvinge 10c5bc10a9
[monotouch-test] Update permission checks. (#3067)
Apparently iOS 11 shows system dialogs for more API, so sprinkle permission
checks in more places.
2017-11-30 17:54:02 +01:00
Rolf Bjarne Kvinge f0660ec1f8
[linker] Remove Classic-only optimization since XI/Classic is dead. (#3070) 2017-11-30 17:52:57 +01:00
Rolf Bjarne Kvinge f04bfa1f9f
[linker] Fix typo in comment. (#3069) 2017-11-30 17:52:20 +01:00
Jeffrey Stedfast a3692f4314 [msbuild] Codesign iOS Simulator builds using the '-' key. Fixes #59379 (#3060)
When codesigning iOS Simulator builds, it is important to note
that the codesign command itself cannot include the entitlements,
but the mtouch command *MUST* embed the entitlements using
-Xlinker.

https://bugzilla.xamarin.com/show_bug.cgi?id=59379
2017-11-29 15:26:29 -05:00
Sebastien Pouliot 2bfbc8a834
[tests] Fix mac-apitest on High-Sierra (#3064)
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
2017-11-29 14:16:27 -05:00
Rolf Bjarne Kvinge 7fd2b67759
[xharness] Make it possible to select from the command line whether tests requiring system permissions should be executed or not. (#3053) (#3062) 2017-11-29 15:57:15 +01:00
Jeffrey Stedfast 5645e3349a Revert "[msbuild] Repack all iOS Task assemblies into Xamarin.iOS.Tasks.dll (#3007)"
This reverts commit 2d4256ef15.
2017-11-29 09:22:22 -05:00
Sebastien Pouliot e4cbbda64f
[tests] Disable CoreText/FontDescriptorTest on tvOS. Fixes #58929 (#3061)
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
2017-11-29 09:10:25 -05:00
Alex Soto 74d2dcadfb
[tests] Fix introspection tests for macOS (#3054)
* [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
2017-11-28 17:27:20 -06:00
Rolf Bjarne Kvinge f21f48b727 [tests] Enable xammac-tests on wrench. (#3056)
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.
2017-11-28 16:10:56 -05:00
Timothy Risi 87f9e23989 [MetalPerformanceShaders] Xcode 9 bindings (#3005)
* [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
2017-11-28 14:29:05 -06:00
Rolf Bjarne Kvinge 79f193709b
[xharness] Make it possible to select from the command line whether tests requiring system permissions should be executed or not. (#3053) 2017-11-28 19:16:46 +01:00
Jeffrey Stedfast 52912ee347 [msbuild] fixup 2017-11-28 11:25:17 -05:00
Jeffrey Stedfast d67cf5b59c [msbuild] Fixed CoreMLCompilerTaskBase 2017-11-28 11:22:17 -05:00
Jeffrey Stedfast 06227e9467 Fixed the build after a bad merge 2017-11-28 11:20:05 -05:00