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

17320 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge ab63fd4e6b
[CoreGraphics] Make P/Invokes in CGPDFDocument have blittable signatures. (#20283)
Contributes towards #15684.
2024-03-11 08:15:35 +01:00
Rolf Bjarne Kvinge 58e382efb7
[DeviceDiscoveryUI] Added bindings for DeviceDiscoveryUI. (#20271)
Follow-up of #15762.

---------

Co-authored-by: Israel Soto <issoto@microsoft.com>
2024-03-08 10:07:39 +01:00
Rolf Bjarne Kvinge e462d9ee6d
[src] Fix capitalization in a few APIs for XAMCORE_5_0. (#20281) 2024-03-08 10:02:00 +01:00
Rolf Bjarne Kvinge a5fc5c1a88
[runtime] Fix min OS versions in various compiler and linker arguments. (#20275)
Once upon a time we needed to special case a higher min OS version that the
min OS version we supported for certain compiler/linker arguments, because we
used features not supported in the min OS version we supported.

That time has passed; in all cases our min OS version is now higher than the
special-cased min OS versions passed to native compilers/linkers, so we can
just use the actual min OS version we support.
2024-03-08 07:26:41 +01:00
Rolf Bjarne Kvinge 2e55b4fe82
[CoreGraphics] Make P/Invokes in CGPDFDictionary have blittable signatures. (#20274)
Contributes towards #15684.
2024-03-08 07:25:24 +01:00
Rolf Bjarne Kvinge 560941d962
[msbuild] Make the level of parallelism configurable in all tasks that call Parallel.ForEach. Fixes #20210. (#20256)
This deduplicates some code, and also ensures we specifiy a max limit to the
level of parallelism. This fixes an issue in the AOTCompile and ScnTool tasks,
where we'd have no limit, launching as many subprocesses as tasks there are to
execute. In particular for the AOTCompile task, this can put a rather heavy
burden on build machines, slowing everything down to a crawl.

Fixes https://github.com/xamarin/xamarin-macios/issues/20210.
2024-03-07 11:15:21 +01:00
Rolf Bjarne Kvinge c897e9706d
[Foundation] Suppress trimmer warnings for certain Blocks members. (#20267)
Contributes towards #10405.
2024-03-07 11:14:53 +01:00
Rolf Bjarne Kvinge 9419def328
[tests] Adjust MessageHandlerTest.GHIssue16339 slightly. (#20264)
We've recently had a few test failures like this:

    MonoTests.System.Net.Http.MessageHandlerTest.GHIssue16339
     	[FAIL] GHIssue16339() :   IsSuccessStatusCode #1
       Expected: True
       But was:  False

which doesn't provide much info into what went wrong.

It turns out this particular assert for IsSuccessStatusCode is redundant,
because we assert on the exact StatusCode a bit later, and if that assert
fails, we'll know a bit more.

So just remove this redundant assert for IsSuccessStatusCode.
2024-03-07 11:13:21 +01:00
Rolf Bjarne Kvinge 3651eb1bcc
[tools] Fix indentation. (#20269) 2024-03-07 10:52:51 +01:00
Rolf Bjarne Kvinge 5bc88fa930
[CoreGraphics] Make P/Invokes in CGPDFArray have blittable signatures. (#20258)
Contributes towards #15684.
2024-03-07 10:22:26 +01:00
Rolf Bjarne Kvinge da56b7e123
[src] Fix unintentional xml doc comment. (#20252)
Fixes this compiler warning:

> warning CS1587: XML comment is not placed on a valid language element
2024-03-06 15:06:56 +01:00
Rolf Bjarne Kvinge 2842a7e8b4
[Foundation] Suppress trimmer warnings for NSObject.CreateNSObject. (#20254)
NSObject.CreateNSObject is trimmer-safe, we tell the trimmer(s) about any
types we'd want to create so they're all available.

Contributes towards #10405.
2024-03-06 10:39:33 +01:00
Rolf Bjarne Kvinge bd49d75695
[dotnet] Show a better error when using a .NET framework version we don't support yet. (#20255)
If a project tried to use a .NET 9 project (say TargetFramework=net9.0-ios), then
we used to show these rather unhelpful errors:

    error NETSDK1147: The target platform identifier ios was not recognized.

The underlying problem is that we don't support .NET 9 yet, so with this fix we now show:

    error NETSDK1202: The current .NET SDK does not support targeting .NET 9.0. Either target .NET 8.0 or lower, or use a version of the .NET SDK that supports .NET 9.0. Download the .NET SDK from https://aka.ms/dotnet/download

which is much more helpful.

This is accomplished by loading our workload even when using newer .NET
versions we don't support, because the .NET build logic will show the better
error later on.
2024-03-06 10:39:10 +01:00
Rolf Bjarne Kvinge a65d5390e3
[CoreGraphics] Make P/Invokes in CGRect/CGPoint/CGSize have blittable signatures. (#20246)
Contributes towards #15684.
2024-03-06 08:14:11 +01:00
Rolf Bjarne Kvinge 8cfbe6fac6
[src] Propagate the [CCallback] and [BlockCallback] attributes to generated code. (#20225)
The generator needs these attributes in certain cases when a third-party library implements a protocol that subclasses a platform protocol where members of the platform protocol has members with parameters with these attributes.

That's a rather long sentence: in fact there are fewer words in the test verifying this behavior!
2024-03-05 09:14:14 +01:00
Rolf Bjarne Kvinge 6fd2189274
[CoreGraphics] Make P/Invokes in CGImage have blittable signatures. (#20229) (#20237)
Contributes towards #15684.
2024-03-05 09:10:54 +01:00
Rolf Bjarne Kvinge 11f676c148
[msbuild] Make the level of parallelism in the codesign task configureable. (#20242)
We currently have an issue with codesigning duplicated files in parallel
(#20193). The proper fix is somewhat complex, so this implements a simple
workaround for customers, where they can just disable parallelism if they run
into this problem (and since it's simple, it's easier to backport too).

Additionally, it's not a bad idea to be able to configure the level of parallelism.

Ref: #20193.
2024-03-05 09:08:10 +01:00
dependabot[bot] 6666537776
Bump peterjgrainger/action-create-branch from 2.4.0 to 3.0.0 (#20241)
Bumps
[peterjgrainger/action-create-branch](https://github.com/peterjgrainger/action-create-branch)
from 2.4.0 to 3.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/peterjgrainger/action-create-branch/releases">peterjgrainger/action-create-branch's
releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<p>Change node 16 to node 20 fixes <a
href="https://redirect.github.com/peterjgrainger/action-create-branch/issues/394">#394</a></p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peterjgrainger/action-create-branch/compare/v2.4.0...v3.0.0">https://github.com/peterjgrainger/action-create-branch/compare/v2.4.0...v3.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="10c7d26815"><code>10c7d26</code></a>
update to node 20</li>
<li>See full diff in <a
href="https://github.com/peterjgrainger/action-create-branch/compare/v2.4.0...v3.0.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peterjgrainger/action-create-branch&package-manager=github_actions&previous-version=2.4.0&new-version=3.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 12:54:47 -05:00
dotnet-maestro[bot] 64fbafd564
[main] Update dependencies from dotnet/xharness (#20240)
This pull request updates the following dependencies

## From https://github.com/dotnet/xharness

- **Subscription**: 601bc5e1-1cae-44b5-cf5f-08db9342aa2f
- **Build**: 20240229.1
- **Date Produced**: February 29, 2024 1:41:23 PM UTC
- **Commit**: 9649ddab48b3795a49c6b51ccf588d56ca4be4e5
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.DotNet.XHarness.iOS.Shared**: [from 9.0.0-prerelease.24119.1 to 9.0.0-prerelease.24129.1][1]

[1]: 8aa2a4cb80...9649ddab48
2024-03-04 18:45:45 +01:00
Manuel de la Pena 722e2e7283
[CI] Sometimes we have issues when installing the profiles. (#20234)
We have sometimes issues with the network when trying to install the
profiles, for example build
https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=9172524

We add a retry to that the tests do not fail due to a network issue.
2024-03-04 11:40:35 -05:00
Rolf Bjarne Kvinge d019599aa5
[tests] Show the binlog we failed to parse. (#20233)
This makes it easier to find it on disk when something goes wrong.
2024-03-04 11:17:54 +01:00
Rolf Bjarne Kvinge 68d63874d1
[CoreGraphics] Make P/Invokes in CGImage have blittable signatures. (#20229)
Contributes towards #15684.
2024-03-04 10:08:01 +01:00
Manuel de la Pena b97a04df81
[CI] Use the APIScan dedicated pool. (#20227)
We have split the workloads in two pools:

1. VSEngSS-MicroBuild2022-1ES - Signing dedicated.
2. MAUI-1ESPT - APIScan dedicated.

This allows to manage machines better and we could request better
machines if needed for APIScan.
2024-03-01 15:47:49 -05:00
Rolf Bjarne Kvinge 499833ffbe
[msbuild] Don't create output files for files we already copy in CreateBindingResourcePackage. (#20221)
If we copy a file back to Windows during the remote build, we don't want to
also create the output file, because then we'll just replace the file we
copied with a zero-length version.
2024-03-01 16:09:40 +01:00
Rolf Bjarne Kvinge 8ce05745ae
[msbuild] Make the GetFileSystemEntries task actually cancellable. (#20209)
* Enumerate files and directories instead of fetching them all in one go. This
  is more efficient when there are a lot of files and directories to process,
  but most importantly it'll also make enumeration cancellable.
* Stop enumerating if cancellation was requested.
* Add a few logging statements.

This might at least help to get better diagnostic information if for some
reason this task takes too long to execute. Ref: #20183.
2024-03-01 11:38:00 +01:00
Rolf Bjarne Kvinge a8a0132b56
[tests] Make the 'run-tests' and 'run-unit-tests' targets equivalent. (#20223)
I keep forgetting which makefile / test suite uses which run-* target, so just
make both work everywhere.
2024-03-01 09:54:33 +01:00
Rolf Bjarne Kvinge 1e6038c51e
[msbuild] Copy extracted files from the DecompressXpcServices target back to Windows. (#20219)
The extracted files show up in the build later on, and if only the 0-length
mirror file exists on Windows, it'll be copied as such to the Mac, producing
incorrect build results.
2024-03-01 07:53:22 +01:00
Rolf Bjarne Kvinge ca4baec9bc
[tests] Add test to verify that all our public APIs are documented. (#20213)
Of course all our public APIs aren't documented, so there's a *huge* list
of known failures.

But at least this way we won't add more undocumented APIs by accident
(although new APIs will show up every time we add more bindings, in particular
in Xcode season).

---------

Co-authored-by: Haritha Mohan <harithamohan@microsoft.com>
2024-03-01 07:53:06 +01:00
Rolf Bjarne Kvinge 943ebaffd5
[msbuild] Add a check for actually having anything to AOTCompile. (#20206)
This particular condition shouldn't happen, but occasional build errors in the
wild (with exception stack traces) seem to indicate otherwise, so be a bit
defensive here.
2024-03-01 07:52:30 +01:00
Rolf Bjarne Kvinge 45be3291d3
[bgen] Re-generate the codebehind for the resources during normal build. (#20226)
Re-generate the codebehind for the resources during normal build, and not
depend on an IDE to do it.
2024-03-01 07:50:27 +01:00
Rolf Bjarne Kvinge 7b882a214c
[CoreGraphics] Make P/Invokes in CGFunction have blittable signatures. (#20220)
Contributes towards #15684.
2024-03-01 07:45:44 +01:00
Rolf Bjarne Kvinge 98dbc10d27
[msbuild] Try to provide some better diagnostics if we fail to compute remote generator properties. (#20218) 2024-03-01 07:45:17 +01:00
Rolf Bjarne Kvinge 929332306e
[CoreGraphics] Make P/Invokes in CGEvent have blittable signatures. (#20211)
Contributes towards #15684.
2024-02-29 09:54:56 +01:00
Yauheni Pakala 6ef7d9c0f9
NSUrlSessionHandler: Rewind request content to the start before sending (#16341)
Fixes #16339

---------

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-02-28 18:12:06 +01:00
Rolf Bjarne Kvinge ca562147e8
[maestro] Fix macOS version in subscription. (#20214) 2024-02-28 18:05:24 +01:00
Rolf Bjarne Kvinge c303a9c7c7
[dotnet] Multi target with Xcode 15.0 (#20155)
Add multi-targeting support for our initial .NET 8 packs (for Xcode
15.0).

This means a library/binding project can do:

```xml
<TargetFrameworks>net8.0-ios17.0;net8.0-ios17.2</TargetFrameworks>
```

and the library will be built in two varieties: once using our iOS 17.0
bindings, and once using our iOS 17.2 bindings.

An app project can also do:

```xml
<TargetFramework>net8.0-ios17.0</TargetFramework>
```

to build with the iOS 17.0 bindings (which is typically not very useful,
since building with the latest iOS SDK is usually best).
2024-02-28 09:03:53 +01:00
Rolf Bjarne Kvinge ffb3041720
[src] Disable a few code paths on macOS if dynamic registration is disabled. (#20178)
This makes the linker able to trim away a few methods that aren't trim-safe
when using the managed static registrar (and thus not warn about these methods
doing un-trimmable stuff).

Contributes towards #10405.
2024-02-28 09:01:24 +01:00
Rolf Bjarne Kvinge 90992e464b
[CoreGraphics] Make P/Invokes in CGContext have blittable signatures. (#20207)
Contributes towards #15684.
2024-02-28 08:59:24 +01:00
Rolf Bjarne Kvinge 69bb4ac1fb
[CoreGraphics] Make P/Invokes in CGColorSpace have blittable signatures. (#20202)
Contributes towards #15684.
2024-02-27 11:33:40 +01:00
dotnet-maestro[bot] ea68a2e73e
[main] Update dependencies from dotnet/xharness (#20201)
This pull request updates the following dependencies

## From https://github.com/dotnet/xharness

- **Subscription**: 601bc5e1-1cae-44b5-cf5f-08db9342aa2f
- **Build**: 20240219.1
- **Date Produced**: February 19, 2024 5:55:30 PM UTC
- **Commit**: 8aa2a4cb80000ebb46ee61cd6ac29b2e63ebe87c
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.DotNet.XHarness.iOS.Shared**: [from 9.0.0-prerelease.24112.4 to 9.0.0-prerelease.24119.1][1]

[1]: 11ae3663fe...8aa2a4cb80
2024-02-27 08:29:09 +01:00
Haritha Mohan 4409a06e73
[dotnet] Fix sourcelink test failure (#20205)
Follow up to https://github.com/xamarin/xamarin-macios/pull/20054
2024-02-27 08:28:34 +01:00
Haritha Mohan 297f12d141
[dotnet] add sourcelink support (#20054)
Fixes https://github.com/xamarin/xamarin-macios/issues/18968

We provide a mapping to the checked in source files via SourceLink.json
and the rest of the generated/untracked sources are embedded into the
PDB to provide a more comprehensive debugging experience. Since we
invoke CSC directly, there were a few workarounds that had to be
implemented (ex: implementing a helper script to account for untracked
sources instead of simply using the EmbedUntrackedSources MSBuild
property).

As for testing, the newly added support was validated via the dotnet
sourcelink tool which confirmed all the sources in the PDB either had
valid urls or were embedded.

`sourcelink test Microsoft.MacCatalyst.pdb` —> `sourcelink test passed:
Microsoft.MacCatalyst.pdb`

The PDB size does increase in size after embedding;
Microsoft.MacCatalyst.pdb went from 5 MB to 15.7 MB.

But considering it would significantly help improve the debugging
experience, be consistent with Android’s offerings, and it’s a
highlighted attribute on the NuGet package explorer I think it’s a
worthy size increase.

Refs:
https://github.com/xamarin/xamarin-android/pull/7298 
https://github.com/dotnet/roslyn/issues/12625
https://github.com/dotnet/sourcelink/tree/main/docs

---------

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Michael Cummings (MSFT) <mcumming@microsoft.com>
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2024-02-26 08:10:26 -08:00
Manuel de la Pena caf8517651
[CI] Retry the installation of products. (#20194)
Mono does give issues we should retry before we fail.
2024-02-26 10:43:34 -05:00
Rolf Bjarne Kvinge 4224f8473c
[GitOps] Fix syntax to reference the author. (#20199) 2024-02-26 15:53:22 +01:00
Rolf Bjarne Kvinge 78ae4b0686
[AudioUnit] Make P/Invokes in AudioComponent.cs have blittable signatures. (#20146)
Contributes towards #15684.
2024-02-26 12:16:17 +01:00
Rolf Bjarne Kvinge a164c1fb18
[devops] Don't set any pending/success/failure statuses. (#20184)
DevOps automatically sets statuses as the pipeline progresses, so we
don't have to.

This fixes a problem where we'd have multiple statuses for each thing we
do:

![Screenshot 2024-02-22 at 18 09
42](https://github.com/xamarin/xamarin-macios/assets/249268/c49c3a08-9f7e-45d9-a662-64022b120643)

Note how the macOS .NET tests have two statuses, one pending and one
failure. This is because it failed once (thus the failure), and was then
rerun (thus pending). This has a few issues:

1. The statuses don't match... which can be confusing. Are we running or
did we fail? YES! 🤔
2. We have more than one status for each thing, which is redundant.

So just don't add our own statuses, because Azure DevOps will.

Note that we still add statuses with package links.
2024-02-23 19:33:16 -05:00
Rolf Bjarne Kvinge 42c9f3143d
[devops] Include the stage attempt in the artifact name for uploaded (bin)logs. (#20189)
The stage attempt number increases every time the entire stage is rerun
(which
must happen for the Windows tests stage for instance, but can happen for
other
stages as well).
2024-02-23 19:32:56 -05:00
Manuel de la Pena a6b734d1a4
[CI] Bump AzureFileCopy task version. (#20192)
We have had a few errros when performing the upload with the old version
of the task. Bump to the new own to see if it is more stable.
2024-02-23 17:18:41 -05:00
Rolf Bjarne Kvinge 8f868e6667
[devops] Move the reporting of test results to a separate stage. (#20011)
This paves the way for collecting test results from multiple stages (and
eventually we'll have a single GitHub comment with all the test results,
instead of multiple comments like we have now).
2024-02-23 16:42:41 +01:00
dotnet-maestro[bot] e7fc1ade00
[main] Update dependencies from xamarin/xamarin-macios (#20187)
This pull request updates the following dependencies

## From https://github.com/xamarin/xamarin-macios

- **Subscription**: 3ba82e10-e94b-4c1c-df8b-08dc11e0730b
- **Build**: 20240223.1
- **Date Produced**: February 23, 2024 10:19:11 AM UTC
- **Commit**: 10030635dc
- **Branch**: refs/heads/release/7.0.3xx

- **Updates**:
  - **Microsoft.iOS.Sdk**: [from 16.4.7140 to 16.4.7141][4]

[4]: ed1726f6e8...10030635dc
2024-02-23 16:40:40 +01:00