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

14009 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge d1ef85446d
Misc fixes to make the build more silent. (#15852) 2022-09-05 10:55:41 +02:00
Rolf Bjarne Kvinge 8858dbefef
[Runtime] Fix comparing a pointer to a UTF8 string with a managed string with embedded nulls. (#15854)
A managed string can contain embedded nulls, while a native UTF8 string won't,
which means that we can't depend on finding a different character between the
two strings to determine whether we've reached the end of the native UTF8
string or not.
2022-09-05 10:54:54 +02:00
Rolf Bjarne Kvinge 61d5fcd3f8
[tests] Convert spaces to tabs in numerous test projects. (#15855)
This is changing whitespace only: https://github.com/xamarin/xamarin-macios/pull/15855/files?w=1
2022-09-05 10:54:33 +02:00
Haritha Mohan 0d55330059
[UIkit] Add generic callbacks for UIGestureRecognizer (#15846)
Simplifies code and makes bug easier to fix.
2022-09-02 12:32:14 -04:00
Rolf Bjarne Kvinge 75112818b6
[runtime] Use a custom native -> managed trampoline for calling NSObject.InvokeConformsToProtocol from the generated static registrar code. (#15830)
This avoids one case where we we embed metadata tokens to a different assembly
in the generated static registrar code.

This is required for supporting per-assembly static registration
(https://github.com/xamarin/xamarin-macios/issues/12067).
2022-09-02 15:54:34 +02:00
Jamie Magee 0d8eafc0e4
Add `$schema` to `cgmanifest.json` (#15842)
Co-authored-by: Jamie Magee <jamie.magee@microsoft.com>
2022-09-02 15:32:13 +02:00
Manuel de la Pena 65e3bd0704
[UIKit] Add attr missing from the review in https://github.com/xamarin/xamarin-macios/pull/15800 (#15835)
I asked for the attr to be added but the PR was merged without that change.
2022-09-01 17:07:36 -04:00
Rolf Bjarne Kvinge a09a42a1f3
Revert "[debugger] Work around a debugger issue when using the interpreter.". Fixes #15585. (#15827)
This reverts commit f7bb07efc0.

This workaround is no longer needed, since the dotnet/runtime hash we're using
contains this fix.

Fixes https://github.com/xamarin/xamarin-macios/issues/15585.
2022-09-01 20:49:18 +02:00
Rolf Bjarne Kvinge 496acb2a05
[devops] Fix echo command that prints a comment. (#15824)
Fix echo command so that the text to be printed isn't interpreted as a
comment.

Really everything should be quoted in bash :/
2022-09-01 15:30:20 +02:00
Rolf Bjarne Kvinge b9b6ac2ec3
[devops] Stop doing things that don't work. (#15828)
There's no builder.keychain on the bots that submit signing requests.
2022-08-31 16:31:47 -04:00
Haritha Mohan a2b23186cc
[UIKit] Add Preferred Content Size Wrapper (#15800)
Fixes xamarin/xamarin-macios#15687
Added type safe wrapper for ContentSizeCategory

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2022-08-31 13:05:51 -07:00
Rolf Bjarne Kvinge 94db59d841
[msbuild] Ignore NU1603 for XVS package references. (#15805)
Fixes these NuGet warnings:

    xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj : warning NU1603: Xamarin.Messaging.Build.Common 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj : warning NU1603: Xamarin.Messaging.Core 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Tasks.Windows.csproj : warning NU1603: Xamarin.iOS.HotRestart.Client 1.0.93 depends on Merq (>= 1.1.1) but Merq 1.1.1 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Tasks.Windows.csproj : warning NU1603: Xamarin.Messaging.Build.Common 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Tasks.Windows.csproj : warning NU1603: Xamarin.Messaging.Core 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj : warning NU1603: Xamarin.Messaging.Build.Common 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj : warning NU1603: Xamarin.Messaging.Core 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Messaging/Xamarin.Messaging.Build/Xamarin.Messaging.Build.csproj : warning NU1603: Xamarin.Messaging.Core 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj : warning NU1603: Xamarin.Messaging.Build.Common 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
    xamarin-macios/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj : warning NU1603: Xamarin.Messaging.Core 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved.
2022-08-31 18:26:46 +02:00
Rolf Bjarne Kvinge 76eb0bb573
[msbuild] Fix a few duplicate compile items warnings. (#15792)
Fixes:

	CSC : warning CS2002: Source file 'xamarin-macios/msbuild/Xamarin.Localization.MSBuild/MSBStrings.Designer.cs' specified multiple times [xamarin-macios/msbuild/Xamarin.Localization.MSBuild/Xamarin.Localization.MSBuild.csproj]
    CSC : warning CS2002: Source file 'xamarin-macios/tools/mtouch/Errors.Designer.cs' specified multiple times [xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj]
2022-08-31 18:26:10 +02:00
Rolf Bjarne Kvinge 4c36652927
[devops] Make sure no errors are ignored during signing. (#15802)
Make sure bash doesn't ignore any errors during signing. This makes it easier
to diagnose signing failures, because they don't show up in weird ways later.
2022-08-31 12:10:43 +02:00
Peter Collins ed9aae49da
[workloads] Fix iOS.Windows.Sdk.Aliased.net6 pack name (#15820)
Commit 246aa834 missed a manifest pack entry when renaming packs to
include a `.net6` suffix, producing an invalid manifest and causing MSI
conversion to fail.  Fix this by making sure to use  the `.net6` suffix
everywhere.

Failing build context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=6627063&view=logs&j=b4ea4e02-2fcb-5a4a-1d1d-96cc58456a90&t=1ef5c69d-aeda-5369-a23d-e57771ac0882&l=119
2022-08-31 11:18:30 +02:00
Manuel de la Pena 409c80dd9c
[CI] Bump microbuild. (#15813) 2022-08-30 16:00:07 -04:00
Mauro Agnoletti 6a40697836
Add 'None' build action to ObjC binding items (#15797)
Besides excluding the API definition and core source files from the compilation list, we also need to re-add them as 'None' items so they're still shown in the IDE

Fix related to: https://github.com/xamarin/xamarin-macios/issues/15690
2022-08-30 10:01:23 +02:00
Rolf Bjarne Kvinge fa6971d6f2
[devops] Remove unused file. (#15791)
Looks like the usage of this file was removed in b1ea4b51aa.
2022-08-30 09:43:56 +02:00
Rolf Bjarne Kvinge c4a34b4451
[tests] Allow setting CONFIG to specify the Configuration to build. (#15793)
Allow setting CONFIG to specify the Configuration to build when building .NET
test apps from the command line.
2022-08-30 09:29:52 +02:00
Rolf Bjarne Kvinge 80db3ab2cf
[tools] Only build mtouch if iOS, tvOS or watchOS is enabled. (#15753) 2022-08-29 16:13:18 +02:00
Rolf Bjarne Kvinge 5e8d70f95e
[tests] Improve detection of bad CI networks. (#15516) 2022-08-29 15:42:40 +02:00
Rolf Bjarne Kvinge a09b971788 [src] Quiet the build a bit. (#15737) 2022-08-29 14:15:02 +02:00
VS MobileTools Engineering Service 2 246aa83443
[main] [ci] Add support to main for multi-targeting in VS (#15786)
Context: https://github.com/xamarin/yaml-templates/pull/180
Context: https://github.com/xamarin/yaml-templates/pull/195
Context: https://github.com/xamarin/yaml-templates/pull/199
Context: https://github.com/xamarin/xamarin-macios/pull/15761

Updates the build to use the latest MSI generation template. The v3
template uses the latest changes from arcade which include a large
refactoring, support for multi-targeting, and support for workload pack
group MSIs.

The build will now produce two different VS Drop artifacts.  The MSI and
VSMAN files generated for SDK packs have been split out into a new
`vsdrop-multitarget-signed` artifact, allowing us to include multiple
versions of the SDK packs in VS.

All of the SDK packs have been renamed to include a `.net6` suffix to
match the pack aliases that will be referenced in the .NET 7 manifests.


Backport of #15776

Co-authored-by: Peter Collins <pecolli@microsoft.com>
2022-08-29 12:08:39 +02:00
Rolf Bjarne Kvinge 5ca5a963bc
[tests] Improve handling timed out macOS tests. (#15747) 2022-08-29 12:06:25 +02:00
Rolf Bjarne Kvinge b9a60c4d7e
[msbuild] Remove the Xamarin.*.Task.Core assemblies. (#15768)
We used to do the following:

1. Have abstract task classes in the Xamarin.*.Task.Core assembly (with all
   the actual code for the task in question to work properly on macOS).
2. Subclassed task in the Xamarin.*.Task assembly, which did nothing.
3. On Windows we'd inject a different Xamarin.*.Task assembly, with
   Windows-specific overrides for the implementation in the abstract base
   class.

However, we no longer do point 3, which means that we no longer need to split
our tasks across two assemblies.

This means that we can remove the Xamarin.\*.Task.Core assemblies, and move all
the code into the corresponding Xamarin.\*.Task assembly instead.

This simplifies our code and speeds up the build.

There are more simplifications that can be done; those will come in later PRs.
2022-08-29 11:59:28 +02:00
Steve Hawley 9a40048cc9
[.NET/CoreMidi] Use [UnmanagedCallersOnly] instead of [MonoPInvokeCallback] Partial Fix for #10470 (#15774)
Ref: https://github.com/xamarin/xamarin-macios/issues/10470.
2022-08-26 16:54:08 -04:00
Rolf Bjarne Kvinge 46907cb500
[dotnet] Disable warning about using a preview version of .NET. (#15780)
We're pretty much always using a preview version of .NET anyways.
2022-08-26 17:16:54 +02:00
Rolf Bjarne Kvinge d63eaf2d5e
[tools] Don't build legacy stuff unless legacy is enabled. (#15773) 2022-08-26 15:36:35 +02:00
Rolf Bjarne Kvinge 68de101ce6
[UIKit] Wrap the call to UIApplicationMain in a @try/@catch handler. (#15746)
Wrap the call to UIApplicationMain in a @try/@catch handler, and convert any
Objective-C exceptions to a managed exception.

This way the managed Main method (which calls UIApplication.Main) will be able
to catch any Objective-C exceptions.
2022-08-26 13:56:33 +02:00
Rolf Bjarne Kvinge a7690ee03b
[tests] Add global imports to the .NET unit tests to simplify code. (#15770) 2022-08-26 13:40:12 +02:00
Rolf Bjarne Kvinge 2cbf60dd0a
[runtime] Only build macOS libraries if we're building for macOS. (#15754) 2022-08-26 08:46:58 +02:00
Emanuel Fernandez Dell'Oca b1a732d526
[dotnet] macOS/MacCatalyst Archive and publishing support (#15720)
These changes are required to support Archive and Publishing for .NET macOS/MacCatalyst projects from VS for Mac.

Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-08-26 08:18:43 +02:00
Rolf Bjarne Kvinge 15d27acd92
[runtime] Add some debugging aid to xamarin_release_managed_ref. (#15767)
It's fairly frequent (due to various types of coding errors) to have the
call to '[self release]' in xamarin_release_managed_ref crash. These
crashes are typically very hard to diagnose, because it can be hard to
figure out which object caused the crash. So now we store the native
object in a static variable, so that it can be read using lldb from a core
dump.

Ref: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1481312.
2022-08-26 08:14:41 +02:00
Rolf Bjarne Kvinge 408cd7ac52
[msbuild] Automatically detect any Entitlements.plist files in the root project in .NET. (#15729)
Also provide a way out by setting EnableDefaultCodesignEntitlements=false.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1595888.
2022-08-26 08:06:48 +02:00
Rolf Bjarne Kvinge 454e19b957
[tests] Ignore any NuGet failures in PackageReferenceTests.SatellitesFromNuget. Fixes #xamarin/maccore@2612. (#15763)
NuGet seems to struggle with the network on the bots for this particular test,
so ignore the test if there are any nuget failures.

Fixes https://github.com/xamarin/maccore/issues/2612.
2022-08-25 16:46:08 +02:00
Rolf Bjarne Kvinge e372914ce0
[tests] Adjust MonoTouchFixtures.SceneKit.Invert to cope with tiny expected differences. (#15750)
This seems to happen on macOS 10.15 only for some reason.
2022-08-25 16:24:30 +02:00
Rolf Bjarne Kvinge f08ae313bf
Improve console output by telling dotnet to not complain about any workload updates. (#15514) 2022-08-25 16:24:08 +02:00
Rolf Bjarne Kvinge 8383f139e2
[src] Don't build iOS libs unless iOS is enabled. (#15751) 2022-08-25 16:04:22 +02:00
Rolf Bjarne Kvinge 1228fda1a8
[nnyeah] Don't build nnyeah unless the iOS build is enabled. (#15752) 2022-08-25 11:31:42 +02:00
Rolf Bjarne Kvinge a09c1e976c
[dotnet] Honor existing values for BuildIpa and CreatePackage. Fixes #15696. (#15697)
Don't blindly set the BuildIpa and CreatePackage values, but instead only set
them (when publishing) if they're not already set.

This makes it possible to publish and not create a package.

Fixes https://github.com/xamarin/xamarin-macios/issues/15696.
2022-08-25 11:05:09 +02:00
Rolf Bjarne Kvinge 3b1037e56f
[devops] Make the binlog artifact name unique. (#15735)
Make the binlog artifact name unique across build attempts, so that uploading the binlog archive doesn't fail in subsequent build attempts:

> ##[error]Artifact all-binlogs-test-simulator_cecil-6594281 already exists for build 6594281.
2022-08-25 09:57:31 +02:00
Rolf Bjarne Kvinge c7778b42cc
[configure] Treat each platform separately. (#15756)
This way we can enable/disable each platform separately (at least for .NET).
2022-08-25 09:56:49 +02:00
Rolf Bjarne Kvinge 969e2b1798
Bump api references to latest 6.0.4xx / d17-3 builds. (#15739)
Also update the list of packages.
2022-08-25 09:48:47 +02:00
Rolf Bjarne Kvinge 11fc44810d
Bump maccore. (#15748)
New commits in xamarin/maccore:

* xamarin/maccore@9a347bd708 [certificates] Update la_dev_apple.p12, la_distr_apple.p12 and la_mac_installer_distr.p12
* xamarin/maccore@bcdd779e58 [devops] Install Mono too.
* xamarin/maccore@7690a80a2f [submission] Fix submission test makefile

Diff: 813beaf11a..9a347bd708
2022-08-25 09:34:43 +02:00
Rolf Bjarne Kvinge ceb3f97e90
[msbuild] Build for iOS if any platform except macOS is enabled. (#15755)
This is because we use the iOS assemblies for all other platforms except for
macOS.
2022-08-25 09:26:21 +02:00
Rolf Bjarne Kvinge afeebed06b
Bump xharness. (#15738)
Bump xharness to get fix for determining whether a test has started or not:
1809c14bb7
2022-08-24 19:12:36 +02:00
Rolf Bjarne Kvinge 2b619955db
[msbuild] Unify the DetectSigningIdentity task between iOS and Mac. (#15698)
I've chosen the iOS implementation, since it's a bit more advanced to support
remote builds (the Mac implementation didn't do anything at all).

This should have no effect, since we don't support remote builds for macOS
anyways.
2022-08-24 18:55:07 +02:00
Rolf Bjarne Kvinge 771f694961
[devops] Ignore failures to install brew components. (#15719)
Hopefully works around this problem:

    [...]
    [08:14:16 VRB] Preloading sudo access since brew installation cannot be run as root
    [08:14:16 VRB] Exec[0] (flags: RedirectStdout, RedirectStderr, Default): /usr/bin/sudo -v
    [08:14:16 DBG] Adding main (originally refs/heads/main) to telemetry
    [08:14:16 DBG] Adding main (originally refs/heads/main) to telemetry
    [08:14:16 VRB] Exec[0] exited 1
    Unhandled exception. Xamarin.Provisioning.Exec+ExitException: /usr/bin/sudo terminated with exit code 1
       at Xamarin.Provisioning.Exec.Run(ExecFlags flags, String command, String[] arguments) in /Users/runner/work/1/s/Provisionator/Exec.cs:line 297
       at Xamarin.Provisioning.ProvisioningScript.BrewPackages(BrewOptions options, String[] packages) in /Users/runner/work/1/s/Provisionator/ProvisioningScript_Brew.cs:line 104
       at Xamarin.Provisioning.ProvisioningScript.BrewPackages(String[] packages) in /Users/runner/work/1/s/Provisionator/ProvisioningScript_Brew.cs:line 23
       at Submission#0.<<Initialize>>d__0.MoveNext()
    --- End of stack trace from previous location ---
       at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)
       at Microsoft.CodeAnalysis.Scripting.Script`1.RunSubmissionsAsync(ScriptExecutionState executionState, ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, Func`2 catchExceptionOpt, CancellationToken cancellationToken)
       at Xamarin.Provisioning.ProvisioningScript.RunScriptAsync(String scriptContents, String scriptFile, CancellationToken cancellationToken) in /Users/runner/work/1/s/Provisionator/ProvisioningScript.cs:line 118
       at Xamarin.Provisioning.Entry.MainAsync(String[] args) in /Users/runner/work/1/s/Provisionator/Entry.cs:line 256
       at Xamarin.Provisioning.Entry.MainAsync(String[] args) in /Users/runner/work/1/s/Provisionator/Entry.cs:line 339
       at Xamarin.Provisioning.Entry.Main(String[] args) in /Users/runner/work/1/s/Provisionator/Entry.cs:line 60
    ##[error]The process '/Users/builder/azdo/_work/_tool/provisionator/0.2.635/x64/provisionator' failed with exit code null
2022-08-23 15:25:57 +02:00
dotnet-maestro[bot] 33172248c6
[main] Update dependencies from dotnet/runtime (#15586)
* Update dependencies from https://github.com/dotnet/runtime build 20220727.6

Microsoft.NETCore.App.Ref
 From Version 6.0.8 -> To Version 6.0.8

* Update dependencies from https://github.com/dotnet/runtime build 20220727.6

Microsoft.NETCore.App.Ref
 From Version 6.0.8 -> To Version 6.0.8

* Update dependencies from https://github.com/dotnet/runtime build 20220813.7

Microsoft.NETCore.App.Ref
 From Version 6.0.8 -> To Version 6.0.9

Dependency coherency updates

Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
 From Version 6.0.4 -> To Version 6.0.8 (parent: Microsoft.NETCore.App.Ref

* Update dependencies from https://github.com/dotnet/runtime build 20220815.11

Microsoft.NETCore.App.Ref
 From Version 6.0.8 -> To Version 6.0.9

Dependency coherency updates

Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
 From Version 6.0.4 -> To Version 6.0.9 (parent: Microsoft.NETCore.App.Ref

* Update dependencies from https://github.com/dotnet/runtime build 20220816.8

Microsoft.NETCore.App.Ref
 From Version 6.0.8 -> To Version 6.0.9

Dependency coherency updates

Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
 From Version 6.0.4 -> To Version 6.0.9 (parent: Microsoft.NETCore.App.Ref

* Update dependencies from https://github.com/dotnet/runtime build 20220819.3

Microsoft.NETCore.App.Ref
 From Version 6.0.8 -> To Version 6.0.9

Dependency coherency updates

Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
 From Version 6.0.4 -> To Version 6.0.9 (parent: Microsoft.NETCore.App.Ref

* [tests] Adjust InvalidRuntimeIdentifier_Restore to expect failure for Mac Catalyst.

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-08-23 15:03:30 +02:00
Mauro Agnoletti 6617121585
Fixed remote archiving with iOS app extensions (#15726)
- Fix AppExtensionReferences ItemSpec in Archive:
 when the build is a remote build, we need to fix the ItemSpec of the AppExtensionReferences items so it uses the build server path correctly

- Shorten temp directory for remote zip extractions to avoid long path potential conflicts

Fixes Feedbak Ticket issue: https://developercommunity.visualstudio.com/t/Xamarin-iOS-project-wont-archive-anymor/1587820
2022-08-23 12:21:17 +02:00