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

234 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 76b69ffa13
[bgen] Add support for NSNumber as the underlying type for Objective-C fields. (#21018) 2024-08-14 13:43:31 +02:00
Rolf Bjarne Kvinge 26ede64161
[tests] Make the generator tests in the Makefile use the locally installed Xamarin.iOS/Xamarin.Mac. (#20821) 2024-07-08 18:30:36 +02:00
Rolf Bjarne Kvinge e9d59d5f58
[bgen] Implement support for using default interface members to bind protocols. (#20681)
Given the following API definition:

```cs
[Protocol]
public interface Protocol {
    [Abstract]
    [Export ("requiredMethod")]
    void RequiredMethod ();

    [Export ("optionalMethod")]
    void OptionalMethod ();
}
```

we're now binding it like this:

```cs
[Protocol ("Protocol")]
public interface IProtocol : INativeObject {
    [RequiredMember]
    [Export ("requiredMethod")]
    public void RequiredMethod () { /* default implementation */ }

    [OptionalMember]
    [Export ("optionalMethod")]
    public void OptionalMethod () { /* default implementation */ }
}
```

The main difference from before is that the only difference between required
and optional members is the [RequiredMember]/[OptionalMember] attributes.

This has one major advantage: it's now possible to switch a member from being
required to being optional, or vice versa, without breaking neither source nor
binary compatibility.

It also improves intellisense for optional members. In the past optional
members were implemented using extension methods, which were not very
discoverable when you were supposed to implement a protocol in your own class.

The main downside is that the C# compiler won't enforce developers to
implement required protocol members (which is a necessary side effect of the
fact that we want to be able to switch members between being required and
optional without breaking compatibility). If this turns out to be a problem,
we can implement a custom source analyzer and/or linker step that detects
missing implementations and issue warnings/errors.

This PR also:

* Adds numerous tests.
* Updates the requiredness of a few members in Metal to test that it works as
  expected.
* Adds documentation.
* Handles numerous corner cases, which are documented in code and docs.

This PR is probably best reviewed commit-by-commit.

Fixes https://github.com/xamarin/xamarin-macios/issues/13294.
2024-06-07 16:35:48 +02:00
Rolf Bjarne Kvinge 7b3ad09aac
[bgen] Add support for binding static members in protocols. (#20645)
Add support for binding static members in protocols.

Given the following API definition:

```cs
[Protocol]
public interface Protocol {
    [Abstract]
    [Static]
    [Export ("requiredStaticMethod")]
    void RequiredStaticMethod ();

    [Static]
    [Export ("optionalStaticMethod")]
    void OptionalStaticMethod ();

    [Abstract]
    [Static]
    [Export ("requiredStaticProperty")]
    IntPtr RequiredStaticProperty { get; set; }

    [Static]
    [Export ("optionalStaticProperty")]
    IntPtr OptionalStaticProperty { get; set; }
}
```

we're binding it like this:

```cs
[Protocol ("Protocol")]
public interface IProtocol : INativeObject {
    [Export ("requiredStaticMethod")]
    public static void RequiredStaticMethod<T> () where T: NSObject, IProtocol { /* implementation */ }

    [Export ("optionalStaticMethod")]
    public static void OptionalStaticMethod<T> () where T: NSObject, IProtocol { /*  implementation */ }

    [Property ("RequiredStaticProperty")]
    [Export ("requiredStaticProperty")]
    public static IntPtr GetRequiredStaticProperty<T> () where T: NSObject, IProtocol { /* implementation */ }

    [Property ("RequiredStaticProperty")]
    [Export ("setRequiredStaticProperty:")]
    public static void SetRequiredStaticProperty<T> (IntPtr value) where T: NSObject, IProtocol { /* implementation */ }

    [Property ("OptionalStaticProperty")]
    [Export ("optionalStaticProperty")]
    public static IntPtr GetOptionalStaticProperty<T> () where T: NSObject, IProtocol { /* implementation */ }

    [Property ("OptionalStaticProperty")]
    [Export ("setOptionalStaticProperty:")]
    public static void SetOptionalStaticProperty<T> (IntPtr value) where T: NSObject, IProtocol { /* implementation */ }
}
```

Also add documentation and tests.
2024-05-31 13:00:57 +02:00
Rolf Bjarne Kvinge f78af68fb2
[bgen] Add support for binding constructors in protocols. Fixes #14039. (#20583)
Add support for binding constructors in protocols.

Given the api definition:

```cs
[Protocol]
public interface Protocol {
    [Abstract]
    [Export ("init")]
    IntPtr Constructor ();

    [Export ("initWithValue:")]
    IntPtr Constructor (IntPtr value);

    [BindAs ("Create")]
    [Export ("initWithPlanet:")]
    IntPtr Constructor ();
}
```

we're binding it like this:

```cs
[Protocol ("Protocol")]
public interface IProtocol : INativeObject {
    [Export ("init")]
    public static T CreateInstance<T> () where T: NSObject, IProtocol { /* default implementation */ }

    [Export ("initWithValue:")]
    public static T CreateInstance<T> () where T: NSObject, IProtocol { /* default implementation */ }

    [Export ("initWithPlanet:")]
    public static T Create<T> () where T: NSObject, IProtocol { /* default implementation */ }
}
```

Also add documentation and tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/14039.

---------

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Alex Soto <alex@soto.dev>
2024-05-24 11:29:53 +02:00
Rolf Bjarne Kvinge c5f93a2061
[bgen] Add support for marking API bindings as preview APIs using the Experimental attribute. (#20591) 2024-05-09 18:54:08 +02:00
Rolf Bjarne Kvinge af80672ae6
[tests] Fix detecting exposed members (#20577)
The enum value MethodAttributes.IsFamily is 'internal' in C#, which is not exposed
outside an assembly, so don't count such members as exposed. On the other hand, MethodAttributes.IsAssembly
is 'protected' in C#, which *is* exposed, so these members are included.

Update tests accordingly.
2024-05-09 13:21:14 +02:00
Rolf Bjarne Kvinge b4c06d7d19
[bgen] Generate xml documentation for the extension class we generate for protocols. (#20564)
This was mostly copied from the existing API documentation.

Partial fix for https://github.com/xamarin/xamarin-macios/issues/20270.
2024-05-07 09:36:57 +02:00
Rolf Bjarne Kvinge 7292983fbf
[bgen] Generate xml documentation for generated default constructors. (#20525)
This was mostly copied from the existing API documentation.

Partial fix for https://github.com/xamarin/xamarin-macios/issues/20270.
2024-04-29 12:05:12 +02:00
Rolf Bjarne Kvinge 771453d8a4
[bgen] Generate xml documentation for generated enums. (#20511)
This was mostly copied from the existing API documentation.

Partial fix for https://github.com/xamarin/xamarin-macios/issues/20270.
2024-04-26 14:50:24 +02:00
Rolf Bjarne Kvinge 3744c76391
[bgen] Generate xml documentation for generated UIAppearance logic. (#20502)
This was mostly copied from the existing API documentation.

Partial fix for https://github.com/xamarin/xamarin-macios/issues/20270.
2024-04-25 13:53:34 +02:00
Rolf Bjarne Kvinge 2d278f672d
[bgen] Fix support for ErrorDomain enums in third-party bindings. (#20499)
The generator needs a library name for the generated `_domain` field.

Here's an example for the generated `ARErrorCodeExtensions` class ("ARKit" is
the library name):

```cs
[Field ("ARErrorDomain", "ARKit")]
static NSString? _domain;
```

In order to find the library name, the generator would look at the first enum
field with a `[Field]` attribute, and get the `LibraryName` property from that
`[Field]` attribute. Unfortunately error enums don't necessarily have `[Field]`
attributes on their enum fields. This works fine for our own bindings, because
the generator will fall back to the enum's namespace, but for third-party
bindings this would be the result:

> error BI1042: bgen: Missing '[Field (LibraryName=value)]' for ErrorDomainNS.EWithDomain. (e.g."__Internal")

Note that the error message is rather confusing: it's trying to report a
missing `LibraryName` property for a `[Field]` attribute, but there's no `[Field]`
attribute anywhere in the enum in question.

So fix this by:

* Adding the `LibraryName` property on the `[ErrorDomain]` attribute.
* Implement support for looking at this new property in the generator.
* Report a better error if it's not there.
2024-04-25 10:52:50 +02:00
Rolf Bjarne Kvinge 8b3ce01c2c
[bgen] Generate xml documentation for notifications. (#20492)
This was mostly copied from the existing API documentation.

Partial fix for https://github.com/xamarin/xamarin-macios/issues/20270.
2024-04-24 09:36:14 +02:00
Rolf Bjarne Kvinge 92cab1c804
[bgen] Generate xml documentation for the generated constructors every NSObject subclass gets. (#20436)
Partial fix for https://github.com/xamarin/xamarin-macios/issues/20270.
2024-04-16 17:03:47 +02:00
Rolf Bjarne Kvinge e200c21269
[bgen] Generate xml documentation for the generated ClassHandle property. (#20425)
This was mostly copied from the existing API documentation.

Partial fix for https://github.com/xamarin/xamarin-macios/issues/20270.
2024-04-12 10:15:05 +02:00
Rolf Bjarne Kvinge f8f6fe852a
[bgen] Add support for copying xml documentation for enums fields. (#20323) 2024-03-19 08:27:47 +01:00
Rolf Bjarne Kvinge f1d54e236a
[generator] Add support for XML documentation in the API definitions. Fixes #17397. (#20253)
* Enable generation of the documentation file (.xml) by the C# compiler when building projects (by passing the `DocumentationFlag` argument to the Csc task).
	* Also disable the CSC1591 warning, which complains about having public APIs without xml documentation; it just turns out to be annoying rather than helpful, since most APIs won't be documented.
* Add support in the generator for reading the .xml file next to the compiled api definition assembly, and then looking for documentation there when generating binding code.
	* When enabled, enable generation of the documentation file if the generator is compiling the api definitions.
	* Make it an opt-out, in case the new code causes problems.
* Add tests. 

Fixes https://github.com/xamarin/xamarin-macios/issues/17397.

---------

Co-authored-by: Haritha Mohan <harithamohan@microsoft.com>
2024-03-13 11:19:36 +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 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 720a4f7ce2
[src] Remove the Protocolize attribute. (#19684)
Remove support for the Protocolize attribute from the generator, and remove
all usages of it in our api definitions - just use the protocol interface.

The Protocolize attribute was used to support binding stuff using the Model
class with Classic Xamarin code + and binding stuff using the protocol
interface with Unified Xamarin code, using the same source code.

Classic Xamarin has been dead for quite a few years ago now though, so there's
no need to keep his code around anymore, we can just upgrade the api
definitions to use the protocol interface directly.

Fixes https://github.com/xamarin/xamarin-macios/issues/14585.

---------

Co-authored-by: Alex Soto <alex@soto.dev>
2024-01-11 16:23:15 +01:00
Rolf Bjarne Kvinge c59ee63e3f
[bgen] Fix assembly comparison. Fixes #19612. (#19619)
This fixes a regression in .NET 8, where we changed the temporary assembly name when
building using a project file / MSBuild - we started compiling the temporary binding
code in MSBuild instead of in the generator, and in the process we changed the name
of the temporary assembly. This broke logic in bgen that compared the assembly name
to check if a given type is from the temporary assembly or not.

Fix this by checking the actual temporary assembly instead of the name of the assembly
instead.

Fixes https://github.com/xamarin/xamarin-macios/issues/19612.
2023-12-14 15:15:01 +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
Manuel de la Pena 16ac6b14fe
[Generator] Clean the AttributeManager from deps and fix a bug in the errors. (#19532)
Remove the need to pass the BT. More importantly fix an issue with the
errors when more than one attribute was expected. The eng that wrote the
code did not consider translations, and therefore the current errors
seen by a non-english speaker will result in part of the error in her
native language and the rest in english. On top of that, in english the
error is broken with words repited or broken sentences.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-12-04 07:08:16 -05:00
Manuel de la Pena f214469111
[Generator] The Nomenclator does know how to get the name of a type. (#19530)
Moved the method to the right object and add tests.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-11-28 11:12:50 -05: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
Manuel de la Pena dd3aa9afca
[Generator] Move the most of the path logic out of BT. (#19429)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-11-15 16:38:48 -05:00
dustin-wojciechowski b4da42958d
[Generator] Refactor Format Type methods into TypeManager class (#19331)
First take at refactoring parts of the Generator:

1. RemoveArity() is now a string extension method with a test
2. FormatType, FormatTypeUsedIn, and part of PrimitiveType methods have
been moved into the TypeManager class.
3. TypeManager now has access to BindingTouch (similar to the other
Manager classes) so that it may call methods from NamespaceManager,
which also had to be made into a public property of BindingTouch vs
being passed through the Generator constructor.

---------

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-11-01 09:40:00 -07:00
Rolf Bjarne Kvinge 7e3eeb1dab [net8.0] Merge main into net8.0. 2023-09-20 19:20:32 +02:00
Rolf Bjarne Kvinge 5f3c312b6c
[src] Make all generated P/Invokes use blittable signatures. Fixes #18685. (#19034)
This means:

* Change all bool and char arguments in P/Invokes to be byte and ushort, respectively.
* Change all out/ref arguments to be pointers instead.
* Update managed binding code accordingly.
* Update a struct (GKTriangle) to not use a MarshalAs field, but instead only use blittable fields.
* Update tests accordingly.

One side effect is that legacy binding projects may need a reference to
the `System.Runtime.CompilerServices.Unsafe` NuGet now (this is a
built-in dependency in .NET) in order to compile successfully.

Fixes https://github.com/xamarin/xamarin-macios/issues/18685.
2023-09-19 10:41:46 +02:00
Rolf Bjarne Kvinge e540b51bf5
[generator] Honor [Internal] on delegates. Fixes #15299. (#19038)
Fixes https://github.com/xamarin/xamarin-macios/issues/15299.
2023-09-18 23:37:27 +02:00
Rolf Bjarne Kvinge f88dc4406d [net8.0] Merge main into net8.0. 2023-09-14 07:23:52 +02:00
Rolf Bjarne Kvinge a7e96e5ce2
[bgen] Add support for converting ObsoletedOSPlatform attributes. Fixes #18966. (#18972)
Fixes https://github.com/xamarin/xamarin-macios/issues/18966.
2023-09-11 12:03:16 +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 640ff3fa71 [net8.0] Merge main into net8.0. 2023-08-22 15:22:11 +02:00
Rolf Bjarne Kvinge a03fbb70f9
Run the generator tests on Windows. (#18513)
We'll soon change the generator to execute locally on Windows, even for
remote builds. As a stepping stone towards that goal, this PR adds the
generator tests to the list of tests we run on Windows.
2023-08-18 16:04:59 +02:00
Rolf Bjarne Kvinge a3e2d48335 [net8.0] Merge main into net8.0. 2023-08-08 16:06:04 +02:00
Manuel de la Pena 716e8baf63
[Generator] Ensure that selectors fields do not have overlapping names. Fixes #18645 (#18646) 2023-08-08 09:25:21 -04:00
Rolf Bjarne Kvinge e6e25497a0 [net8.0] Merge main into net8.0. 2023-06-05 10:54:13 +02:00
Rolf Bjarne Kvinge 8d3a1aff7e
[tests] Fix warnings in tests/bgen/bgen-tests.csproj and enforce no more nullability warnings. (#18400) 2023-06-05 10:42:33 +02:00
Rolf Bjarne Kvinge a9c52baa28 [net8.0] Merge main into net8.0. 2023-05-18 17:26:48 +02:00
Manuel de la Pena 87e3edcb5a
[Generator] Remove nullability warnings. (#18281)
Remove some warnings that started to happen "recently".


Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-05-17 10:21:59 -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 d12c04689f
Enable nullability in various places (#18082)
I started fixing nullability in one place, and then it snowballed a bit
and I had to fix nullability in a lot of places.

Most are trivial, except for the `generate-frameworks-constants`
project: I had to create a .NET version of the project in order to
compile a .NET version of the tool.
2023-05-04 07:39:56 +02:00
Rolf Bjarne Kvinge a97b7d5355 [net8.0] Merge main into net8.0. 2023-05-03 15:31:25 +02:00
Rolf Bjarne Kvinge ce19b092c2 [net8.0] Merge main into net8.0. 2023-04-21 12:31:53 +02:00
Rolf Bjarne Kvinge 8e6104c497 [tests] Add a HotRestart version of the BundleStructure test. 2023-04-20 18:21:17 +02:00
Rolf Bjarne Kvinge 736662d8ee
[tests] Remove files from the generator tests to fix compiler warnings. (#18092)
Also fix a nullability warning.

Fixes these warnings:

    "tests/generator/generator-tests.csproj" (default target) (1:7) ->
    (CoreCompile target) ->
      tests/generator/AttributeFactoryTests.cs(43,29): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(44,29): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(45,29): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(17,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(34,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(53,39): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(54,39): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(55,39): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(56,39): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(64,34): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(69,11): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(76,34): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(55,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(83,34): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(78,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(111,16): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(138,16): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(95,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(178,16): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(116,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.]
      tests/generator/ConstructorArgumentsTests.cs(194,18): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.]
      tests/generator/ConstructorArgumentsTests.cs(210,18): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.]
      tests/generator/ConstructorArgumentsTests.cs(197,44): warning CS8602: Dereference of a possibly null reference.
      tests/generator/ConstructorArgumentsTests.cs(201,43): warning CS8602: Dereference of a possibly null reference.
2023-04-20 07:34:30 +02:00
Rolf Bjarne Kvinge b29169bccc
[bgen] Check for null (no) namespace when matching namespace to framework. Fixes #18025. (#18046)
Fixes https://github.com/xamarin/xamarin-macios/issues/18025.
2023-04-14 08:27:16 +02:00