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

9 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 0140122668
[autoformat] Add the Security, SensorKit, Social, SpriteKit, StoreKit, SystemConfiguration, TVServices, VideoToolbox, Vision and WKWebKit frameworks. (#16763) 2022-11-16 07:38:18 +01:00
TJ Lambert 4f1ad9cb18
[sensorkit] Add nullability to (generated and manual) bindings (#14881)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-05-04 11:43:54 -05:00
Chris Hamons 1dcefc9c56
[NET Attribute Conversion][generator] Generate NET style attributes (#14779)
This PR teaches our code generator to generate .NET 6 style availability attributes, adds a 4th Cecil test to verify our generated attributes, and a metric ton of API changes to satisfy that test.

The generator work is the core of this PR, and includes:

- Hacking out chunks of generator.cs that "helpfully" remove duplicate attributes, which are no longer duplicate in the new order that NET6 attributes force upon us. See changes in FilterMinimumVersion and PrintPlatformAttributes
- Prevent a crash when the generator processes availability attributes with no version included (example: introduced on iOS but no version). See Is64BitiOSOnly.
- The meat, GetPlatformAttributesToPrint, which synthesizes many attributes "out of thing air" from:
        - The parent context
        - Implied introduced just because the class exists on a given framework at all
        - Implied Catalyst because iOS exists
- A few cludgy hacks PrintPlatformAttributesNoDuplicates and GenerateProperty because the existing PrintPlatformAttributes did not pass down parent context down, and the refactor was dangerous/too time consuming given time pressure.

There are two intended API changes introduced by the reviews in this PR:

- GetCurrentInputDevice was obviously intended by availability attributes to exist on Catalyst but due to define confusion was excluded. It is an addition in Microsoft.MacCatalyst.dll only.
- The NEAppRule constructors were mis-marked on platforms, and were showing up incorrectly on Mac/Catalyst. I corrected the Catalyst one unconditionally, as we have not shipped Catalyst yet, but Mac is only fixed in NET6.

There is a lot of follow up work in https://github.com/xamarin/xamarin-macios/issues/14802 to do to remove a number of hard coded test failures, but this should be almost all of the remaining work in NET6 attributes.

🤞 this doesn't break too much for future us.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-05-02 09:44:25 -05:00
Rolf Bjarne Kvinge 9e5113a7b9
[src] Add a global namespace using for a couple of namespaces. (#14356)
Also remove all the 'using System.Runtime.Versioning;' statements everywhere.
2022-03-10 08:07:54 +01:00
Steve Hawley bdbee30f1d
[NET Conversion] SensorKit (#14032)
* Remove existing attributes

* Attribute Conversion
2022-02-03 09:31:20 -05:00
Sebastien Pouliot 0373f77bb3
[dotnet] Add `[Uns|S]upportedOSPlatformAttribute` to manual bindings (part 1) (#11230)
Once complete the `LegacyAttributes` can be enabled in introspection to
ensure no old attributes are introduced.
2021-04-16 15:05:02 -04:00
Rolf Bjarne Kvinge 9a0cd6182b
[introspection] Add/fix/remove availability attributes for Mac Catalyst to make introspection's Introduced test pass. (#10587)
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
2021-04-13 15:48:20 -04:00
Sebastien Pouliot 11aafadd86
[intro] check for duplicate or inconsistent availability attributes (#9825)
This can easily happen when existing type(s) or framework are added to a platform. E.g.

```csharp
[Watch (6,0)][iOS (9,0)]
interface AVFoo {
   [Watch (6,0)][iOS (13,0)]
   void NewMember ();
}
```

Here we have duplicate attributes and, while not confusing, it does mean extra (and non required) metadata into the platform assemblies.

```csharp
[Watch (6,0)][iOS (9,0)]
interface AVFoo {
   [Watch (5,0)][iOS (13,0)]
   void NewMember ();
}
```

Here we declare a member as available when the type is not. I'm not sure how the IDE will react - but this should be audited since one of them is wrong (whatever the IDE behaviour is).

Fix https://github.com/xamarin/xamarin-macios/issues/6856
2020-10-13 14:16:33 -04:00
Sebastien Pouliot f36b2ae7b8
[sensorkit] Update for Xcode 12 beta 2 (#9142) 2020-07-21 13:12:51 -04:00