-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump DBus stack take 2 #15685
Bump DBus stack take 2 #15685
Conversation
- Use new Variant system
…-tmds-dbus-sourcegenerator
You can test this PR using the following package version. |
…-tmds-dbus-sourcegenerator
…-tmds-dbus-sourcegenerator
…-tmds-dbus-sourcegenerator # Conflicts: # src/Avalonia.FreeDesktop/DBusPlatformSettings.cs
@affederaffe since this PR has breaking changes, you need to run |
…into bump-tmds-dbus-sourcegenerator
Only the PropertyChanges type was made internal as it should be, it was a mistake to make it public at first. |
@affederaffe we still need to run the API validation regardless as it's a hard requirement for making stable builds at the moment |
Avalonia.FreeDesktop.nupkg.xml <?xml version="1.0" encoding="utf-8"?>
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids -->
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:Tmds.DBus.SourceGenerator.PropertyChanges`1</Target>
<Left>baseline/netstandard2.0/Avalonia.FreeDesktop.dll</Left>
<Right>target/netstandard2.0/Avalonia.FreeDesktop.dll</Right>
</Suppression>
</Suppressions> |
@affederaffe @jmacato just updated api baseline by running "nuke" tool in the solution root. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
Sorry, missed the PR, will test tomorrow. |
As of the public API, can we have source-generated classes to be private? |
How could they be private? |
@affederaffe private for external consumer. I.e. internal is fine. |
That makes more sense. |
Why do we need
then? |
@kekekeks it wasn't internal before this PR |
You can test this PR using the following package version. |
@kekekeks Any updates on this? |
You can test this PR using the following package version. |
DBus menu works now with KDE without crashes, yes |
I think at some point we might want to switch to using libdbus by adapting your generators. It wont be a 100% managed solution, but at least libdbus is pretty much guaranteed to follow the spec. |
My 2 cents.
I think that If you prefer a different behavior, you can still use the lower-level APIs and build your own Variant representation as the SourceGenerator was doing before. |
Some DBus protocols require variants to be wrapped into variants. If it's not possible to represent such thing via the API, we'd need to switch the transport layer to a spec-conformant one for future-proofing. |
The current problem was caused by misrepresentation of variants on receiver side, which is an inconvenience, but it's not possible to send such messages, which would outright prevent us from being able to implement protocols. |
For sending, And even then, the lower-level APIs enable you to take full control of serialization. |
What does the pull request do?
Bump Tmds.DBus.Protocol and Tmds.DBus.SourceGenerator.
This uses the "official" Variant system instead of the SourceGenerator provided one (which was removed).
Accept the explicit ignoration of the DBus spec and assume collapsed variants.
What is the current behavior?
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
Tmds.DBus.SourceGenerator.PropertyChanges`1 was made internal by Tmds.DBus.SourceGenerator
Checklist
Breaking changes
Obsoletions / Deprecations
None
Fixed issues
#15655