Skip to content
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

Cleanup runtime platform classes #2 #11930

Merged
merged 12 commits into from
Jun 30, 2023
Merged

Conversation

maxkatz6
Copy link
Member

@maxkatz6 maxkatz6 commented Jun 27, 2023

What does the pull request do?

There was an oversight with IRuntimePlatform being still public, when it shouldn't. This PR fixes it + removes some code from there.

Continuing #8183

  1. Replaces public IDynamicLibraryLoader NativeLibraryEx as it always had single registration.
  2. Makes UnmanagedBlob independent internal class (in the future might be replaced with NativeMemory, but it doesn't use mmap IIRC)
  3. Makes IRuntimePlatform a private API. Removes timer and blob members from it.
  4. Unifies IRuntimePlatform registration across platforms (browser had some hacks before).
  5. Seals AppBuilder and removes public ctor from it (AppBuilder.Configure should be used)

Breaking changes

  1. IRuntimePlatform
    Minor breaking change, as IRuntimePlatform wasn't accessible without Locator anyway.
    With this, it can be merged either now or for 11.1 without breaking any app.

  2. Inheriting AppBuilder and creating it from ctor is not supported anymore.
    This one can be an actual breaking change, but I don't see where any app would use it anyway.

@maxkatz6 maxkatz6 requested a review from kekekeks June 27, 2023 22:53
@kekekeks
Copy link
Member

Replaces public IDynamicLibraryLoader NativeLibraryEx as it always had single registration.

Technically that might be a problem for out-of-tree backends for obscure environments.

@maxkatz6
Copy link
Member Author

Technically that might be a problem for out-of-tree backends for obscure environments.

In Avalonia specifically, it's used only for OpenGL code. Backends for these obscure environments will likely need their special rendering either way. So I don't think it's an issue for us to solve, at least not until we support these environments officially.

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0037097-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@danwalmsley danwalmsley added this to the 11.0 milestone Jun 30, 2023
@danwalmsley danwalmsley added this pull request to the merge queue Jun 30, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 30, 2023
@danwalmsley danwalmsley added this pull request to the merge queue Jun 30, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 30, 2023
@danwalmsley danwalmsley added this pull request to the merge queue Jun 30, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 30, 2023
@danwalmsley danwalmsley added this pull request to the merge queue Jun 30, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 30, 2023
@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0037239-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 enabled auto-merge June 30, 2023 21:00
@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0037264-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added this pull request to the merge queue Jun 30, 2023
Merged via the queue into master with commit 54d1806 Jun 30, 2023
@maxkatz6 maxkatz6 deleted the cleanup-runtime-platform-interface branch June 30, 2023 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants