affederaffe / Tmds.DBus.SourceGenerator

A roslyn source generator for creating proxies targeting the Tmds.DBus.Protocol API
MIT License
7 stars 5 forks source link

Generation from NetworkManager.xml results in duplicate GetDevicesAsync and GetAllDevicesAsync methods #1

Closed enclave-alistair closed 1 year ago

enclave-alistair commented 1 year ago

Running the source generator against the NetworkManager introspection xml (https://github.com/NetworkManager/NetworkManager/blob/main/introspection/org.freedesktop.NetworkManager.xml) results in generated code that duplicates the GetDevicesAsync() and GetAllDevicesAsync() methods.

To recreate, add the specified org.freedesktop.NetworkManager.xml as an AdditionalItem to the project, then note the compile errors in the generated code.

Found against package version 0.0.6.

affederaffe commented 1 year ago

NetworkManager seems to contain both a method named 'Get[All]Devices' and a property '[All]Devices' which caused a name conflict because for both a method 'Get[All]DevicesAsync' was generated. Fixed with https://github.com/affederaffe/Tmds.DBus.SourceGenerator/commit/87612a3379b13057fba78f5b675801444514cfcc / 0.0.7 on NuGet, property related methods now have a 'Property' suffix added.