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

2534 Коммитов

Автор SHA1 Сообщение Дата
Vincent Dondain 111d3357f6 Update reference to maccore (#2007) 2017-04-13 17:22:06 -04:00
Marek Safar ae5e483764 [linker] Update linker to recognize debug async notification methods. Fixes #55037 (#2004) 2017-04-13 11:54:47 -04:00
Sebastien Pouliot d3d7e6752a [mmp] Update code that only considered .mdb (not .pdb) (#2002) 2017-04-12 17:38:54 -04:00
Jeffrey Stedfast 0fe6c076d5 [msbuild] Don't force mcs for building Xamarin.Mac apps (#1994) 2017-04-12 16:01:35 -04:00
Rolf Bjarne Kvinge 93ef38fb09 [mtouch/mmp] Handle empty aggregated exceptions better. (#1996)
This only happens when something else is wrong, but this makes finding out
what that something else is much easier.
2017-04-12 15:59:15 +02:00
Rolf Bjarne Kvinge 337feb6cc0 [runtime] Fix lookup of assembly in default location in framework. (#1998) 2017-04-12 15:54:30 +02:00
Rolf Bjarne Kvinge c3596041ee [src] Declare a single .SECONDARY without prerequisites. (#2000)
Declare a single .SECONDARY target without prerequisites, which means all
implicit targets are treated as secondary (which means they won't be
automatically deleted by make).
2017-04-12 09:18:43 -04:00
Rolf Bjarne Kvinge ea074817e2 Bump Touch.Unit to fix compiler warning. (#1999)
commit spouliot/Touch.Unit@708348b0c1
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date:   Wed Apr 12 11:17:43 2017 +0200

    Fix compiler warning.

    Fix this compiler warning:

    > TouchRunner.cs(313,24): warning CS0618: `UIKit.UIAlertView.UIAlertView(string, string, UIKit.UIAlertViewDelegate, string, params string[])' is obsolete: `Use overload with a IUIAlertViewDelegate parameter'
2017-04-12 09:18:01 -04:00
Rolf Bjarne Kvinge bac1492d36 Fix path to Mono.Linker.csproj. (#1997) 2017-04-12 09:14:57 -04:00
Rolf Bjarne Kvinge 30b21dcc0e [xharness] Fix async code to propagate exceptions correctly. (#1991)
This fix will ensure that xharness won't hang when failing to list simulators.
2017-04-12 07:53:30 +02:00
Rolf Bjarne Kvinge e61e5cce98 [mtouch] Make code sharing work on watchOS. (#1988)
* [mtouch] Only iOS has version 8 (and earlier OS versions that don't support frameworks).

* [mtouch] Update logging to be less confusing when logging about WatchKit extensions.

* [mtouch] Don't compile P/Invoke wrappers for extensions that are sharing code.

The container app already has the P/Invoke wrappers.
2017-04-11 19:20:22 +02:00
Sebastien Pouliot 54e16ab9c5 [mmp] Add new Profile subclasses for Xamarin Mac (full / system) (#1989)
The fallback to MonoMacProfile is not correct if we ask for the
platform assembly - which blocks enabling the linker for that
assembly (only)
2017-04-11 12:01:06 -04:00
Sebastien Pouliot 479394782f [mmp] Show more information when a MM2001 error occurs (#1987)
Same that was done for `mtouch` in
https://github.com/xamarin/xamarin-macios/pull/1947
2017-04-11 11:06:51 -04:00
Rolf Bjarne Kvinge 0a47a8ce0c Patch from Zoltan to fix build error with CppSharp.CppParser.dll (#1967) (#1986) 2017-04-11 15:01:57 +02:00
Rolf Bjarne Kvinge e2835aec51 [README] Explain that 'make world' should not be used to rebuild. (#1984) 2017-04-11 08:56:49 -04:00
Sebastien Pouliot ef399e8756 [mmp] Add Intents and Photos mappings for namespaces (#1983)
MonoMacNamespaces needs them to properly remove the entries from
NSObject.mac.cs.

Fix debug logs:

Unprocessed library / namespace /System/Library/Frameworks/Intents.framework/Intents
Unprocessed library / namespace /System/Library/Frameworks/Photos.framework/Photos
2017-04-11 08:18:25 -04:00
Jeffrey Stedfast 52aba009f1 [msbuild] Enable device-specific builds for appex's (#1974) 2017-04-11 08:17:54 +02:00
Rolf Bjarne Kvinge 651a9735ff Use Visual Studio instead of Xamarin Studio. (#1972)
* Use Visual Studio instead of Xamarin Studio.

* VS doesn't have mdtool, it has vstool.

Also there's no need to manually invoke the mdtool.exe executable anymore
(which we did because the mdtool executable had a min macOS version of 10.9,
and we used to build tests on older macOS versions [1]), since now we only run
tests on older macOS versions, we don't build those tests there.

[1] a1932b0ccd
2017-04-11 08:13:34 +02:00
Timothy Risi 41fa74fc12 [Mac] Update numerous availability tags from 10.12.1 to 10.12.2 (#1672) 2017-04-10 21:19:10 -08:00
Rolf Bjarne Kvinge fe5c62410d [msbuild] Fix running bgen for Xamarin.Mac. (#1977)
bgen must be executed with the system mono, not bmac-mobile-mono, and without
the MONO_PATH variable set.
2017-04-10 16:34:49 +02:00
Alex Soto 3fe0d2010a [CoreText] CTParagraphStyle uses the incorrect float return type. Fixes bug 54148. (#1975)
* [CoreText] Fix bug 54148 - CoreText.CTParagraphStyle does not pick up settings from CTParagraphStyleSettings

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

CTParagraphStyle float properties have the incorrect float return type,
the headers state this API's returns CGFloats (aka nfloat) instead of floats
this used to work ok fetching them due to there is no difference in size
for 32 bits devices but once 64 bit devices appeared the API began to fail

The actual method that fetches the values `CTParagraphStyleGetValueForSpecifier`
asks for the size of the returned data and we used to give the size of a float
which is incorrect in 64 bits devices and the API call just correctly returned
false because it could not write back the value to us.

Added tests for the full properties available on CTParagraphStyle

* Add comment about the weird Dispose method implementation in CreateFromSettings
2017-04-10 08:24:25 +02:00
Alex Soto 2a85ec1674 [mtouch] Remove workaround for bug 43462, this fixes slow builds (bug 52545) (#1976)
https://bugzilla.xamarin.com/show_bug.cgi?id=52545

Some projects took a lot of time to build with the workaround for
bug 43462 but now that it is fixed we can remove it and stop the slowness
2017-04-10 08:20:13 +02:00
Jeffrey Stedfast 3b4c6e720e [msbuild] Add support for passing extra args to btouch (#1969)
* [msbuild] Add support for passing extra args to btouch

Partial fix for https://bugzilla.xamarin.com/show_bug.cgi?id=51753

* [msbuild] Update the Mac ObjCBinding targets as well
2017-04-10 08:14:42 +02:00
Chris Hamons 0d4243d793 [macos] Fix XM projects with p/invokes into non-system frameworks (#1968)
- Broken by d20ccf5bc6
2017-04-07 11:19:39 +02:00
Sebastien Pouliot 7d930369af Revert "[msbuild] Don't override the OnDemandResourcesUrl if previously set (#1963)"
This reverts commit 46e8bd00ef.
2017-04-06 14:43:16 -05:00
Sebastien Pouliot 1b87264f5e Bump mono to get a cecil fix for bug #54409 (#1957)
Bug 54409 - [iOS]System.Linq tests fail to build with error MT2001
https://bugzilla.xamarin.com/show_bug.cgi?id=54409
2017-04-06 13:20:26 -05:00
Jeffrey Stedfast 46e8bd00ef [msbuild] Don't override the OnDemandResourcesUrl if previously set (#1963)
This change allows users to specify a custom URL for hosting their
OnDemand Resources.
2017-04-06 12:57:32 -04:00
Rolf Bjarne Kvinge 033d156716 [system-dependencies] Check for Visual Studio instead of Xamarin Studio. (#1965) 2017-04-06 17:12:32 +02:00
Rolf Bjarne Kvinge 0a89324b16 [mtouch] Copy aot data to the app even for assemblies that aren't copied. Fixes #54499. (#1964)
We want to copy the aot data for both the 32-bit and the 64-bit versions of an
assembly even if the 32-bit and 64-bit versions of the assembly are identical.

https://bugzilla.xamarin.com/show_bug.cgi?id=54499
2017-04-06 14:29:38 +02:00
Chris Hamons 3ede0d90da Add NSFileManager.UnmountVolume (#1946) 2017-04-05 14:47:20 -05:00
Chris Hamons d20ccf5bc6 [macos] Rework framework/weak_framework handling in mmp (#1953)
- Before this mmp was not adding -framework, -weak_framework consistently on non-static registrar use cases
- GatherFrameworks was previously not ported from mtouch, and did not work as DeploymentTarget was unset in mmp
- Added verbose prints so users can determine why various framework linkages are added
- Fixed an issue where duplicate were being added due to HandleFramework shoving args by hand
- Tested with auto test and https://github.com/chamons/xm-version-regression-test manual test
2017-04-05 14:38:40 -05:00
Timothy Risi 35b71c096f [macos] Change user visible strings for new framework names (#1925) 2017-04-05 10:16:48 -08:00
Sebastien Pouliot dbb41ee852 [tests][linkall] Make sure the compiler won't remove a field that triggers the inclusion of OpenTK-1.dll. Fixes #54466 (#1961)
Roslyn, when building in release, can remove unused fields. That broke
a test that ensure OpenTK types got preserved correctly (because the
assembly is not needed/included without that reference)

https://bugzilla.xamarin.com/show_bug.cgi?id=54466
2017-04-05 11:52:27 -05:00
Sebastien Pouliot bb0ea60a95 [tests] Remove OptimizeGeneratedCodeTest.IntPtrSizeOptimization. Fixes #54408 (#1959)
This optimization is now limited to Xamairn.iOS.dll. 3rd parties .dll
size savings were not large enough to justify two different (32/64)
assemblies in the application bundle.

It's likely this change that resulted in incorrect fixes like:

-                       if (classic_or_sim || single_arch) {
+                       if (IsMainExecutableDual ())

which reversed the condition and later
580f502777
which disabled DEBUG - but we don't have IL on release so it became
never executed.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=54408
2017-04-04 10:06:52 -05:00
Rolf Bjarne Kvinge 7617df6643 [tests] Fix MSBuild test invocation on wrench. (#1955) 2017-04-03 16:11:05 +02:00
Rolf Bjarne Kvinge 1105ee6136 [tests][mtouch] Fix MT0091 test after error text change. (#1956)
Also fix the test to not depend on having a specific version of an older Xcode
installed, but instead use any old Xcode.
2017-04-03 16:10:42 +02:00
Rolf Bjarne Kvinge bbbe881747 Fix how we build frameworks. Fixes #53813. (#1952)
Previously we copied any equivalent .dylib and ran install_name_tool on the
library to change the library id to make it a framework.

Unfortunately this does not work when the library contains bitcode, because
bitcode embeds linker flags (-install_name for instance), and
install_name_tool does not change those linker flags.

This means that we need to create frameworks by linking with the proper
arguments, since it's much more difficult to fixup the embedded bitcode linker
flags as well.

So change how be build Mono.framework, Xamarin.framework, and any frameworks
built from assemblies to:

* Always link instead of fixup a dylib. For Mono.framework this means
  extracting all the object files from libmonosgen-2.0.a and linking those,
  for Xamarin.framework this means linking the object files we've already
  built.

* Make sure the library is correctly named when linked (once again: bitcode
  contains embedded linker flags, so renaming the executable later breaks
  stuff as well).

I've also extracted the logic that creates Mono.framework from
libmonosgen-2.0.a to a separate shell script, to deduplicate this logic.

This required a minor change in the mono builds: we need the Mono.framework
when building the `all` target, so make sure that happens.

https://bugzilla.xamarin.com/show_bug.cgi?id=53813
2017-04-03 11:52:29 +02:00
Sebastien Pouliot 2cf0a5ed95 Bump XI and XM versions now that we have branched for d15-2 (#1954) 2017-04-02 16:08:52 -05:00
Rolf Bjarne Kvinge b568b2541e [builds] Improve mono/llvm dependencies. (#1948)
* [builds] Improve mono/llvm dependencies.

* Create a list of all the files in the mono and llvm repositories, and save
  these lists as a Make variable (in a generated Makefile - .deps.*.mk). We
  don't list _all_ the files in each repository, because there are quite a few
  (55k for mono), and Make measurably takes a while to check all of them, so
  try to limit it to a sane subset, without risking missing changes to files
  that actually matters.

* Always create stamp files when we're done with mono builds.

* Modify the mono/llvm builds to depend on all the files in their
  repositories.

* Explicitly list the corresponding .stamp-build-* files as dependencies for
  various files that are produced by the mono builds, so that make knows how
  to build these files.

* Rewrite the *-facade-check targets to depend on the corresponding
  *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile
  to execute the facade checks.

  It now takes a little while (less than a second on my machine, which is
  fine) for make to list all dependencies and get their timestamps, but if
  executing multiple submakes this adds up to a multi-second timewaste.

  So avoid the timewaste by not doing submakes, but instead use dependencies
  to enforce the required target execution ordering.

* Don't depend on nicely named intermediate targets, since won't prevent
  rebuilds:

      build-cross64: setup-cross64

  Since the `setup-cross64` file doesn't exist, `build-cross64` will always
  execute. Instead depend on the stamp file:

      build-cross64: .stamp-configure-cross64

  And now `build-cross64` will only rebuild if needed.

* Don't try to list all intermediate files as .SECONDARY dependencies, instead
  list none at all, which works as if all files were listed as dependencies.

* Some targets had to move later in the file, since variables used in dependencies:

       foo: $(VARIABLE)

  must be defined before that point in the file, as opposed to variables used in recipes:

       foo:
           $(MAKE) $(VARIABLE)

  can be defined anywhere in the Makefile.

* Simplify the targets that sign assemblies significantly.

There are a few end results:

* It's now possible to do `make install`, without doing `make all` first. This
  might seem weird, but that also ensures the more common `make all install`
  works properly.

* Remakes (without any mono/llvm changes) in build/ are much faster, because
  we now won't recurse into every mono build:

      $ time make all -C builds/ -j8
      [...]
      real  0m1.873s

  This even means that we might be able to make it a habit to remake in the
  root directory, which doesn't take forever now:

      $ time make all -j8
      [...]
      real  0m4.521s

  Unfortunately adding `make install` to the mix still does some useless
  stuff, and it ends up taking ~30 seconds to complete a full build:

      $ time make all install -j8
      [...]
      real  0m32.542s

* [msbuild] Don't verify the xml syntax of targets files unless the files change.

* [build] Don't depend on installed files.

Don't depend on installed files, because that causes a rebuild when installing
to a different directory (i.e. package creation).

* Bump maccore to get build improvements.

Rebuilds are now very fast:

    $ make all install -j8
    $ time make all install -j8
    real	0m5.735s

Less than 6s to figure out that nothing needs to be done.

And strangely flushing the disk cache doesn't make it much slower:

    $ sudo purge
    $ time make all install -j8
    real	0m7.309s

Which probably means that Make mostly reads file metadata, and not actual file
contents (which is good).
2017-03-31 20:23:38 +02:00
Rolf Bjarne Kvinge 3fed06c2be [mtouch] Don't open files for writing when it's not needed. (#1949)
This fixes a file sharing exception:

> MTOUCH: error MT1009: Could not copy the assembly '[...]/msbuild/tests/MyActionExtension/bin/iPhone/Debug/MyActionExtension.dll' to '[...]/msbuild/tests/MyTabbedApplication/obj/iPhone/Debug/mtouch-cache/32/Link/MyActionExtension.dll': Sharing violation on path [...]/msbuild/tests/MyActionExtension/bin/iPhone/Debug/MyActionExtension.pdb
2017-03-31 11:19:10 +02:00
Rolf Bjarne Kvinge 8248a91fed [tests] Fix msbuild-mac project to use a project reference to GuiUnit. (#1950)
xbuild will automatically find and build project references, while directly
referencing the assembly won't.
2017-03-31 11:19:00 +02:00
Rolf Bjarne Kvinge 2a7e1c5497 [tests][msbuild] Teach tests about new potential location for assemblies. (#1951) 2017-03-31 11:18:50 +02:00
Chris Hamons 1ec3849617 [macos] Fix msbuild issues with shprojj/projitem library (#1936)
- In some build cases this chunk of code:

    <ItemGroup Condition=" '$(NoCompilerStandardLib)' == 'true' and '$(NoStdLib)' != 'true' ">
          <!-- Note that unlike VB, C# does not automatically locate System.dll as a "standard library"
               instead the reference is always passed from the project. Also, for mscorlib.dll
               we need to provide the explicit location in order to maintain the correct behaviour
     -->
        <_ExplicitReference Include="$(FrameworkPathOverride)\mscorlib.dll" />
    </ItemGroup>

would trigger and force us to use mscorlib from system mono. That does not work well.
- By setting FrameworkPathOverride, we can get the right mscorlib
- However, that ItemGroup happens outside of a target, so we must move our setting to match for it to take effect
2017-03-30 15:04:21 -05:00
Sebastien Pouliot 8ffb553e9e [linker] Capture and show more information when a MT2001 error occurs (#1947) 2017-03-30 14:41:56 -05:00
Rolf Bjarne Kvinge e19426e073 [tests] Don't create test packages by default. (#1941)
* [tests] Don't create test packages by default.

Don't create test packages by default, instead add a new target to create test
packages. This new target is called on wrench, which means the packages will
still be created when needed, but they won't be built locally in every build
(and if a packaged test fails to build, it won't fail the entire build).

* [tests] Use a project reference instead of assembly reference for GuiUnit.exe

Use a project reference instead of assembly reference for GuiUnit.exe, so that
the GuiUnit reference is automatically built if necessary.

This also makes it required to build a sln for Classic (since mdtool can't
find referenced projects from a csproj).
2017-03-30 18:01:15 +02:00
Sebastien Pouliot 22a5cb5ab9 [runtime] Remove unicode character causing warnings at build time (#1945)
16:59:44 monotouch-debug.m:568:3: warning: treating Unicode character as whitespace [-Wunicode-whitespace]
16:59:44         } else if ((shmkey = ftok ("/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch", 0)) == -1) {
16:59:44          ^
2017-03-30 18:00:48 +02:00
Rolf Bjarne Kvinge fa8224cab0 Automatically reset dependencies after cleaning everything. (#1944)
mono-extensions is deleted when cleaning everything, but executing 'make
reset' will put it back again.
2017-03-30 18:00:32 +02:00
Rolf Bjarne Kvinge d5828ef1a0 Bump maccore to get documentation for the Runtime.AssemblyRegistration event. (#1940) 2017-03-30 14:37:28 +02:00
Alex Soto 3ba72b2136 [AVFoundation] Bug 52730 - Re-enable AVAudioSessionInterruptionEventArgs.WasSuspended (#1937)
https://bugzilla.xamarin.com/show_bug.cgi?id=52730

There is no need for bindas support here, by just using bool and
[NullAllowed] the generator does the right thing

```csharp
[CompilerGenerated]
public System.Boolean? WasSuspended {
	get {
		IntPtr value;
		if (k2 == IntPtr.Zero)
			k2 = ObjCRuntime.Dlfcn.GetIntPtr (Libraries.AVFoundation.Handle, "AVAudioSessionInterruptionWasSuspendedKey");
		if (Notification.UserInfo == null)
			return null;
		value = Notification.UserInfo.LowlevelObjectForKey (k2);

		if (value == IntPtr.Zero)
			return null;
		using (var nsn = Runtime.GetNSObject<NSNumber> (value))
			return nsn.BoolValue;
	}
}
```
2017-03-30 07:36:43 -05:00
Sebastien Pouliot 153056cf7f [mtouch] Provide a more accurate description of the MT0091 error (#1938)
The old one makes it sounds the linker is doing magic ;-)
2017-03-30 07:36:20 -05:00