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

313 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena 0f35909d56
[RGen] First inclusion of a roslyn generator for the bindings. (#21389)
We are doing the following:

1. Adding the rgen directory with the following solutions:
* Analyzer: Analyzer that will catch errors in the bindings. At the
moment it provides a single error when the BindingTypeAttribute is used
in a nont partial type.
   * Analyzer Tests: Allows tests for the analyzer.
   * Analyzer Sample: Sample project to test the analyzer.
* Code Generator: A code generator that adds the BindingTypeAttribute to
the compilcation.
   * Code Generator Tests: Allows tests for the generator.
   * Code Sample: Sample project for the code generator.
2. Make rule to build the roslyn code generator.
3. Makefile changes to add the code generator as part as the second
compilation of the bindings.

This changes add the starting gounds to move to roslyn.

---------

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@soto.dev>
2024-10-15 14:56:09 -04:00
Rolf Bjarne Kvinge 9647b45ce4 Merge remote-tracking branch 'origin/net9.0' into merge-net9.0-into-main 2024-10-01 17:03:30 +02:00
Rolf Bjarne Kvinge b327bcc493
[tests] Remove mono-native logic. (#21312)
It's only for legacy Xamarin.
2024-10-01 01:03:06 +02:00
Rolf Bjarne Kvinge f634ea9b3c Merge remote-tracking branch 'origin/main' into dev/rolf/bump-main-in-net9.0-2024-09-18 2024-09-19 09:48:34 +02:00
Rolf Bjarne Kvinge d1d7e74f1f [tests] Skip the linker warning about -ld_classic going away in legacy Xamarin tests. 2024-07-09 10:22:36 +02:00
Rolf Bjarne Kvinge a46a61d50f [test] Ignore mmp test that doesn't work anymore.
It's not for a scenario we care for anymore anyways.
2024-02-28 12:09:27 +01:00
Rolf Bjarne Kvinge 9cd3e86ced [tests] Bump min OS versions in all tests. 2024-02-28 12:08:24 +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 2652f49694
Bump MSBuild.StructuredLogger to v2.2.100 (#19503)
Also store the version globally to avoid having to update so many places
in future bumps.
2023-11-28 15:15:29 +01:00
Rolf Bjarne Kvinge 673dd5782b [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-09-08 10:31:44 +02:00
Rolf Bjarne Kvinge bf8f54c2f2 [net8.0] Merge main into net8.0. 2023-09-01 15:00:32 +02:00
Rolf Bjarne Kvinge 6df0d4ae6c
Bump MSBuild.StructuredLogger to latest release. (#18701) 2023-08-29 13:26:42 +02: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 645ce96798 [net8.0] Merge main into net8.0. 2023-08-28 18:16:00 +02:00
Rolf Bjarne Kvinge d9405ff27c
[tests] Misc changes to make tests work/pass when .NET isn't enabled. (#18828) 2023-08-28 16:15:28 +02:00
Rolf Bjarne Kvinge 8ee6ec84c5 [mmp/tests] Set Xcode location for the aot tests. 2023-08-04 11:49:45 -04:00
Rolf Bjarne Kvinge e6e25497a0 [net8.0] Merge main into net8.0. 2023-06-05 10:54:13 +02:00
Steve Hawley 91daf664c4
[dotnet] Add to optimizations (#18387)
add redirect-class-handles to test output along with options

---------

Co-authored-by: Alex Soto <alex@soto.dev>
2023-06-01 22:04:33 -04:00
Rolf Bjarne Kvinge b8c7dc7dc3 [net8.0] Merge main into net8.0. 2023-05-11 11:54:37 +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 a97b7d5355 [net8.0] Merge main into net8.0. 2023-05-03 15:31:25 +02:00
Rolf Bjarne Kvinge 8e6104c497 [tests] Add a HotRestart version of the BundleStructure test. 2023-04-20 18:21:17 +02:00
Alex Soto db0b1ff52f Merge remote-tracking branch 'xamarin/main' into net8.0-main-merge 2023-04-05 15:25:09 -04:00
Rolf Bjarne Kvinge b24323fc0a [tests] Update BuildWithObjcArcFlag test to cope with breaking changes in Xcode 14.3. 2023-03-29 14:37:51 -04:00
dotnet-maestro[bot] 727a29d8c9
[net8.0] Update dependencies from dotnet/installer (#17518)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer
- **Subscription**: 9a2944cb-7dee-4bf2-a65c-08dabd10ae64
- **Build**: 20230306.1
- **Date Produced**: March 6, 2023 10:15:46 AM UTC
- **Commit**: 51e06f6931e859f56564556fa6ba519761fa7141
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-preview.2.23108.2 to 8.0.100-preview.3.23156.1][77]
  - **Microsoft.NET.ILLink.Tasks**: [from 8.0.0-preview.2.23107.1 to 8.0.0-preview.2.23127.4][78]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-preview.2.23107.2 to 8.0.0-preview.3.23127.13][79]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-preview.2.23107.1 to 8.0.0-preview.2.23127.4][78]
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-preview.2**: [from 8.0.0-preview.2.23081.3 to 8.0.0-preview.2.23113.1][80]

[77]: 5a84050...51e06f6
[78]: e71a4fb...2bdc3cb
[79]: cec7fbf...3265dc6
[80]: 1d9df33...d7ff0aa

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 8.0.0-preview.2.23107.1 to 8.0.0-preview.2.23127.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 8.0.0-preview.2.23107.2 to 8.0.0-preview.3.23127.13 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-preview.2.23107.1 to 8.0.0-preview.2.23127.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-preview.2**: from 8.0.0-preview.2.23081.3 to 8.0.0-preview.2.23113.1 (parent: Microsoft.NETCore.App.Ref)
2023-03-07 07:11:52 +01:00
Rolf Bjarne Kvinge b34f5ac088 [tests] Adjust an MMP test to handle a fixed warning now that we're building for a higher min OS version. 2023-02-02 16:30:30 +01:00
Rolf Bjarne Kvinge 94a3903df7 [tests] Bump min OS versions in all tests. 2023-02-02 16:30:28 +01:00
Rolf Bjarne Kvinge 6a5176ad50
Bump to MSBuild.StructuredLogger v2.1.758. (#17229)
To get new log format:

> System.NotSupportedException : Unsupported log file format. Latest
supported version is 14, the log file has version 15.
2023-01-16 07:32:45 +01:00
dotnet-maestro[bot] a361cc946a
[net8.0] Update dependencies from dotnet/installer (#16993)
This pull request updates the following dependencies

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 7.0.100-1.22564.1 to 8.0.100-1.23055.2 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 8.0.0-alpha.1.22558.5 to 8.0.0-alpha.1.23058.7 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-alpha.1.22559.2 to 8.0.0-alpha.1.23058.2 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100**: from 8.0.0-alpha.1.22554.1 to 8.0.0-alpha.1.22620.1 (parent: Microsoft.NETCore.App.Ref)

## From https://github.com/dotnet/installer
- **Subscription**: 9a2944cb-7dee-4bf2-a65c-08dabd10ae64
- **Build**: 20230113.2
- **Date Produced**: January 13, 2023 12:09:55 PM UTC
- **Commit**: e0284b3f3c72d8f21e4825ed1ac723d2e829d0a5
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-alpha.1.22605.6 to 8.0.100-alpha.1.23063.2][191]
  - **Microsoft.NET.ILLink.Tasks**: [from 7.0.100-1.22564.1 to 8.0.100-1.23055.2][192]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-alpha.1.22558.5 to 8.0.0-alpha.1.23058.7][193]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-alpha.1.22559.2 to 8.0.0-alpha.1.23058.2][194]
  - **Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100**: [from 8.0.0-alpha.1.22554.1 to 8.0.0-alpha.1.22620.1][195]

[191]: cbc7313...e0284b3
[192]: 13b8d6d...4b3f78c
[193]: 1bee0af...cefc6cc
[194]: dd7fdb7...5da4a9e
[195]: b6656f5...66b9845

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-01-13 22:53:10 +01:00
Rolf Bjarne Kvinge 4a819741f6
[tests] Parameterize the min OS version in a few mtouch tests. (#17035) 2022-12-14 21:44:36 +01:00
Rolf Bjarne Kvinge 1c80823582
[autoformat] Add all of tests/. (#16857) 2022-12-05 08:23:34 +01:00
Rolf Bjarne Kvinge 86da9cc115
[tests] Use a different identifier than '%...%' for replacement text. (#16762)
When the autoformatter runs into the '%...%' pattern in *.cs files, it
will re-format the text (to '% ... %'), but that breaks our text replacement
logic. So instead use a valid C# identifier as a replacement token, in which
case the autoformatter won't confuse our replacement logic.
2022-11-16 07:39:48 +01:00
Rolf Bjarne Kvinge 73101f2689
[msbuild] Fix dirty working copy with Errors.designer.cs. (#16404)
The Xamarin.MacDev.Tasks.sln solution is built with dotnet, while other projects
are still built with msbuild. This becomes a problem when generating Errors.designer.cs,
because depending on the runtime the output is different.

This means that the Errors.designer.cs will sometimes randomly change (depending
on which project re-generated the file), leaving the file modified in git. This is
quite annoying, but it also breaks the api comparison, which depends on the build
not leaving modified files behind. So for now, we generate Errors.designer.cs separately
for Xamarin.MacDev.Tasks.sln to not conflict with the mtouch version.

Also fix capitalization in numerous places to be consistent (it's Errors.designer.cs,
not Errors.Designer.cs).
2022-10-24 18:56:06 +02:00
Rolf Bjarne Kvinge 7df80a40da
[msbuild] Remove MS7068 so allow creating binding projects without native libraries. Fixes #15489. (#15926)
Fixes https://github.com/xamarin/xamarin-macios/issues/15489.
2022-09-13 17:40:43 +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
Manuel de la Pena f02a74af7d
[Tests] Bump Newtonsoft.Json version (#15329)
Bump the version to fix:

* https://github.com/xamarin/xamarin-macios/security/dependabot/1
* https://github.com/xamarin/xamarin-macios/security/dependabot/2

The dependency is in a tests, but this way we make the warning fo away.
2022-06-23 08:51:51 -04:00
Manuel de la Pena fae8c53bbf
[Tests] Add missing nuget. (#15313)
Tests work because other tests do use the nugets and gets picked up by
the runner. Yet, if we execute this projects witjout others, the tests
will fail when trying to use the nunit2 format.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-06-22 17:10:27 -04:00
Rolf Bjarne Kvinge 3be1d9d760
Use unix-style line endings in project files. (#15303)
This also removes the BOM in a few project files.

This is a whitespace-only change, as can be seen here: https://github.com/xamarin/xamarin-macios/pull/15303/files?w=1
2022-06-21 17:22:58 +02:00
Rolf Bjarne Kvinge 906b94cb00
[mmptest] Fix resolving paths to required test files. Fixes #xamarin/maccore@2560. (#14566)
* Fix resolving paths to required test files (test files can be found relative to the root path of the repository, not relative to where Xamarin.Mac is installed)
* Don't try to sign symlinks - we can end up trying to sign the target of the symlink twice simultaneously.
* Fix finding libxammac.dylib and Xamarin.Mac.dll when testing a system installation (when MAC_DESTDIR or TESTS_USE_SYSTEM are set).
* Remove a few .NET tests we don't need anymore.

Fixes https://github.com/xamarin/maccore/issues/2560.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-04-05 14:30:35 +02:00
Rolf Bjarne Kvinge 277baaf521
[tests] Request labels after each test from NUnit. (#14628)
Fixes this NUnit warning:

> labels=All is deprecated and will be removed in a future release. Please use labels=Before instead.

We don't follow the suggestion from the warning, because the advantage of
writing the label after each test is that the test result will also be
printed, which means it's possible to see if any tests failed during the test
run, as opposed to having to wait until the entire test run is completed
(which can take a while) to realize that pretty much every test failed with
some silly mistake which could have been quickly fixed before re-running the
tests.
2022-04-04 19:19:45 +02:00
Rolf Bjarne Kvinge ad1ece2694
[mmptest] Fix TESTS_USE_SYSTEM logic. (#14542)
As long as the variable is set, we're using the system installation for testing.
2022-03-29 15:45:42 -04:00
Rolf Bjarne Kvinge 174aca5b04
[tests] Simplify some logic in mmptest and msbuild tests. (#14400)
Use already existing logic in the Configuration class to find files on disk.

Also remove some dead code and use Path.Combine instead of string
concatenation to compute paths.

Fixes https://github.com/xamarin/maccore/issues/2553.
2022-03-14 20:43:49 +01:00
Manuel de la Pena e07b7bef79
[CI] Move tests outside of the build machine. (#14105)
Move the execution of tests to a diff bot to be compliant with the latests EO.
2022-03-10 23:36:37 -05:00
Rolf Bjarne Kvinge 14824b92b2
[tests] Simplify mmptest a bit by using existing mechanisms to create frameworks. (#13757) 2022-01-18 11:05:41 +01:00
Rolf Bjarne Kvinge a96c28b979
[msbuild] Call the generator using a response file. (#12756)
Fixes this warning:

> Xamarin.Shared.targets(992,3): warning MSB6002: The command-line for the "BTouch" task is too long. Command-lines longer than 32000 characters are likely to fail. Try reducing the length of the command-line by breaking down the call to "BTouch" into multiple calls with fewer parameters per call.
2021-09-20 07:40:57 +02:00
Rolf Bjarne Kvinge 2972e1b715
Fix some whitespace issues in various files. (#12399)
* Remove BOM
* Add EOL at end of file.
2021-08-11 10:06:46 +02:00
Sebastien Pouliot cffd57d681
[cecil] Update all package references to the latest 0.11.4 (#12379) 2021-08-09 10:18:16 -04:00
Alex Soto 7fb037c878
[main][mono] Bump mono to HEAD of 2020-02 to match android (#11716)
* [mono] Bump mono to HEAD of 2020-02 to match android

New commits in mono/mono:

* mono/mono@c633fe9238 [MSBuild] Update to vs16.10 branch (#21073)
* mono/mono@a01309d104 sdks: Use https for xamjenkinsartifacts llvm archive download
* mono/mono@6e079842a6 sdks: Disable parallelism for mxe llvmwin64 build
* mono/mono@28a101a8ab [2020-02] Fix leak in assembly-specific dllmap lookups (#21053)
* mono/mono@0449008883 [MonoIO] Wrap calls to open() in EINTR handling (#21042)
* mono/mono@51d876a041 [2020-02][System.Native] Handle ReadDir EINTR (#21029)
* mono/mono@581e5827f4 Bump corefx for credscan fixes (#21018)
* mono/mono@c90ec48f59 [arm64] Fix wrong marshalling in gsharedvt transition (#21006)

Diff: b4a385816e..c633fe9238

* [mmptests] Accommodate tests to take into account msbuild formating changes
2021-06-02 18:59:09 -04:00
dotnet-maestro[bot] 0d3ecfc065
[main] Update dependencies from dotnet/installer (#11747)
* Update dependencies from https://github.com/dotnet/installer build 20210530.2

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.6.21274.3 -> To Version 6.0.100-preview.6.21280.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.5.21271.1 -> To Version 6.0.100-preview.6.21277.2 (parent: Microsoft.Dotnet.Sdk.Internal

* Bump to MSBuild.StructuredLogger v2.1.500 to get support for log format v14.

* [tests] Skip code that needs System.ComponentModel.Composition or System.Json due to #11710.

Ref: https://github.com/xamarin/xamarin-macios/issues/11710

* [tests] Adjust logic to find MSBuild items after the last MSBuild.StructuredLogger update.

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-06-02 07:48:29 +02:00
Sebastien Pouliot 72a6d60d2b
[tests][dotnet] Bump MSBuild.StructuredLogger to 2.1.472 to fix ArgumentNullException in our tests (#11422) 2021-05-03 19:51:52 -04:00