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

899 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 1220fa030c
[mtouch] Remove packages.config, doesn't seem to be used anymore. (#19742)
The packages in packages.config for mtouch don't seem be used anymore (the
localization process for mtouch doesn't use the xliff localization workflow
anymore), so just remove the file.
2024-01-08 07:43:00 +01:00
Rolf Bjarne Kvinge 1ddc0b4b74
Get Mono.Cecil from NuGet everywhere. (#19535)
Also:

* Store the version in Directory.Build.props, which makes it much easier to update.
* Bump all versions to latest (0.11.5).
2023-12-04 20:15:03 +01:00
Rolf Bjarne Kvinge f9ba5467e8
Use Mono.Options NuGet instead of building from source in a few projects. (#19438)
This reduces a source dependency on the legacy Mono package.
2023-11-14 10:32:23 +01:00
VS MobileTools Engineering Service 2 b93fba0b87
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 8543391 (#19221)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2023-10-17 11:08:11 -05:00
Rolf Bjarne Kvinge b39a0f3f2a Merge remote-tracking branch 'origin/net8.0' into merge-net8.0-into-main 2023-10-11 16:40:24 +02:00
VS MobileTools Engineering Service 2 bae7760087
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 8441644 (#19094)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2023-09-26 11:19:42 -05:00
Haritha Mohan 4f1cbbccaa
[SensitiveContentAnalysis] Add support for Xcode 15 (#19020)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Alex Soto <alex@soto.dev>
2023-09-15 09:49:05 -07:00
Rolf Bjarne Kvinge be6c348cfd [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-09-14 07:25:58 +02:00
Rolf Bjarne Kvinge 7b3779fb71
[xcode15] Add back armv7k support for watchOS. Fixes #18902. (#18947)
Only i386 is gone from watchOS 4.0, not armv7k.

Fixes https://github.com/xamarin/xamarin-macios/issues/18902.
2023-09-11 19:00:40 +02:00
Rolf Bjarne Kvinge 9d8962c06c [net8.0] Merge main into net8.0. 2023-09-11 10:31:07 +02:00
Rolf Bjarne Kvinge 673dd5782b [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-09-08 10:31:44 +02:00
VS MobileTools Engineering Service 2 79da6c2c46
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 8349044 (#18917)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2023-09-06 13:01:07 -05:00
Rolf Bjarne Kvinge ef408d24a9 [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-08-29 11:53:41 +02:00
Rolf Bjarne Kvinge 78b649c4e1 [net8.0] Merge main into net8.0. 2023-08-29 11:24:40 +02:00
Rolf Bjarne Kvinge 45225dc88d
[dotnet] Parameterize the pack names. (#18732)
We're going to change the pack names to support multi-targeting, so ahead
of the pack name change I'm changing the existing logic to use a variable
for the pack name in most places (this will make the rename much easier and
simpler).

These changes should have no effect by themselves.
2023-08-29 10:06:46 +02:00
Rolf Bjarne Kvinge 339582383b [net8.0] Merge main into net8.0. 2023-08-25 08:26:06 +02:00
Rolf Bjarne Kvinge 2e7846d190
[registrar] Skip registering types removed in Xcode 15. (#18812)
Apple completely removed the NewsstandKit framework and the
PKDisbursementAuthorizationController[Delegate] types in Xode 15, so
let's not generate any corresponding code in the static registrar.

This effectively adds basic support for using Xcode 15 with .NET 7 (take
2).
2023-08-25 07:42:34 +02:00
Šimon Rozsíval 4ddee61b66
[NativeAOT] Add support for conditional [Preserve] attributes (#18803)
This is a follow-up to #18666

The idea is to transform `[Preserve(Conditional = true)]` into
`[DynamicDependency(signature, type)]` on the static constructor of the
given type:

```c#
class MyClass {
    [Preserve (Conditional = true)]
    public void MyMethod () { }

    // transformed into ...

    [DynamicDependency ("MyMethod", typeof (MyClass))]
    static MyClass() { /* either the existing cctor or a new empty cctor */ }

    public void MyMethod () { }
}
```
2023-08-25 07:41:16 +02:00
Rolf Bjarne Kvinge 7d5e1a4e7e [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-08-23 17:35:17 +02:00
Rolf Bjarne Kvinge 2091e09592
[net8.0] Merge main into net8.0 (#18770) 2023-08-22 15:19:06 +02:00
Rolf Bjarne Kvinge 19b2b3744f
[NativeAOT] Add support for [Preserve] attributes (#18666)
Add partial support for the `[Preserve]` attribute for NativeAOT. This
is done by injecting an equivalent `[DynamicDependency]` attribute. The
partial support comes from the fact that there's no way to map a
conditional preserve attribute (`[Preserve (Conditional = true)]`) to a
`[DynamicDependency]` attribute, so we report a warning instead.

For non-conditional `[Preserve]` attributes, we'll now add a
`[DynamicDependency]` attribute to the assembly's module constructor for
the type/member in question, effectively rooting it.

This makes it possible to fully link all our test suites when NativeAOT
(otherwise NativeAOT would just link out all the tests, leaving the test
suites empty - and unfortunately green, so this was a rather accidental
discovery).
2023-08-18 16:49:47 +02:00
Rolf Bjarne Kvinge c8ae3dc072 [net8.0] Merge main into net8.0. 2023-08-16 11:19:56 +02:00
Rolf Bjarne Kvinge 38e4e08d35
[tools] Improve logging/reporting when running into problems with binding projects / assemblies. (#18683) 2023-08-16 10:31:38 +02:00
Manuel de la Pena d5d14f6cd8
[Symbols] Add support for the new Xcode 15 Symbols framework. (#18642)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-08-15 11:53:48 -04:00
Šimon Rozsíval 7f67aa0bae
[registrar] Create instances of NSObjects and INativeObjects without using reflection in the managed static registrar (#18519)
This PR adds lookup tables and factory methods for INativeObjects and
NSObjects. These generated methods allow us to create instances of these
objects without needing reflection.

Closes #18358.
2023-08-15 08:30:46 +02:00
Manuel de la Pena d5c6d22905 [Mtouch] Ignore warning about duplicated libs. 2023-08-04 11:47:29 -04:00
Rolf Bjarne Kvinge e082cf136f [NewsstandKit] Remove this framework.
The NewsstandKit framework has been completely removed, both from the headers and
Apple's documentation, so assume they want it gone and remove it ourselves as well.
2023-08-04 11:47:27 -04:00
Rolf Bjarne Kvinge 3beafbb9bb [build] Add support for skipping 32-bit watchOS device architectures by bumping the min watchOS version. 2023-08-04 11:47:27 -04:00
Rolf Bjarne Kvinge 34667ebce6 [net8.0] Merge main into net8.0. 2023-08-01 17:10:44 +02:00
VS MobileTools Engineering Service 2 8d875fd3e9 Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 8130882 2023-07-23 05:05:23 -07:00
Rolf Bjarne Kvinge 15b7907eab [net8.0] Merge main into net8.0. 2023-06-23 17:03:50 +02:00
Steve Hawley a36cd71174
[dotnet] Integrate class handle rewriting into static registrar process. (#18456)
Integrate class handle rewriting into static registrar.
2023-06-23 10:12:35 -04:00
Rolf Bjarne Kvinge a3b466b89e [tools] Don't allow keeping the dynamic registrar when using NativeAOT. 2023-06-21 20:49:51 +02:00
VS MobileTools Engineering Service 2 a054c52d54
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 7800490 (#18306)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2023-05-23 08:26:52 +02:00
Rolf Bjarne Kvinge 65590ba8c0 Merge remote-tracking branch 'origin/main' into msr 2023-05-18 15:19:39 +02:00
Rolf Bjarne Kvinge cdac4507a2
[devops] Stop building test dependencies on each test run. (#18096)
Stop building the test dependencies on each test run, and instead use the archived test dependencies we have from the main build:

* Stop running 'make all' in tests/ on every separate test run.
* Add a lot more stuff in the package-test-libraries.zip archive.
* Extract all the new stuff on every test run. We add stuff from outside the tests/
  directory, so adjust archive creation and extraction to use the root directory
  of the repository as the root of the zip archive as well.
* Also add the introspection dependencies to the same archive to simplify the logic.
* Fix xharness to not store absolute paths in generated projects.
* Fix test project to not automatically run make in tests/test-libraries when running
  on the bots.

Building the test dependencies takes ~10 minutes for each test run, so this saves
about that time for each test run.
2023-05-15 18:41:49 +02:00
Git History Editor 382ebae8d5 [tools] Add a managed static registrar. Fixes #17324.
This adds a managed static registrar, which is a variation of the static registrar
that takes advantage of a few new features in C# and the runtime, as well as avoiding
metadata tokens, which NativeAOT doesn't support.

This registrar will generate most of the trampoline/interop code as managed code
using Cecil, and the Objective-C part is as small as possible.

Fixes https://github.com/xamarin/xamarin-macios/issues/17324.
2023-05-11 13:10:30 +02:00
Git History Editor cbfc59111b [src] Refactor Class.ResolveToken to take the assembly as a parameter.
This is to make the Class.ResolveToken usable from the managed static registrar.
2023-05-11 13:10:30 +02:00
Git History Editor 53d7bc523e [tools] Move code to compute block signatures to the static registrar.
This makes it easier to use this code from the managed static registrar.
2023-05-11 13:10:30 +02:00
Rolf Bjarne Kvinge 36af029204
Change all null checking expressions to use 'is' and 'is not'. (#18176)
Change all null checking expressions to use 'is null' and 'is not null'
instead of '== null' and '!= null'.

This was mostly done with sed, so code can probably be improved in many
other ways with manual inspection, but that will come over time.

Also add code to the autoformat script to automatically fix these issues in the future.
2023-05-05 17:52:19 +02:00
Rolf Bjarne Kvinge d12c04689f
Enable nullability in various places (#18082)
I started fixing nullability in one place, and then it snowballed a bit
and I had to fix nullability in a lot of places.

Most are trivial, except for the `generate-frameworks-constants`
project: I had to create a .NET version of the project in order to
compile a .NET version of the tool.
2023-05-04 07:39:56 +02:00
VS MobileTools Engineering Service 2 9b7b3360da
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 7704520 (#18191)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2023-05-03 12:32:16 -05:00
Steve Hawley 2ec000df27
[dotnet] Use the type_map_path arg (#18175)
Removed the default argument value
Added `Application.ClassMapPath`
Added options and setter for `ClassMapPath`
Integrated usage.
2023-05-01 14:48:09 -04:00
Steve Hawley 935ec25827
[dotnet] integrate writing out class map into static registrar (#18141)
Replaced the existing type map in StaticRegistrar.cs with a
`CSToObjCMap`.
Added code to write it out to a specified path as XML.
Currently the path is a parameter that defaults to null and is not (yet)
used.
2023-04-26 11:57:07 -04:00
VS MobileTools Engineering Service 2 ada4d2cb31
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 7603393 (#18005)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/ceLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2023-04-10 08:23:00 -05:00
Rolf Bjarne Kvinge e013c10a30
Add support for function pointers to BlockLiteral. (#17672)
Add support for function pointers to BlockLiteral, and use it to update
almost all manually bound block code to use function pointers (in .NET).

Also add support to the linker for optimizing the new block API.

Contributes towards https://github.com/xamarin/xamarin-macios/issues/15783.
2023-03-06 10:26:08 +01:00
Rolf Bjarne Kvinge fd44670214
[ObjCRuntime] Make sure to call 'Release' in all code paths in Runtime.GetINativeObject<T> when owns=true. Fixes #12732. (#17118)
Fixes https://github.com/xamarin/xamarin-macios/issues/12732.
2023-02-07 07:22:35 +01:00
VS MobileTools Engineering Service 2 87f4b91f8d
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 7198107 (#17246)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/ceLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2023-01-17 12:14:36 -06:00
Rolf Bjarne Kvinge 6c04f7621a
[tools] Update SdkVersions.cs after the latest Xcode 14.2 bump. (#17101)
* Update `SdkVersions.cs` after the latest Xcode 14.2 bump.
* Rename `[SdkVersions|ProductConstants].cs.in` to `[SdkVersions|ProductConstants].in.cs`.
  This way the autoformatter makes sure it's formatted correctly.
2022-12-21 17:44:27 +01:00
Rolf Bjarne Kvinge d6cb31402f
[tools] Split tools/common/SdkVersions.cs in two files. (#17067)
We need parts of tools/common/SdkVersions.cs when building tests on Windows.
In order to simplify our Windows-life, we're going to check in the generated
SdkVersions.cs file, that way it won't have to be re-generated on Windows (the
logic is very make-based, and not easily executed on Windows).

However, parts of SdkVersions.cs would change every commit, which would make
the above solution rather annoying. So split out those parts into a new file
(ProductConstants.cs), which is still generated during the build (and not
checked in).
2022-12-16 15:25:53 +01:00