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

12910 Коммитов

Автор SHA1 Сообщение Дата
Chris Hamons 39d52ba64f
[tests] Add disabled NET6 availability attribute test (#14106) 2022-02-11 09:11:02 -06:00
Rolf Bjarne Kvinge 25cfcaad10
[src] Use different variables for source files for .NET and legacy. (#14120)
This allows us to have different sets of source files between .NET and legacy.

There should be no change in this PR, it's just preparatory work for removing
OpenTK files from the .NET build.
2022-02-11 07:43:35 +01:00
Rolf Bjarne Kvinge 478c1d2c8f
Bump maccore. (#14121)
New commits in xamarin/maccore:

* xamarin/maccore@6e6b84249b [release] Don't try to remove the prebuilt app, it's not there anymore.

Diff: 037cc66058..6e6b84249b
2022-02-10 14:51:51 -05:00
Rolf Bjarne Kvinge 5a0c317d06
[tests] Make the Bug2000_NSPersistentStoreCoordinator test use a process-unique test file name. Fixes #xamarin/maccore@2515. (#14119)
Make the Bug2000_NSPersistentStoreCoordinator test use a test file name that
contains the process id, so that multiple test processes at the same time
don't stomp on eachother.

Fixes https://github.com/xamarin/maccore/issues/2515.
2022-02-10 15:25:55 +01:00
Mauro Agnoletti 4cee76e0e1
Improvements on Xamarin.iOS.Tasks.Windows (#13862)
* Changes covered by this PR:

   - Removed unused references
   - Removed Xamarin.PreBuilt.iOS.app.zip since it's now built and included automatically as part of the CI build
   - Added missing signing and versioning
   - Replaced DotNetZip with System.IO.Compression.ZipFile: now that .net provides its own zip implementation we no longer require DotNetZip reference for unzipping purposes
   - Fixes the Tasks missing CodePages reference: we no longer need to replace the CodePages reference assembly by its implementation, since this project already specifies the `win` RID. The replacement was failing because `RuntimeTargetsCopyLocalItems` is empty now that the RID is set, so we ended up removing the reference.

Co-authored-by: Emanuel Fernandez Dell'Oca <ema@xamarin.com>
2022-02-10 14:20:33 +01:00
Rolf Bjarne Kvinge eb507fe5c0
[src] Fix dependencies in makefile to not contain a trailing slash. (#14110)
This fixes a random build error, because there's no rule that knows how create
these dependencies with a trailing slash.
2022-02-10 08:52:55 +01:00
Mike Bond 7f38b76cd6
[CI] Generate Software Bill of Materials (SBOM) manifest (#13656)
Related work item: VS #1458467

Per Executive Order (EO) produce a Software Bill of Materials (SBOM) capturing the produced package files using a dedicated task
https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/secure-supply-chain/ado-sbom-generator

SBOM manifest generation only runs as part of a CI build since the steps are integrated with the Upload packages to Azure job

As a result of this change you will find an artifact named sbom attached to each build. Within that artifact is a manifest.json file under a _manifest directory capturing all of the files that constitute the Software Bill of Materials

The sbom steps capture the *.nupkg, *.pkg and *.msi package files published by the build

Test build having the Upload packages to Azure step enabled
https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=5720455&view=results
2022-02-09 16:12:02 -05:00
Rolf Bjarne Kvinge 808a61a12b
[msbuild] Make sure to set 'ResolveAssemblyConflicts=true' before importing Microsoft.CSharp.targets. Fixes #11691. (#14109)
We must set `ResolveAssemblyConflicts=true` before loading
Microsoft.Common.targets (which is loaded by Microsoft.CSharp.targets),
because otherwise we won'd do any conflict resolution at all, since the
variable isn't 'true' when it needs to be.

Also add test.

Fixes https://github.com/xamarin/xamarin-macios/issues/11691.
2022-02-09 14:07:35 -05:00
Rolf Bjarne Kvinge 382074bbb8
[bgen] Make sure to render nint/nuint in delegates as nint/nuint for .NET. Fixes #14107. (#14112)
This makes us render this:

    public delegate nfloat NSTableViewColumnWidth(NSTableView tableView, nint column);

instead of this:

    public delegate nfloat NSTableViewColumnWidth(NSTableView tableView, IntPtr column);

Fixes https://github.com/xamarin/xamarin-macios/issues/14107.
2022-02-09 13:17:48 -05:00
TJ Lambert d5c3f2f3a9
[NET 6 Attribute Conversion] Metal (#14073)
* Removing not_CoreBuild for mellite

* Remove existing attributes

* Attribute Conversion

* Reverting src/Metal/MTLEnums.cs since API_SOURCE

* Revert "Removing not_CoreBuild for mellite"

This reverts commit d3d306626f.

* adding versioning using

* Readding an obsolete

* Reverting changes to src/Metal/MTLCompat.cs

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2022-02-09 11:25:43 -06:00
Rolf Bjarne Kvinge 5e462b1c21
[dotnet] Fix non-bundling of debug files for release builds. Fixes #14085. (#14103)
Fixes https://github.com/xamarin/xamarin-macios/issues/14085.
2022-02-09 16:46:04 +01:00
dotnet-maestro[bot] c0d2b5a8bb
Update dependencies from https://github.com/dotnet/runtime build 20220202.15 (#14061)
Microsoft.NETCore.App.Ref
 From Version 6.0.2-mauipre.1.22074.5 -> To Version 6.0.2-mauipre.1.22102.15

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-02-09 13:14:44 +01:00
Rolf Bjarne Kvinge 06100d8dca
[xtro] Update legacy annotations to talk about .NET instead of XAMCORE_4_0. (#14094)
This makes the XAMCORE_4_0 list in our source code substantially smaller.
2022-02-09 08:27:46 +01:00
Rolf Bjarne Kvinge 305ecde2cd
[tests] Adopt XAMCORE_4_0 changes for introspection in .NET. (#14098)
Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-02-09 08:26:37 +01:00
Rolf Bjarne Kvinge d0f3195492
[Foundation] Make NSSecureCoding a static class in .NET. (#14088)
It represents a protocol, so it doesn't need to be instantiated.
2022-02-09 08:25:04 +01:00
TJ Lambert 4a7bd98713
[NET 6 Attribute Conversion] SceneKit (#14029)
* Temporarily removing Monomac in SCNCompat.cs for Mellite

* Remove existing attributes

* Attribute Conversion

* Reverting changes to src/SceneKit/Defs.cs since it is API source

* Revert "Temporarily removing Monomac in SCNCompat.cs for Mellite"

This reverts commit ab0e8e7390.

* Reverting changes to SCNCompat.cs

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-02-08 09:18:02 -06:00
TJ Lambert 9959b30b70
[NET 6 Attribute Conversion] SystemConfiguration (#14100)
* Removing not TVOS attributes for mellite

* Remove existing attributes

* Attribute Conversion

* Revert "Removing not TVOS attributes for mellite"

This reverts commit 8a8488e188.

* Removing these changes since in a NotNet

* Retain original ordering for cleaner diff

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2022-02-08 09:16:07 -06:00
TJ Lambert 7c11386b5c
[NET 6 Attribute Conversion] MetalPerformanceShaders (#14077)
* Remove existing attributes

* Attribute Conversion

* Reverting src/MetalPerformanceShaders/MPSEnums.cs since API_SOURCE

* reverting src/MetalPerformanceShaders/MPSCompat.cs

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-02-08 09:06:42 -06:00
github-actions[bot] d48e1b96f6
[Localization] Pulling New Localization Translations 1808072574 (#14102)
* LEGO: Merge pull request 12848

LEGO: Merge pull request 12848

* LEGO: Merge pull request 12923

LEGO: Merge pull request 12923

* LEGO: Merge pull request 13022

LEGO: Merge pull request 13022

* LEGO: Merge pull request 13612

LEGO: Merge pull request 13612

* LEGO: Merge pull request 13638

LEGO: Merge pull request 13638

* LEGO: check in for Localization to temporary branch.

Co-authored-by: csigs <csigs@users.noreply.github.com>
Co-authored-by: CSIGS <csigs@outlook.com>
2022-02-08 08:55:21 -06:00
Filip Navara 0622ae4af2
Fix GC issue on CoreCLR where finalized objects are returned by Runtime.GetNSObject (#14070)
Fixes race condition where finalized objects are resurrected by the finalizer and for a brief moment `Runtime.TryGetNSObject`/`Runtime.GetNSObject` would return them even though a new instance is supposed to be used. In multi-threaded scenarios this would result in reused objects (same native handle) to suddenly become invalid when the UI thread processes the delayed finalization.

Fixes #13921
2022-02-08 11:08:44 +01:00
Rolf Bjarne Kvinge 5eda463eaf
[Foundation] Remove a WebKit workaround for NSProxy on tvOS in .NET. (#14089)
The WebKit framework doesn't exist on tvOS.
2022-02-08 10:48:40 +01:00
Rolf Bjarne Kvinge a19a998c83
[generator] Make sure to not have dead code. Fixes a few compiler warnings. (#14096)
Fixes:

    src/generator.cs(915,4): warning CS0162: Unreachable code detected
    src/generator.cs(918,5): warning CS0162: Unreachable code detected
    src/generator.cs(921,5): warning CS0162: Unreachable code detected
    src/generator.cs(923,5): warning CS0162: Unreachable code detected
2022-02-08 10:47:26 +01:00
Rolf Bjarne Kvinge b48958be8e
[msbuild] Rework code signing to sign everything at the end of the build. (#13956)
* Add support for specifying metadata on items that are to be codesigned to
  override any general codesign setting.

* Make the Codesign task able to sign files and directories that may depend on
  eachother.

  Implement support for ordering signing so that directories containing files
  that also must be signed are signed after those files.

  This is implemented by:

  1. Normalize all input (resolve symlinks, create full path, etc.)

  2. Sort by path length (longest to shortest paths). This way we're certain
     that if we find a directory, we'll know that we won't find any files
     later in the list from inside that directory.

  3. Group into an ordered list of buckets, where each bucket contains files
     and directories that don't depend on eachother (i.e. they can all be
     signed in parallel).

  This makes it possible to call Codesign once, listing both the app bundle
  itself, and all the individual files or directories inside that need
  signing, and the Codesign task will sign the items in an order that ensures
  parent directories are always signed after any files or directories inside.

* Finally rework code signing to sign everything with a single call to the
  Codesign task in the _CodesignAppBundle target for the executable project,
  instead of having multiple calls to the Codesign task from multiple targets
  (and projects). This makes it easier to reason about what's being signed,
  and it also makes it easier to add files to the signing process.

* Also make the Codesign task able to figure out if something needs to be
  signed, and change the _CodesignAppBundle target to not keep track of
  inputs/outputs, because it becomes quite complex (for directories, it needs
  to keep track of all the files inside that directory, and also if there's
  anything in the directory that's also being signed).
2022-02-08 10:41:51 +01:00
Rolf Bjarne Kvinge 0fff3cbea0
[Foundation] Add strongly typed version of NSUndoManager.RunLoopModes for .NET. (#14040) 2022-02-08 10:40:46 +01:00
Rolf Bjarne Kvinge a5855f6f88
[JavaScriptCore] Bind JSValue.ToArray as NSArray in .NET. Fixes #12549. (#14090)
Fixes https://github.com/xamarin/xamarin-macios/issues/12549.
2022-02-08 10:39:14 +01:00
Rolf Bjarne Kvinge e0f5cede53
[tools] Remove XAMCORE_4_0 condition in linker source. (#14091)
Thinks are working fine as-is (with this XAMCORE_4_0 variable set to false),
and I see no particular reason in the code to change it, nor does the original
implementation explain much (b2bcad7a94).

So just remove this XAMCORE_4_0 condition as if it had never existed.
2022-02-08 10:38:49 +01:00
Rolf Bjarne Kvinge 0df9fa98ef
[UIKit] Implement the UIResponderStandardEditActions protocol. (#14095)
Implement the UIResponderStandardEditActions protocol, move the
corresponding API from UIResponder there, and make sure UIResponder implements
the new UIResponderStandardEditActions protocol (which should make this move a
non-breaking change, since the protocol is inlined in UIResponder).
2022-02-08 10:38:28 +01:00
Rolf Bjarne Kvinge 8eb229f4da
[src] Fix makefile to create directories before copying files into them. (#14097)
Fixes random build errors like:

    cp: build/dotnet/ios/ILLink.Substitutions.xml: clonefile failed: No such file or directory
2022-02-08 10:36:34 +01:00
Rolf Bjarne Kvinge 2d81a92270
[tests] Adopt XAMCORE_4_0 changes in monotouch-test .NET. (#14099) 2022-02-08 10:36:20 +01:00
Rolf Bjarne Kvinge 14dde5ca9a
[AppKit/Foundation] Make the "Color" suffix consistent in NSColor and UIColor properties. Fixes #7945. (#14080)
Make the "Color" suffix consistent in NSColor and UIColor properties (by removing the "Color" suffix for all such properties).

Fixes https://github.com/xamarin/xamarin-macios/issues/7945.
2022-02-08 09:15:21 +01:00
dotnet-maestro[bot] adec64bd74
Update dependencies from https://github.com/dotnet/installer build 20220206.1 (#14092)
Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.200-rtm.22078.8 -> To Version 6.0.200-rtm.22106.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2022-02-08 09:12:15 +01:00
Rolf Bjarne Kvinge 352a0d818a
[dotnet] Include all files in the Resources subdirectory as bundle resources. Fixes #13808. (#14018)
Include all files in the project's Resources subdirectory as BundleResource
items (except .DS_Store files, which are pretty omnipresent on macOS).

Also, contrary to the other default includes, add a condition so files are
only included if we have a resource prefix (typically "Resources"), otherwise
the entire hard drive might be included, and that's not really what we want.

Fixes https://github.com/xamarin/xamarin-macios/issues/13808.
2022-02-07 18:55:31 +01:00
Rolf Bjarne Kvinge af541a05d8
[tests] Fix TOP declaration for a few makefiles. (#14086) 2022-02-07 18:38:01 +01:00
Chris Hamons c8bae0e0a0
[NET 6 Attribute Conversion] Homekit (#13949) 2022-02-07 11:05:57 -06:00
Manuel de la Pena 825c7fd55f
[CI] Move to the new sdk-insertions workload. (#14079) 2022-02-07 11:38:28 -05:00
TJ Lambert 3b3d4751b0
[NET 6 Attribute Conversion] ModelIO (#14081)
* Remove existing attributes

* Attribute Conversion

* Reverting changes to src/ModelIO/MIEnums.cs since API_SOURCE

* Add versioning usings

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2022-02-07 10:13:48 -06:00
TJ Lambert fb24a4085d
[NET 6 Attribute Conversion] MobileCoreServices (#14075)
* Remove existing attributes

* Attribute Conversion

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2022-02-07 10:09:07 -06:00
Rolf Bjarne Kvinge 5b132719cc
[MetalPerformanceShaders] Make MPSCnnConvolutionDataSource.Load a method in .NET. Fixes #6530. (#14087)
That's also how Swift defines it.

Fixes https://github.com/xamarin/xamarin-macios/issues/6530.
2022-02-07 16:50:46 +01:00
TJ Lambert 5b42a3867e
[NET 6 Attribute Conversion] WebKit (#14064)
* Remove existing attributes

* Attribute Conversion

* Adding in missing attributes

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2022-02-07 09:43:08 -06:00
TJ Lambert 4ddf73c2fd
[NET 6 Attribute Conversion] StoreKit (#14048)
* Remove existing attributes

* Attribute Conversion

* Reverting changes to StoreKit/Enums.cs since it is in API_SOURCES

* Adding versioning using

* reverting changes to compat file

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-02-07 09:41:27 -06:00
Steve Hawley 946dd5310b
[NET 6 Conversion] MetalKit (#14074)
* Remove existing attributes

* Attribute Conversion

* Remove existing attributes

* Attribute Conversion

* versioning needed
2022-02-07 10:02:58 -05:00
Steve Hawley 83dfc207b3
[NET 6 Attribute Conversion] XKit (#14072)
* Remove existing attributes

* Attribute Conversion

* Remove existing attributes

* Attribute Conversion

* don't do Compat files, thanks
2022-02-07 10:02:42 -05:00
TJ Lambert ad0e56bb39
[NET 6 Attribute Conversion] GameKit (#13977)
* Temporarily removing a xamcore4

* Remove existing attributes

* Attribute Conversion

* reverting the xamcore 4 removal

* revert changes to GKCompat.cs and ErrorDomain

* Removing fixed enums in the ignore files

* This one should stay notnet

* Revert "Removing fixed enums in the ignore files"

This reverts commit 1adc0315e5.

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-02-07 08:32:24 -06:00
Rolf Bjarne Kvinge 20966a76d6
[AppKit] Fix the protocols for NSTextView according to the current headers. (#13777)
NSTextView doesn't implement the NSTextFinderClient protocol, so remove that (in legacy Xamarin).
2022-02-07 14:55:47 +01:00
Rolf Bjarne Kvinge ef3b05478e
[tools/runtime] Enable exception marshalling by default for all platforms in .NET. (#14051)
When exception marshalling was originally implemented, for backwards
compatibility concerns it was only turned on by default for platforms that
really needed it (watchOS).

However, exception marshalling is by far the safest option, so in .NET we're
enabling it by default for all platforms (it's still possible to disable it
for those who wants to).

Ref: https://docs.microsoft.com/en-us/xamarin/ios/platform/exception-marshaling
2022-02-07 14:12:32 +01:00
Rolf Bjarne Kvinge eb281aefee
[AppKit] Make NSTextView implement the NSColorChanging protocol in .NET. (#14071)
Also change the NSColorChanging.ChangeColor method to not be deprecated
anymore, Apple's headers say nothing of the sort.
2022-02-07 08:06:24 +01:00
Rolf Bjarne Kvinge 42c87ab2f7
[runtime] Make Runtime.Arch a readonly field in .NET. Fixes #5518. (#14076)
* Make Runtime.Arch a readonly field.
* Tell the AOT compiler Runtime.Arch is a constant value.
* Tell the linker to stub out the method we use to fetch the current
  architecture from native code (it turned out a bit complicated to set the
  Arch field when it's readonly - the solution I came up with was to call a
  P/Invoke).

Test case (size of the main executable): link all (debug)

* Before:  33.522.704 bytes
* After:   33.506.112 bytes
* Difference: -16.592 bytes (-0.05 %)

There were no size differences in release mode, nor were there any size
differences in the "don't link" test, neither for debug nor release mode.

Fixes https://github.com/xamarin/xamarin-macios/issues/5518.
2022-02-07 08:05:41 +01:00
Rolf Bjarne Kvinge 18b53d8e4b
[xtro] Remove dead comment in ignore file. (#14078) 2022-02-07 08:04:34 +01:00
Rolf Bjarne Kvinge 6bef760049
[NetworkExtension] Remove fields from macOS that aren't in macOS for .NET. (#14082) 2022-02-07 08:03:53 +01:00
Marius Ungureanu dc9e080828
Implement IEquatable<T> on NSRange (#14083)
This avoids poor performance of GetHashCode and Equals that are used for the struct using reflection on the first field.
2022-02-07 07:52:45 +01:00