question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Breaking API changes that have to be done before next major release

See original GitHub issue

This is a tracking issue

While Avalonia is ready for use, we can’t really claim that it’s 1.0 when we know that certain areas have to be changed in incompatible ways to work properly on various platforms and in various environments.

There will most likely be 0.10, 0.11 and probably 0.12 releases, but for widespread Avalonia adoption we need a promise of long-term API stability.

After 1.0 we’ll still be allowed to deprecate things, but we’ll have to keep a compatibility layer for several releases after a feature was deprecated.

So one of the goals in 2020 and probably the start of 2021 would be to focus on such “breaking-change-prone” areas so we could finally release the long awaited 1.0.

Public API contract note

Everything with Impl suffix is considered a private implementation detail without any API/ABI compatibility guarantees whatsoever (BTW, we need to add a wrapper for IClipboardImpl, it’s been years already). Those can change in any way even in minor version releases.

Stuff in platform backens other than XXXPlatformOptions and UseXXX is also not considered to be a stable API. If we need something platform-specific, we still need an API that’s not bound to a platform backend. So in general platform backends shouldn’t have any public types, unless those are required to setup/configure the backend.

Solution-wide internal APIs

We are likely to have some helper methods or classes, that are reusable in the code base, but don’t necessary have to be included in the public API contract. So we probably need some kind of Cecil-based post-processing, that would:

  1. transform
[InternalApi]
public Something()

to

internal Something()
  1. add [InternalsVisibleTo] attributes

That would ensure that project-private APIs wont be leaked, but non-public API parts would be still hidden.

Another way is to transform [Internal] to [Obsolete("This API is considered to be private to Avalonia and can be changed in incompatible way at any time")].

Known areas that would cause breaking changes:

  • Un-global everything (we could still keep things backed by AvaloniaLocator, just make sure to remove XXX.Instance static properties and move everything to TopLevel’s
  • Text input
  • Control themes
  • Drag-n-Drop (the current API is win32-centric and most likely won’t map nicely to other platforms)
  • ItemsControl item container generation API will be changed by #3388
  • Merging native menus and managed menus into a more user-friendly API #3855
  • Make template-applied properties use a lower priority than LocalValue #2789

Things to investigate:

  • Changes needed for Wayland protocol support (preferably with a prototype)
  • Changes needed for iOS/Android support (aside from ones listed in the roadmap)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:59
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
koalarcodercommented, Jun 3, 2021

when will we have 1.0 version,thank you

4reactions
kekekekscommented, Nov 10, 2020

The generic host model provided by Microsoft.Extensions isn’t really suitable for Avalonia needs, unfortunately

Dependency injection should be managed managed by MVVM framework (Prism, ReactiveUI, etc), not the UI toolkit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to handle an API breaking change - Devoteam S Platform
A breaking change for an API is any change to the API contract which will require the client applications to update the implementation...
Read more >
How to Manage Breaking Changes Throughout an API's ...
Breaking API changes don't have to break your client integrations. Learn the best practices for effectively managing breaking changes.
Read more >
How to Catch Breaking Changes Before They Happen
Preventing breaking changes is important, and it should absolutely be a part of your governance model when it comes to APIs.
Read more >
Handling Breaking Changes in an API | by Aditya Sharma
There are 3 main approaches to handle breaking changes: API Versioning. Version as request parameter or header. Feature Toggle Parameters.
Read more >
When Is A Change A Breaking Change For An API
Ben Nadel thinks about all of the changes that you can make in an API which could be considered a "breaking change" for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found