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

15249 Коммитов

Автор SHA1 Сообщение Дата
Emanuel Fernandez Dell'Oca 33512be08d
Update Xamarin.Messaging to 1.9.17 (#17501)
Co-authored-by: Mauro Agnoletti <mauro.agnoletti@gmail.com>
2023-02-10 22:40:08 +01:00
Manuel de la Pena 1ab1e27fc5
[Generator] Refactor frameworks and enable nullability. (#17454)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-10 12:48:55 -05:00
Manuel de la Pena ab61de421f
[Generator] Move MemberInformation out of the generator and enable nullability. (#17448) 2023-02-09 12:17:59 -05:00
github-actions[bot] 6bd26fad0a
[Localization] Pulling New Localization Translations - Unknown GithubRunID (#17442)
Automated PR. Bring new translated changes in the lcl files for
OneLocBuild to create translated resx files.

Co-authored-by: CSIGS <csigs@outlook.com>
2023-02-09 10:11:55 -06:00
Rolf Bjarne Kvinge 8efc00aa01
[src] Create XML documentation when building our platform assemblies for .NET. Fixes #17395. (#17476)
Also fix XML comments to be valid and not produce compiler warnings.

Unfortunately XML comments can't be conditionally compiled
(https://github.com/dotnet/csharplang/discussions/295), so we have to 
duplicate a lot of content that is just slightly different.

Fixes https://github.com/xamarin/xamarin-macios/issues/17395.
2023-02-09 09:24:08 +01:00
Steve Hawley 1a9e9be626
[dotnet] address book pinvokes (#17419) 2023-02-08 12:02:06 -05:00
Manuel de la Pena d8d17f20ab
[Generator] Move WrapPropMemberInformation out an enable nullability. (#17437) 2023-02-08 11:55:29 -05:00
Mauro Agnoletti 8b0763b568
[win] Add Hot Restart define constant in a target instead of an evaluation property (#17470)
This is needed in order to read the correct value of the
"IsHotRestartBuild" property set by the VS extension. Doing it in a
PropertyGroup at evaluation was not getting the correct value since it
was not being set as an MSBuild global property

This PR is related to this other one in the XVS extension:
https://github.com/xamarin/XamarinVS/pull/13612
2023-02-08 09:47:24 +01:00
Mauro Agnoletti 7f7942eae0
Imports the .user.env file if exists and the build is from VS (#17466)
This will allow the latest runtime identifier values to be evaluated in time during the MSBuild property evaluation phase.

Related and dependent of this PR: https://github.com/xamarin/XamarinVS/pull/13606
2023-02-08 09:37:39 +01:00
Rolf Bjarne Kvinge 8fbf227abb
[src] Unify build code for .NET platforms. (#17445)
Use a make template for the build logic for our platform assemblies, so that we don't
unintentionally have slightly different build code for different platforms (especially
when making changes to the build this way ensures that we make the same change on all
platforms).

This also makes the code significantly shorter, and will make it easier to add more
platforms in the future if we ever need that.
2023-02-08 07:56:49 +01:00
Rolf Bjarne Kvinge afb6505f8c
[tests] Bump Microsoft.NET.Test.Sdk version to latest stable. (#17462)
The older version of Microsoft.NET.Test.Sdk depends on an older version of
Newtonsoft.Json, which triggers automated security warnings.

Ref: https://devdiv.visualstudio.com/DevDiv/_componentGovernance/113130/alert/7090885?typeId=12169115
2023-02-07 14:52:45 +01:00
Manuel de la Pena ea91fd23c7
[Generator] Move IMemberGatherer out and enable nullability. (#17436) 2023-02-07 06:11:47 -05: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
Rolf Bjarne Kvinge 13f51fb583
[tests] Add another failure scenario to random network test failures in CI. (#17439) 2023-02-07 07:22:09 +01:00
Rolf Bjarne Kvinge 6a372f5bb3
[src] Remove workaround for a Mono bug that's been fixed in .NET 7+. (#17452)
Ref: https://github.com/xamarin/xamarin-macios/pull/14803
Ref: https://github.com/dotnet/runtime/pull/68265
2023-02-07 07:17:38 +01:00
Manuel de la Pena 589e99259f
[Generator] Clean btouch null code and remove not needed imports. (#17459) 2023-02-06 21:09:17 -05:00
Manuel de la Pena a53585ea0a
[CI] Skip the insertions when not needed in the unified pipeline. (#17455) 2023-02-06 21:06:51 -05:00
Manuel de la Pena 961c0e5b5b
[Generator] Move GeneratedTypes out and enable nullability. (#17435)
Moved the code out, also made a small improvement by reducing the number
of lookups are needed to get the GeneratedType.
2023-02-06 18:01:29 -05:00
Manuel de la Pena 59aebf259c
[CI] Remove the translations from the main stage. (#17453)
The tramslations are meant to be done per week using the cron job. The
cron job does not use the main stage template, ergo we can simplify the
stage by removing the translations.
2023-02-06 16:07:30 -05:00
Manuel de la Pena 84b3e3e09d
[Generator] Move GeneratedType out and enable nullability. (#17434)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-06 11:19:15 -05:00
Rolf Bjarne Kvinge 367f0a5c13
[src] Fix a few inconsistencies in obsolete attributes. (#17447)
* Add obsolete attributes for all platforms.
* Make sure the same obsolete message is used on all platforms.
* Fix a few typos.

There are many more APIs to fix (as evidenced by the fact that this only
removes a few known failures), but this is how far I've gotten right now.
2023-02-06 08:49:00 +01:00
Rolf Bjarne Kvinge 60fbd4d37e
[runtime] Remove native usage of MonoReferenceQueue and use a ConditionalWeakTable in managed code instead. (#17429)
This makes it possible to simplify and remove a good chunk of related code.

Especially for CoreCLR this should be a minor perf improvement, because we'll do fewer transitions between managed and native code.
2023-02-06 07:57:51 +01:00
Haritha Mohan c814120173
[ImageCaptureCore] Add missing binding (#17424)
Deprecated "cameraDevice:didReceiveThumbnailForItem:" for macOS and
macCatalyst platforms and added updated binding for
"cameraDevice:didReceiveThumbnail:forItem:error:" method.

Refs:
[Deprecated
method](https://developer.apple.com/documentation/imagecapturecore/iccameradevicedelegate/1507941-cameradevice?changes=la_5&language=objc)
[Updated
method](https://developer.apple.com/documentation/imagecapturecore/iccameradevicedelegate/3142895-cameradevice?changes=la_5&language=objc)
2023-02-03 17:46:05 -08:00
Manuel de la Pena 980cdc6f52
[Generator] Move TrampolineInfo out, enable nullability. (#17433) 2023-02-03 12:53:41 -05:00
Rolf Bjarne Kvinge 6d36bf1c1b
[cecil-tests] Add more availability attribute checks. (#17430)
Also fix a few issues:

* Fix an issue with replicating availability attributes with a third digit.

  The third version number is 'Build', not 'Revision' (which is fourth), so
  adjust our code accordingly.

  This fixes an issue where the copy of 'macos10.15.4' would become
  'macos10.15' and we'd lose the third number.

* Fix an issue when generating filter code. We were using the wrong type as
  the target (inlined) type, resulting in the wrong availability attributes
  getting created sometimes.
2023-02-03 16:44:01 +01:00
Rolf Bjarne Kvinge 03025a7026
[src] Standardize a few variable names between platforms. (#17428)
* The APPLETLS_DEFINES variable is never set, so just remove it.
* Use MACOS_ as the platform prefix for macOS instead of MAC_.
* Stopped passing the same argument twice (this often happened for -inline-selectors).
* Use the same pattern for all platforms for: <PLATFORM>_DEFINES, <PLATFORM>_CORE_DEFINES,
  <PLATFORM>_GENERATOR_FLAGS.

Note that there are many inconsistencies left, but I prioritized those affecting
.NET code, since legacy Xamarin code will be removed in a not so distant future.
2023-02-03 16:31:09 +01:00
Andoni Morales Alastruey 97ab14801f
[dotnet] Add support for .so files (#16887)
Autotools-based project using libtool's -module flag generate plugins
with the .so extension that needs to be treated like DynamicLibraries in
terms of deployment location and relocation, except they are not linked
to the app.

This PR adds support for such .so files: they're treated as .dylib files, except
that they're not linked to the app.
2023-02-03 09:16:40 +01:00
TJ Lambert 7798c7c5f1
[Localization] Add flag to change line endings (#17422)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2023-02-02 13:27:31 -05:00
Manuel de la Pena cb5cb2801a
[Generator] Move away from the generator-* pattern and use bgen src (#17426)
A clean up is needed in the generator. We have src/bgen. We can use it
to move all the generator code there and make or work easier moving fwd.
2023-02-02 11:27:07 -05:00
Rolf Bjarne Kvinge ebeaa3b215
[src] Unify the list of warnings we skip. (#17425)
The code to handle (and ignore) warnings was getting out of hand, so I've
unified it between all platforms. We now ignore the same warnings on every
platform, and have much fewer variables to reason about.
2023-02-02 08:58:43 +01:00
Haritha Mohan 38a1a18d3b
[AppKit] Add missing setter for generateMipmaps in NSView (#17416)
Fixes #17383
2023-02-01 23:14:23 -08:00
Rolf Bjarne Kvinge 3e9e6a39db
[cecil-tests] Fix check for unsupported attribute on API that's present in an assembly. (#17423)
This also required fixing a few issues with the availability attributes.
2023-02-02 07:37:56 +01:00
Rolf Bjarne Kvinge 882db3657d
[tests] Remove workaround for issue #14802. (#17421)
Seems like this is fixed now.
2023-02-02 07:30:16 +01:00
Manuel de la Pena 0f39b2579f
[Tests] Fix some null warnings in the generator tests. (#17420)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-01 16:21:51 -05:00
Manuel de la Pena 98faaf35b6
[Generator] Refactor marshal info and enable nullability. (#17413) 2023-02-01 15:52:40 -05:00
Rolf Bjarne Kvinge 47a387f670
Add support for Visual Basic projects. (#17409)
* Add props and targets files for Visual Basic.
* Add templates for Visual Basic projects.
* Misc other related changes.

This contributes towards https://github.com/xamarin/xamarin-macios/issues/17321.
2023-02-01 21:20:14 +01:00
Rolf Bjarne Kvinge 33bd311736
[xtro] Add ImageCaptureCore to the frameworks we process. (#17417)
Since we already have some ImageCaptureCore bindings.
2023-02-01 21:13:08 +01:00
Rolf Bjarne Kvinge 614a16a358
[autoformat] Fix line endings for localization output. (#17407)
Ref: https://github.com/xamarin/xamarin-macios/pull/17403
2023-02-01 16:59:42 +01:00
Manuel de la Pena 09a5631bc3
[Generator] Refactor NamespaceManager to its own location. (#17404)
Move the class to its own file to simplify changes and code review.
Enable nullability in the class.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-02-01 10:00:08 -05:00
Rolf Bjarne Kvinge 52d298b4aa
[AppKit] Enable nullability in NSHost. (#17414)
* Enable nullability in NSHost, and fix misc issues.
* Add an explicit interface overload for IEquatable<NSHost>.Equals. Fixes this compiler warning:

    error CS8767: Nullability of reference types in type of parameter 'host' of 'bool NSHost.Equals(NSHost host)' doesn't match implicitly implemented member 'bool IEquatable<NSHost>.Equals(NSHost? other)
2023-02-01 11:11:39 +01:00
Manuel de la Pena 488efbe01a
[AppKit] Remove nullability warning. (#17411)
Maybe a bad merge or we missed it.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Haritha Mohan <110641567+haritha-mohan@users.noreply.github.com>
2023-01-31 20:16:20 -05:00
Manuel de la Pena f02135887b
[Generator] Refactor extension methods and fix bug. (#17406)
Moved the extension methods to their own file and enabled nullable.

Fixed the following underlying bug:

The extension method that creates a valid parameter named does not do
the right thing in the following cases:

1. When the starting illegal char is NOT a number. It will prepend @
fixing nothing. Example " OHOH" to "@ OHOH"
2. When the illegal chars is in the middle of the param name. Example
"OH OH" to "@OH OH"

I have fixed the method to return null in those ocassions (we will need
to enable nullability later in the generator, is too much for this PR).
Tests have been added to ensure we do not have such an issue again.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-01-31 16:05:25 -05:00
Manuel de la Pena 8682ff8d56
[CI] Remove yaml lint issue. (#17412) 2023-01-31 16:01:48 -05:00
Manuel de la Pena 28d519df9b
[Generator] Remove dead code. (#17405)
Everything compiles as expected and we do have:
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/value-tuples
2023-01-31 11:06:06 -05:00
Steve Hawley 8266659ddb
[dotnet] audiotoolbox blittable pinvokes with delegates (#17388)
AudioToolbox changes to make the pinvokes blittable.
2023-01-31 10:29:19 -05:00
Rolf Bjarne Kvinge 1350683690
[src/generator] Stop implying Mac Catalyst availability attributes from the iOS attributes. (#17375)
Stop implying Mac Catalyst attributes from the iOS attributes, and instead
treat Mac Catalyst like all the other platforms (not implying anything from
any other platform).

This makes our attribute logic much easier to reason about and understand.

It also required adding numerous Mac Catalyst attributes that were previously
implied. This task was way too big to do manually, so I made some changes to
Chris' mellite tool, and managed to do it quite easily with Roslyn with the
changes in this branch: https://github.com/rolfbjarne/mellite/tree/explicit-maccatalyst-attributes
2023-01-31 14:51:53 +01:00
Rolf Bjarne Kvinge e0d64e8f61 [msbuild] Add props and targets files for Visual Basic.
These are just the C# versions changed just enough to use Visual Basic instead of C#.
2023-01-31 13:20:19 +01:00
Rolf Bjarne Kvinge eb7914cfc2 [tests] Update the .NET template tests.
* Make these tests be able to build Visual Basic templates.
* Add the new Visual Basic templates.
2023-01-31 13:01:46 +01:00
Rolf Bjarne Kvinge ecbdf18ec1 Add editorconfig entries for Visual Basic. 2023-01-31 13:14:46 +01:00
Rolf Bjarne Kvinge bd74a1c266 [dotnet] Copy localizations from C# templates to the Visual Basic templates. 2023-01-31 13:04:41 +01:00