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

Update to Avalonia 11 preview 8 #332

Merged
merged 7 commits into from
May 10, 2023
Merged

Update to Avalonia 11 preview 8 #332

merged 7 commits into from
May 10, 2023

Conversation

danipen
Copy link
Collaborator

@danipen danipen commented Apr 25, 2023

Update the codebase to Avalonia 11 preview 8.

@danipen
Copy link
Collaborator Author

danipen commented Apr 25, 2023

Unit test project is not compiling due to internal API visibility. We probably need to migrate these tests to the headless platform.

@danipen
Copy link
Collaborator Author

danipen commented Apr 25, 2023

@maxkatz6
Copy link
Member

On my way to migrate these tests AvaloniaUI/Avalonia#11146

@maxkatz6
Copy link
Member

@danipen done, but we probably need to wait until AvaloniaUI/Avalonia#11169 is merged at least. It should be fine to target preview7 in the main project and nightly in the tests project. As necessary changes affect only tests.

@danipen
Copy link
Collaborator Author

danipen commented Apr 28, 2023

@maxkatz6 should the tests pass green? I'm getting some errors:

Message
    System.InvalidOperationException : Avalonia Headless platform has failed to initialize.
Stack Trace: 
<>c__DisplayClass19_0.<StartNew>b__0() line 94
--- End of stack trace from previous location ---
HeadlessUnitTestSession.StartNew(Type entryPointType) line 111
HeadlessUnitTestSession.GetOrStartForAssembly(Assembly assembly) line 142
AvaloniaTestAttribute.Wrap(TestCommand command) line 20
SimpleWorkItem.MakeTestCommand()
SimpleWorkItem.PerformWork()

And also:

Message
    System.InvalidOperationException : Setup was already called on one of AppBuilder instances
Stack Trace: 
AppBuilder.Setup() line 287
AppBuilder.SetupWithoutStarting() line 187
<>c__DisplayClass19_0.<StartNew>b__0() line 90
--- End of stack trace from previous location ---
HeadlessUnitTestSession.StartNew(Type entryPointType) line 111
HeadlessUnitTestSession.GetOrStartForAssembly(Assembly assembly) line 142
AvaloniaTestAttribute.Wrap(TestCommand command) line 20
SimpleWorkItem.MakeTestCommand()
SimpleWorkItem.PerformWork()```

@maxkatz6
Copy link
Member

@danipen yes, it was green locally, maybe wrong build number. I will check.

@danipen
Copy link
Collaborator Author

danipen commented Apr 28, 2023

BTW loving this change, unit tests get much more simple!

@danipen
Copy link
Collaborator Author

danipen commented May 2, 2023

yes, it was green locally, maybe wrong build number. I will check.

@maxkatz6 did you take a look into it?

@maxkatz6
Copy link
Member

maxkatz6 commented May 2, 2023

Yes, non-UI tests in this repo are using Dispatcher, which is uses before proper headless initialization, caching incorrect dispatcher implementation. I need to figure out how to avoid it without affecting this code base too much.

@danipen
Copy link
Collaborator Author

danipen commented May 9, 2023

@maxkatz6 any updates on this?

@maxkatz6
Copy link
Member

@danipen done. Should be ready to merge as preview7 or preview8 or both.
Tests project references master branch as only that one has needed headless changes to support NUnit and more. But non-test code wasn't changed, it still preview7.

@Gillibald
Copy link
Contributor

Let us target preview8 as that is the most recent version

@danipen danipen changed the title Update to Avalonia 11 preview 7 Update to Avalonia 11 preview 8 May 10, 2023
@danipen danipen merged commit 41ed3f1 into master May 10, 2023
@hez2010
Copy link
Contributor

hez2010 commented May 19, 2023

Hello, is there any chance of publishing a preview8 package on nuget?

@Gillibald
Copy link
Contributor

https://www.nuget.org/packages/Avalonia.AvaloniaEdit/11.0.0-preview8

@hez2010
Copy link
Contributor

hez2010 commented May 19, 2023

Oops, I missed that one.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants