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

2517 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge a10349e5be [generator] Don't cast the return value from AttributeManager.GetCustomAttributes. (#1813)
The IKVM version won't return an array of the exact attribute type, so casting doesn't work.

Use the generic version instead, which returns an array of the right type
directly, and works with both IKVM and Reflection.

Generator diff: https://gist.github.com/rolfbjarne/06c3ff20dc90631d345aeebd54790018 (all changes unrelated)
2017-03-02 14:59:42 +01:00
Rolf Bjarne Kvinge 5353607f53 [generator] Don't define 'GENERATOR', since IKVM sources use the same name (for something else). (#1811)
Generator diff: https://gist.github.com/rolfbjarne/fa9d91f13a6421135e089bed8e1ccefe
2017-03-02 07:13:10 +01:00
Rolf Bjarne Kvinge ae7fc187b0 Bump maccore to get improved mlaunch logging. (#1808)
Bump maccore to get improved logging to track down random launch failures for watchOS apps on wrench.
2017-03-01 16:40:31 +01:00
Jeffrey Stedfast 5ba38492d5 [msbuild] sanity check TargetiOSDevice property for conflicts (#1799)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52847

If the device archs do not match the configuration, don't
do a device-specific build.
2017-03-01 10:22:41 -05:00
Jeffrey Stedfast 1b2d24ed2c [msbuild] Remove an unused enum that causes confusion (#1798) 2017-03-01 10:21:52 -05:00
Rolf Bjarne Kvinge 0708ce5348 [generator] Add a TypeManager.GetUnderlyingNullableType to abstract away ikvm and reflection differences. (#1801)
Generator diff: https://gist.github.com/rolfbjarne/1ff230ac03cad6b81061c2814a5a895e
2017-03-01 14:59:52 +01:00
Rolf Bjarne Kvinge c93d1fb9e1 [generator] Don't use Type.GetType to look in all loaded assemblies, look directly in the right assembly. (#1805)
'Type.GetType' doesn't work the same with IKVM as with Reflection, so refactor
to code that works the same (and just as correctly) for both IKVM and
Reflection.

In particular there's no need to use 'Type.GetType' with an assembly qualified
typename when we already have the assembly we need to look in: just use the
type's FullName to look up the type in the assembly instead.

Generator diff: https://gist.github.com/rolfbjarne/a3da6c9df53383c4225483f89e16d156
2017-03-01 14:58:48 +01:00
Rolf Bjarne Kvinge c289744ac9 [generator] Use FieldInfo.GetRawConstantValue instead of FieldInfo.GetValue. (#1807)
IKVM doesn't have FieldInfo.GetValue, so switch to GetRawConstantValue instead.

Both API work the same way in the cases we use it, so there is no change in the generated code.

Generator diff: https://gist.github.com/rolfbjarne/0110ae637f24a171b1caa20d8220366a
2017-03-01 14:58:36 +01:00
Sebastien Pouliot 95005feaf7 [coregraphics] Add missing [Flags] on CGGradientDrawingOptions. Fixes #33997 (#1800)
reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=33997
2017-03-01 07:15:32 +01:00
Jeffrey Stedfast 297fcd8956 [msbuild] Make a build error more clearly worded (#1794)
Related to https://bugzilla.xamarin.com/show_bug.cgi?id=52847
2017-02-28 15:23:45 -05:00
Rolf Bjarne Kvinge eafae17d2d [generator] Use AttributeManager.HasAttribute instead of Attribute.IsDefined. (#1784)
Attribute.IsDefined doesn't work with IKVM.

Generator diff: https://gist.github.com/rolfbjarne/412bb9c0e6327887a8d71f8f79951e24
2017-02-28 20:25:14 +01:00
Rolf Bjarne Kvinge d196a78cda [registrar] Fix generic argument check to allow INativeObject. Fixes #52868. (#1788)
https://bugzilla.xamarin.com/show_bug.cgi?id=52868
2017-02-28 20:22:05 +01:00
Rolf Bjarne Kvinge 0889b0d200 Bump maccore to get fix for #52900. (#1789)
https://bugzilla.xamarin.com/show_bug.cgi?id=52900
2017-02-28 20:11:13 +01:00
Jeffrey Stedfast 254f336536 [msbuild] Index into the correct item array when printing an error message (#1792)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52860

When the ImageAssets contain an item that doesn't live within
a *.xcassets directory, index into ImageAssets[] rather than
items[] which hasn't been populated yet.

Also fixed the tagsList for-loop to use tagsList.Count instead
for correctness (even though tags.Count and tagsList.Count
should always be identical).
2017-02-28 13:34:32 -05:00
Rolf Bjarne Kvinge d5e8238822 [generator] Add a TypeManager.GetUnderlyingEnumType to abstract away ikvm and reflection differences. (#1786)
Generator diff: https://gist.github.com/rolfbjarne/94dbf673e284197845766cc698a64ff3
2017-02-28 17:24:10 +01:00
Rolf Bjarne Kvinge e35229f91b [generator] Use AttributeManager.GetReturnTypeCustomAttributes instead of MethodInfo.ReturnTypeCustomAttributes. (#1785)
MethodInfo.ReturnTypeCustomAttributes doesn't work with IKVM.

Generator diff: https://gist.github.com/rolfbjarne/de74565d3da7daa38af5baf500000cf3
2017-02-28 17:14:07 +01:00
Rolf Bjarne Kvinge 7a3d0737a0 [generator] Load the correct platform Xamarin.Mac platform assemblies. (#1787)
Generator diff: https://gist.github.com/rolfbjarne/41871e60066053e5d29b4ed1b1221117
2017-02-28 17:13:44 +01:00
Rolf Bjarne Kvinge c7a2639f0c [generator] Add a TypeManager.IsOutParameter method to abstract away ikvm and reflection differences. (#1783)
Generator diff: https://gist.github.com/9f1923146eb4a7eb456263290a8388bf
2017-02-28 16:10:38 +01:00
Rolf Bjarne Kvinge 59bd32d9ca [tests] Add test for MT0127. (#1781) 2017-02-28 16:08:58 +01:00
Rolf Bjarne Kvinge 73b3ac0ddc [doc] Document MT0127. (#1782) 2017-02-28 15:53:04 +01:00
Rolf Bjarne Kvinge c5bdb08a75 Bump maccore to get fix for #52717. (#1780)
https://bugzilla.xamarin.com/show_bug.cgi?id=52717
2017-02-28 15:40:49 +01:00
Rolf Bjarne Kvinge 2f879d46a1 Add an array of features to our Versions.plist. (#1775)
Add feature-list as a new feature to our new list of features.

https://trello.com/c/4pg3fuc8/676-move-away-from-version-check
2017-02-28 14:26:48 +01:00
Rolf Bjarne Kvinge 44cceb67bb [mtouch] Update error list. 2017-02-28 13:46:24 +01:00
Rolf Bjarne Kvinge 83d1111e10 [mtouch] Use fewer error numbers for code sharing failures. 2017-02-28 13:26:42 +01:00
Rolf Bjarne Kvinge 3f2915e595 [mtouch] Rephrase a few logging statements according to review. 2017-02-28 12:57:11 +01:00
Rolf Bjarne Kvinge 4de9a8c0d6 Merge remote-tracking branch 'origin/master' into framework-sdk 2017-02-28 10:16:18 +01:00
Jeffrey Stedfast f7d750309b [msbuild] Ignore .DS_Store files when cloning asset catalogs (#1776)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52851

The problem here is that the .DS_Store file was included in
the .csproj file but did not exist on disk, so when we went
to clone that file into the obj/ dir before running actool
on it, File.Copy() would fail because the file did not
actually exist.

Since these files are worthless anyway, we can safely ignore
them.

Also added logic to verify that files exist before copying
them in order to report a better error than an exception
stack trace.
2017-02-27 16:12:23 -05:00
Sebastien Pouliot 65f39da8e6 [foundation] Fix POST/PUT issues with NSUrlSessionHandler. Fixes #52682 (#1772)
The latest NSUrlSessionHandler implementation switched from loading the
request into memory (NSData) to loading it from a stream (NSInputStream).
The later is more efficient, at least for large POST'ed requests which
could, in theory, not even fit in memory.

Now using a stream means a different API is used. NSMutableUrlRequest
Body and BodyStream properties are exclusive but also a bit different as
the later won't set Content-Length [1] and switch to chunked encoding [2]

Even if the current code is compliant with HTTP/1.1 this breaks some
common POST/PUT usage that worked "as expected" in the previous (C8)
release.

To fix this we ask for the stream's length. We assume that if the length
is known then it's (likely) already (or fitting) in memory and use the
(old, in memory) Body property, which will set Content-Length.

If the length is unknown then we use the BodyStream approach so large
POST will continue to work (well over past/C8 limits).

Finally there might be case where developers will prefer to avoid the
extra memory (of `Body`) so a new property `MaxInputInMemory` is added
to set a maximum. It defaults to `Int64.MaxValue` so `Body` will be
used whenever possible. It can be set to `0` to get back the original C9
(always use a stream) behavior.

references:
[1] https://bugzilla.xamarin.com/show_bug.cgi?id=52682
[2] https://bugzilla.xamarin.com/show_bug.cgi?id=52711
[3] https://devforums.apple.com/message/919330#919330
2017-02-27 11:19:29 -05:00
Chris Hamons 38058debbe [xm] Update help text for AOT (#1767) 2017-02-27 08:39:12 -06:00
Sebastien Pouliot 55bd2b9f54 [uikit] Add == and != operators on UIEdgeInsets. Fixes #33504 (#1773)
https://bugzilla.xamarin.com/show_bug.cgi?id=33504
2017-02-27 08:50:31 -05:00
Sebastien Pouliot 63850b6c69 [build] Bump XI version to 10.9.x and XM to 3.3.x (#1770)
`15.1` has branched, time to bump again!
2017-02-24 23:37:04 -05:00
Chris Hamons bf47f0f1e2 Fixes for XM 4.5 and netstandard13 and updated comments (#1758)
- Update comments on XM45.targets file
- Remove unnecessary AssemblySearchPaths hack causing issues using nugets with same name as Facades
- Note: MSBuild with XM 4.5 is still broken for now
2017-02-24 17:45:38 -06:00
Rolf Bjarne Kvinge ee5cc41c54 [mtouch] Disable fastdev for projects with more than one binding library. Works around bug #52727. (#1765)
https://bugzilla.xamarin.com/show_bug.cgi?id=52727
2017-02-24 13:34:47 -05:00
Rolf Bjarne Kvinge 1821ff86f3 [tests][mtouch] Simplify code a bit. (#1763) 2017-02-24 14:59:46 +01:00
Sebastien Pouliot dfc6e7b73f [build] Bump maccore to pickup the revert on how we build mlaunch (#1762)
reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=52732
2017-02-23 23:13:47 -05:00
Timothy Risi 6ef756a063 Revert API breaking changes for non-XAMCORE_4_0 (#1747)
* Move NSTouch ctor to code-behind and obsolete

* Remove XAMCORE_4_0 check for NSTouch DisableDefaultCtor

* Add NSTouch.cs to frameworks.sources

* Skip NSSpellCheckerCanidates in typo test
2017-02-23 21:22:25 -05:00
Timothy Risi b5a72d7faa [Mac] Fix DefaultCtorAllowed test for NSKeyedArchiver (#1748) 2017-02-23 21:10:58 -05:00
Timothy Risi 8a6cfbe544 [appkit] Add helper properties for the NSPrintInfo PrintCore methods. Fixes #52501 (#1740)
* Add helper properties for the PrintCore methods that return the correct types instead of IntPtrs

* NSPrintInfo make bindings internal and change manual properties to getter methods

https://bugzilla.xamarin.com/show_bug.cgi?id=52501
2017-02-23 21:03:58 -05:00
Rolf Bjarne Kvinge 87b2e73248 Bump maccore to get fix for bug #51700. (#1756)
https://bugzilla.xamarin.com/show_bug.cgi?id=51700
2017-02-23 13:01:31 -05:00
Rolf Bjarne Kvinge ffc8dad1ec [tests][intro] Add mapping for SecAccessControl on macOS (#1754)
Wrench is not happy, but jenkins bots are fine. This is likely something
internal to macOS which varies per version.
2017-02-23 09:56:26 -05:00
Rolf Bjarne Kvinge 5482110b5f Fix a few culture-aware string comparisons to be culture-unaware. (#1753)
Generator diff for the generator changes: https://gist.github.com/rolfbjarne/ac7b166a308dc5b04bae29487114e9b8 (no relevant changes).
2017-02-23 09:56:14 -05:00
Rolf Bjarne Kvinge 2b4f30c40d Bump mono to get fix for #47343. (#1752)
https://bugzilla.xamarin.com/show_bug.cgi?id=47343
2017-02-23 09:56:00 -05:00
Sebastien Pouliot 797f417758 [build] Bump XI version to 10.7.x (#1750)
Cycle 9 (10.4) is now out and I'm fairly certain we'll see Xcode8.3 out
in March, so that will become 10.6 (once stable), making our `15.1`
target to be 10.8, again when stable.

XM is not affected as it gets the API updates on the next cycle/train.
2017-02-22 23:08:11 -05:00
Rolf Bjarne Kvinge 88c276e0aa [tests][generator] Port XI/Classic tests to XI/Unified. (#1745)
* [tests][generator] Port XI/Classic tests to XI/Unified.

* [tests][generator] Comment out code triggering previously unknown bugs.

These tests makes the generator fail:

    error BI0000: 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 Generator.GetSetterExportAttribute (System.Reflection.PropertyInfo pinfo) [0x0002e] in /work/maccore/master/xamarin-macios/src/generator.cs:1981
      at Generator.Go () [0x007e3] in /work/maccore/master/xamarin-macios/src/generator.cs:2162
      at BindingTouch.Main2 (System.String[] args) [0x010b2] in /work/maccore/master/xamarin-macios/src/btouch.cs:435
      at BindingTouch.Main (System.String[] args) [0x0001d] in /work/maccore/master/xamarin-macios/src/btouch.cs:77
      at System.Environment.get_StackTrace () [0x00000] in /work/maccore/master/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System/Environment.cs:321
      at ErrorHelper.ShowInternal (System.Exception e) [0x000dc] in /work/maccore/master/xamarin-macios/src/error.cs:200
      at ErrorHelper.Show (System.Exception e) [0x00027] in /work/maccore/master/xamarin-macios/src/error.cs:151
      at BindingTouch.Main (System.String[] args) [0x0002b] in /work/maccore/master/xamarin-macios/src/btouch.cs:79

This has been filed as https://bugzilla.xamarin.com/show_bug.cgi?id=52664.

* [tests][generator] Comment out code triggering previously unknown bugs.

This has been filed as https://bugzilla.xamarin.com/show_bug.cgi?id=52665.
2017-02-22 16:47:11 +01:00
Alan McGovern 0963ba1e75 [XM] Add the option to ignore missing files during registration (#1709)
Not all assemblies referenced at compile time are necessary
at runtime. Allow XamMac to ignore missing assemblies just
like iOS does.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=51746
2017-02-22 09:18:22 -06:00
Rolf Bjarne Kvinge af667d1665 [generator] Properly determine if selectors are inlined. Fixes #52646. (#1744)
Properly determine if selectors are inlined by not deciding anything until we
have the information required to make a correct decision. Since we're now
determining the target platform using the command-line argument, we can't use
the corresponding variables until after the command-line arguments have been
parsed.

This fixes several generator tests when those tests are built using XI/Unified
(so new new tests are needed for this).

https://bugzilla.xamarin.com/show_bug.cgi?id=52646
2017-02-22 14:57:35 +01:00
Rolf Bjarne Kvinge 467cedc47c [generator] Don't generate calls to internal methods. (#1742)
Don't generate calls to [UIApplication|NSApplication].[EnsureEventAndDelegateA
reNotMismatched|EnsureDelegateAssignIsNotOverwritingInternalDelegate] from
third-party binding code, since those methods are internal.

This fixes the bug24078-ignore-methods-events test when run using XI/Unified.
2017-02-22 14:23:56 +01:00
Rolf Bjarne Kvinge 00874dc1e7 [tests][generator] 'virtualwrap' is a custom test, so put it in the corresponding variable. (#1743)
Fixes this warning:

    Makefile:163: warning: overriding commands for target `virtualwrap'
    Makefile:40: warning: ignoring old commands for target `virtualwrap'
2017-02-22 14:23:45 +01:00
Sebastien Pouliot ba623e8efa [apidiff] Update XML references to C9 (#1738) 2017-02-21 18:42:29 -05:00
Rolf Bjarne Kvinge 87de3d0e23 [generator] Don't specify platform-specific conditional compilation symbols. (#1735)
All the platform-specific conditional compilation symbols are unusued, so we
don't need to define them anymore.

Generator diff: https://gist.github.com/rolfbjarne/865b4ed20648614ceff04a870a3d0786
2017-02-21 15:54:26 -05:00