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

2769 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 8b37b09ac6 [msbuild][mac] Fix #58479: Assign project configurations for IDE case (#2396) (#2413)
https://bugzilla.xamarin.com/show_bug.cgi?id=58479

_AssignAppExtensionConfiguration assigns project configuration from
`$(CurrentSolutionConfigurationContents)`, using the
`AssignProjectConfiguration` task, which is set if
`$(BuildingSolutionFile)` or `$(BuildingVisualStudio)` is true. We check
only for the former. It would be simpler to just check for ..

	`$(CurrentSolutionConfigurationContents) != ''`

.. like the iOS targets. This mapping from this task is used when
invoking `GetBundleTargetPath` on the extension project:

	Properties="%(_AppExtensionReferenceWithConfigurationExistent.SetConfiguration); %(_AppExtensionReferenceWithConfigurationExistent.SetPlatform)"

Details:

This failed for a project that had a reference to an app extension
project, with VSMac/msbuild. The app extension project was being built
with `Configuration==Debug` and `Platform==x86` for which the project
does not define any properties (like `$(OutputPath)`).

When the main project is built, we invoke `GetBundleTargetPath` on
the extension project, which in this case, has a different
config+platform mapping than the one for the referencing project. But
since the earlier `AssignProjectConfiguration` was skipped due to the
incorrect condition, `GetBundleTargetPath` is invoked with no
config+platform, thus falling back to extension project's defaults.

Note: The referencing project was being built with Debug|x86 and the
referenced project was expected to be built with Debug|AnyCPU .

This project:

- VSMac/xbuild - Works
	- This happens to work because the default from the extension
	  project is Debug|AnyCPU, so even though
	  `AssignProjectConfiguration` didn't set those properties, it
	  builds just fine.

- command line xbuild/msbuild - works!
	- `AssignProjectConfiguration` works because this time the
	  condition `$(BuildingSolutionFile) == 'true'` is True.

- VSMac/msbuild - fails
	- In this case, the default case does not work because in VSMac,
	  we use `SetGlobalProperty` to set config+platform properties
	  when starting the build for the referencing project.

	- And when the referencing project builds the referenced project
	  (via `GetBundleTargetPath`), it is built with config+platform
	  global properties set, and thus defaults from the referenced
	  don't get picked up!

	  	<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

	- With the `AssignProjectConfiguration` fix, we set the
	  properties via the `MSBuild` task, so it works.
	  But this needs to be fixed in VSMac anyway.
2017-08-03 16:04:44 -05:00
Rolf Bjarne Kvinge 75155be059 [msbuild] Strip frameworks better. (#2305) (#2400)
This can save a significant amount of space when using code-sharing: the PIX
app saved ~11mb in release mode (when stripping).

`man strip` says:

```
For dynamic shared libraries, the maximum level of stripping is usually -x (to remove all non-global symbols).

-x Remove all local symbols (saving only global symbols).
```
2017-08-02 16:06:49 +02:00
Rolf Bjarne Kvinge e2cdf61897 [runtime] Parameters passed on the stack use at least 8 bytes on x86-64. Fixes #58367. (#2399)
* [runtime] Make debug spew compile.

* [tests] Add test case for bug #58367.

https://bugzilla.xamarin.com/show_bug.cgi?id=58367

* [runtime] Parameters passed on the stack use at least 8 bytes on x86-64. Fixes #58367.

https://bugzilla.xamarin.com/show_bug.cgi?id=58367
2017-08-02 13:59:05 +02:00
Rolf Bjarne Kvinge 82d36436b0 Bump llvm. Fixes #58264. (#2391) (#2392)
https://bugzilla.xamarin.com/show_bug.cgi?id=58264
2017-08-02 08:54:16 +02:00
Rolf Bjarne Kvinge 2d9f43194f Bump mono to get fix for #58446. (#2390) (#2395)
https://bugzilla.xamarin.com/show_bug.cgi?id=58446
2017-08-01 16:50:06 -04:00
Sebastien Pouliot 7c3c8741ed [mmp] Track all sub-frameworks of ApplicationServices and CoreServices. Fixes #58415 (#2381) (#2384)
The existing custom list does not cover the needs of user code,
e.g. a reference to LaunchServices did not bring CoreServices

https://bugzilla.xamarin.com/show_bug.cgi?id=58415
2017-07-31 14:36:52 -04:00
Sebastien Pouliot c70e3b572c [mono] Bump to fix #57919 - dynamic object is not supported (#2369) (#2372)
https://bugzilla.xamarin.com/show_bug.cgi?id=57919
2017-07-26 13:55:44 -04:00
Rolf Bjarne Kvinge 80f17b0b2c Bump mono to get fixes for #57062 and #58114. (#2341) (#2346)
https://bugzilla.xamarin.com/show_bug.cgi?id=58114
https://bugzilla.xamarin.com/show_bug.cgi?id=57062
2017-07-19 08:28:26 -04:00
Rolf Bjarne Kvinge b9d30a2da3 [mtouch] Fix collecting required internal symbols which aren't in the objc_msgSend family. (#2330) (#2338)
Fix collecting required internal symbols which aren't in the objc_msgSend
family by not bailing out early for a function which isn't in the objc_msgSend
family.

Also add a test.
2017-07-18 11:43:22 -04:00
Sebastien Pouliot 0723601b2b [mono] Bump to get fix for 56452 (#2335) (#2339)
Problem Stack too big
https://bugzilla.xamarin.com/show_bug.cgi?id=56452
2017-07-18 11:40:08 -04:00
Matt Sylvia 38d3a2bfc5 Branching for d15-4 2017-07-07 14:51:39 -04:00
Rolf Bjarne Kvinge 348df7d196 [docs] Add missing entry about MT2090 errors. (#2297) 2017-07-07 17:17:39 +02:00
Matt Sylvia f30f76a523 Automated bumping to align hashes. 2017-07-06 23:31:14 -04:00
Rolf Bjarne Kvinge f5956d6cc1 [generator] Print nicer type names. (#2296)
Diff: https://gist.github.com/rolfbjarne/11f60b56f72a5f6093674ae4b7c3e6d2
2017-07-06 20:30:03 +02:00
Rolf Bjarne Kvinge cd59295f04 [src] Fix infinite recursion in make. (#2298)
For some reason the target to build OpenTK.dll.config may cause an infinite
recursion in make.

I don't understand what's happening, but we don't need OpenTK.dll.config
anymore, so just not produce/ship it anymore.
2017-07-06 13:54:58 +02:00
Rolf Bjarne Kvinge a9a68249c3 Bump mono to get fix for bug #57780. (#2293)
https://bugzilla.xamarin.com/show_bug.cgi?id=57780
2017-07-05 14:27:34 +02:00
Rolf Bjarne Kvinge fbf5d33353 [xharness] Print something every 10 minutes to not look like we're stuck. (#2289) 2017-07-04 17:57:47 +02:00
Rolf Bjarne Kvinge 492d1c9c2f [ObjCRuntime] Remove Class.RegisterMethods, it's XI/Classic only, which is dead. (#2286)
This allows us to remove a bunch of other code, which was useless and not
needed anymore, but still executed.
2017-07-04 07:29:36 +02:00
Rolf Bjarne Kvinge f610917d4e [generator] Exclude pdb files from the diff. (#2287) 2017-07-04 07:29:17 +02:00
Rolf Bjarne Kvinge 6ce702798f [generator] Fix a few BindAs typos. (#2284)
Generator diff (no change): https://gist.github.com/rolfbjarne/02444b88124a0fda857f10745f6ffc40
2017-07-03 18:19:32 +02:00
Jeffrey Stedfast 6351aef095 [msbuild] Don't define __IOS__ for tvOS binding projects (#2274)
* [msbuild] Don't define __IOS__ for tvOS binding projects

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57764

* minor fixups

* Conditional compilation.
2017-06-30 12:35:48 -04:00
Andy Martin 340963fd96 [uikit] renamed tableview to tableView to follow naming convention (#2247)
* renamed tableview to tableView to follow naming convention

* added requested changes from dalexsoto
2017-06-28 20:15:08 -04:00
Rolf Bjarne Kvinge 2448108976 [monotouch-test] Allow more values for MACaptionAppearanceGetDisplayType.
On at least one of my devices I get MACaptionAppearanceDisplayType.AlwaysOn,
while the locale is 'en'.

So just allow all valid enum values for the return type.
2017-06-28 12:31:25 -05:00
Rolf Bjarne Kvinge 22a01fd6f8 [mtouch] Check for __Internal P/Invokes after processing P/Invokes for exception marshaling. Fixes #57833. (#2261)
When we process P/Invokes to add support for exception marshaling, we may
change P/Invokes to be __Internal. This means that we need to move the check
for __Internal P/Invokes to after processing P/Invokes for exception
marshaling.

https://bugzilla.xamarin.com/show_bug.cgi?id=57833
2017-06-28 17:09:15 +02:00
Rolf Bjarne Kvinge 2fa55d410d [mtouch] If a P/Invoke is used by any assembly that looks up the native symbol using dlsym, it's a required symbol. Fixes #57826. (#2260)
Previously the assumption was that if an assembly not using dlsym references a
native symbol, it's not a required symbol. This is true as far as the native
linker goes: the native linker will see that the native symbol is referenced
by the AOT-compiled code, and it won't be removed.

However, we use also this exact logic to create the list of functions we ask
the native strip command to preserve, and in this case we need to include all
symbols needed in all assemblies that looks up native functions using dlsym.

https://bugzilla.xamarin.com/show_bug.cgi?id=57826
2017-06-28 16:26:26 +02:00
Rolf Bjarne Kvinge 1d7d414795 [common] Fix StringUtils.Quote to quote backslashes too. Fixes #57768. (#2248)
Some Quote implementations quoted backslashes, some didn't. When selecting a
common implementation, one of the implementations that didn't quote
backslashes won, and the rest were forgotten. Almost. Except for the MT0106
test, which started failing, thus exposing the winner's deficiencies.

So dethrone the implementation that won and reinstante the importance of the
backslash.

https://bugzilla.xamarin.com/show_bug.cgi?id=57768
2017-06-28 14:45:53 +02:00
Rolf Bjarne Kvinge b4d695a4fa [monotouch-test] Make sure we don't strip symbols in any configuration. Fixes #57811. (#2259)
https://bugzilla.xamarin.com/show_bug.cgi?id=57811
2017-06-28 14:34:26 +02:00
Bernhard Urban 15c9275b43 [runtime] set mono_set_crash_chaining (#2184)
it was introduced a while ago for Xamarin-Android:

8ffc4070a9

8d7cc2b800/src/monodroid/jni/monodroid-glue.c (L2840)

it potentially helps to get even better crash reports.
2017-06-27 17:40:30 -04:00
Alex Soto 8c55dd888a Complete support for [BindAs] (#2220)
* [registrar] BindAs uses Nullable types so allow them to be registered as NSObjects

BindAsAttribute allows to bind NSValue and NSNumber into more
accurate C# types lyke bool?, int? etc. so we must teach registrar
about this.

* [tests][introspection] Teach intro about BindAs and Nullable types

Introspection will currently fail if BindAs is used, introspection
will report that the incorrect type is registered so we need to skip
this check if Nullable type is found in the signature

* [introspection] Add better type checking instead of totally skipping the type when Nullable type is encountered

Introspection will currently fail if BindAs is used. Introspection
will report that the incorrect type is registered so we need verify
if a Nullable type is found in the signature and check against of
a withelist of BindAs supported types

* Revert "[registrar] BindAs uses Nullable types so allow them to be registered as NSObjects"

This reverts commit 911eab97b7.

* [tests] Add comment about where to find BindAs types
2017-06-26 10:56:10 -05:00
Alex Soto aa4797decd [tests] Fix bug 57699 - [iOS]InternalsTest failure (Linkall) tests on device (#2243)
Strip native debugging symbols should not be checked for debug builds
2017-06-22 17:04:40 -05:00
James Clancey e7a5dd2af1 MPNowPlayingInfo is available on iOS,MacOS, and TvOS (#2178)
* Added MPNowPlaying info to MacOS/TvOS
2017-06-22 09:33:09 -04:00
Rolf Bjarne Kvinge 1a2633ca1e [runtime] Fix random parallel build error. (#2237)
Very occasionally this may happen:

    /bin/sh: /Users/builder/data/lanes/5024/08614af6/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/Frameworks/Xamarin-debug.framework/Info.plist: No such file or directory
    make[4]: *** [/Users/builder/data/lanes/5024/08614af6/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/Frameworks/Xamarin-debug.framework/Info.plist] Error 1

which is fixed by using the right dependencies for the Info.plist target.
2017-06-21 16:37:48 +02:00
Rolf Bjarne Kvinge fe217e641c [generator] Fix c&p error in type mapping for CMTimeMapping. (#2238) 2017-06-21 16:36:45 +02:00
Nick Berardi 22b3dadb5a NSActivityOptions.IdleDisplaySleepDisabled had wrong value (#2232)
This was due to an integer overflow.  The original value was based on Int32
1 << 40 == 256

The correct value should be based on a UInt64.
1UL << 40 == 1099511627776
2017-06-21 09:10:21 +02:00
Rolf Bjarne Kvinge 0a316951a3 Bump mono to get cecil fix for bug #56808. (#2221)
https://bugzilla.xamarin.com/show_bug.cgi?id=56808
2017-06-16 09:57:57 +02:00
Jeffrey Stedfast 5d6d244d04 [msbuild] Properly generate dSYMs for WatchKit2 appex's (#2215)
* [msbuild] Properly generate dSYMs for WatchKit2 appex's

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=56345

* dSYMs only get generated for iPhone

* Reverted accidental change to mono
2017-06-15 14:03:37 -04:00
Rolf Bjarne Kvinge 257de9c2c0 [mtouch] Normalize strings that refer to assemblies and their paths before comparing them. Fixes #57266. (#2217)
HFS normalizes filenames to Form D when files are stored. This means that an
assembly whose assembly name is stored in Form C might be stored in a file
whose filename is Form D (which you'll get if you use the Form C filename).

However, this is a problem when we've already loaded an assembly and if we
doesn't take normalization into account: we check the cache based on the
filename, but store in the cache based on the assembly name. If those two uses
different normalization schemes, bad things (bug #57266) happen.

So in these scenarios normalize strings before comparing them.

https://bugzilla.xamarin.com/show_bug.cgi?id=57266
2017-06-15 11:24:31 +02:00
Timothy Risi 43f5679323 [macos] Mmp should quote paths when passing arguments to clang. Fixes #56850 (#2140)
* [macos] Mmp should quote paths when passing arguments to clang.  Fixes #56850

* Use the merged Quote from stringutils

* Fix driver also

* Fix tests
2017-06-15 11:15:59 +02:00
Chris Hamons 9accdb3888 Framework tests were still binding non-linked Simple class which errors now (#2216)
- Improve Makefile to rebuild when projects build with errors
2017-06-14 08:33:18 -05:00
Jeffrey Stedfast f010926615 [msbuild] Use @(ReferencePath) instead of @(ResolvedFiles) (#2188)
This allows things to work on both xbuild and msbuild.

In xbuild, both lists are exactly the same and on msbuild,
only @(ReferencePath) exists.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55147
2017-06-12 13:29:45 -05:00
Rolf Bjarne Kvinge 10fafc184f [monotouch-test] Adjust the ObjCRuntime.ExceptionsTest to work when a debugger is attached. (#2197) 2017-06-09 23:21:31 -07:00
Alex Soto 0770e24c75 [test][introspection] Enable MtouchNoSymbolStrip for device builds in order to avoid linking symbols meeded by test (#2196)
Rolf Kvinge [8:59 AM]
@dalexsoto the fix is to not strip the executable please PR that
(it should probably go into master as well). This probably started
happening when Jeff implemented support for stripping debug builds
(previously the setting was ignored)
2017-06-09 14:48:31 -07:00
Jeffrey Stedfast 2f4e81809c [msbuild] Re-added wildcard (*) expandsion for application-identifier… (#2182)
* [msbuild] Re-added wildcard (*) expandsion for application-identifier in Entitlements.plist

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57119

* Fixed unit tests
2017-06-08 14:01:22 -04:00
Timothy Risi 25468bf617 Merge Quote methods into a single class instead of multiple versions (#2153) 2017-06-06 12:32:25 -08:00
Andy Martin ba8eabcc9f bumped the max version of visual studio for mac (#2173)
* bumped the max version of visual studio for mac

* changed max visual studio version to 7.1.99
2017-06-05 19:49:04 -04:00
Miguel de Icaza 542642b916 [AppKit] NullAllowed on NSFontDescriptor ctor 2017-06-05 17:20:55 -04:00
Rolf Bjarne Kvinge c8bd5e3cff [Foundation] Set 'sentRequest' when sending a request in NSUrlSessionHandler. (#1806)
* [Foundation] Set 'sentRequest' when sending a request in NSUrlSessionHandler.

Fixes this compiler warning:

> [..]/external/mono/mcs/class/System.Net.Http/HttpClientEx.cs(50,8): warning CS0649: Field `Foundation.NSUrlSessionHandler.sentRequest' is never assigned to, and will always have its default value `false'

However it changes the runtime behavior, and we'll now throw an exception in
cases that we accepted before:

* `sentRequest` is only read in `EnsureModifiability ()`, which throws an
  exception if `sentRequest` is true.
* Previously `sentRequest` was never set (thus the compiler warning), which
  meant `EnsureModifiability` would never throw an exception.
* Looking at the similar `CFNetworkHandler` (which has the identical field and
  methods), it seems that the intended behavior is to set `sentRequest` in
  `SendAsync`, and then `EnsureModifiability` is called whenever a property is
  set to ensure the property isn't set too late (and any change would be
  ignored because the request was already sent).
* This means that previously setting any property after the request was sent
  would not throw any exceptions (even though the change would be ignored),
  while with this change we'd start throwing exceptions.

* Add missing tests for the setRequest var.

* Redesign tests to make sure that all handlers run the same code.

* Fix failing test.

* Add the managed handler to the HttpClient tests.

* Fix minor style issues.
2017-06-05 09:21:28 -04:00
Andy Martin 86b1fd2db5 fixes a null reference exception that can be caused during compile time related to bug 57214 (#2172) 2017-06-04 18:40:28 -04:00
Chris Hamons e09fe4b83f Bump master package versions (#2170) 2017-06-03 10:30:06 -04:00
Chris Hamons 56e36921dd Bump mono (#2168) 2017-06-02 18:32:10 +02:00