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

[net8.0] Merge main to net8 #17649

Merged
merged 25 commits into from
Sep 26, 2023
Merged

[net8.0] Merge main to net8 #17649

merged 25 commits into from
Sep 26, 2023

Conversation

rmarinho
Copy link
Member

Description of Change

Bring latest changes from main to net8.0 project

dependabot bot and others added 25 commits September 21, 2023 22:37
Bumps [powershell](https://github.com/PowerShell/PowerShell) from 7.3.6 to 7.3.7.
- [Release notes](https://github.com/PowerShell/PowerShell/releases)
- [Commits](PowerShell/PowerShell@v7.3.6...v7.3.7)

---
updated-dependencies:
- dependency-name: powershell
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Improve comments in templates

* Update maui-mobile template

* Apply suggestions from code review

Co-authored-by: Eilon Lipton <[email protected]>

---------

Co-authored-by: Eilon Lipton <[email protected]>
* Enable Controls Tests

* - fix focus test

* Run each category separately

* Make it work for unpackaged

* Fix build errors

* Make it also work for non-Control projects

* Detect test failures

* Undo some Windows test hacks

* Disable failing Core tests

* Disable failing Windows Essentials tests

* Update Preferences_Tests.cs

* Add Memory category and apply

* Add Mapper category and apply

* Add Xaml category and apply

* Added Lifecycle category and apply

* Disable failing unpackaged font test

* - fix deleted yields

* - update yields

* - ignore ToolbarUpdatesCorrectlyWhenSwappingMainPageWithAlreadyUsedPage

* Uncomment Windows Controls in pipeline

* Disable failing tests

* Add (UN)PACKAGED symbols & disable failing tests

* Skip failing tests

* Skip failing tests

* Disable failing tests

* Ensure test categories & result file count match

* Remove global exception handler

* - ignore test on android

* Disable failing iOS test

---------

Co-authored-by: Gerald Versluis <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Bumps Microsoft.Web.WebView2 from 1.0.1938.49 to 1.0.2045.28.

---
updated-dependencies:
- dependency-name: Microsoft.Web.WebView2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
not sure this ever worked and that's a resgression

- fixes #17478
Context: #13818 (review)
Context: jonathanpeppers/lols#4
Fixes: #17520

A customer noticed my LOLs per second sample was slower in .NET 8 than
.NET 7. I could reproduce their results.

Digging in, `dotnet-trace` showed one culprit was:

    .NET 7
     8.5% microsoft.maui.controls!Microsoft.Maui.Controls.BindableObject.GetValue
     1.2% microsoft.maui.controls!Microsoft.Maui.Controls.BindableObject.SetValue
    .NET 8
    11.0% microsoft.maui.controls!Microsoft.Maui.Controls.BindableObject.GetValue
     2.8% microsoft.maui.controls!Microsoft.Maui.Controls.BindableObject.SetValue

I knew that #13818 had some performance impact, as I noted when
reviewing the change.

Drilling in further, most of the time is spent calling
`SortedList.Last()`. Which makes sense, as `BindableObject.GetValue()`
is called *a lot* in a typical .NET MAUI application.

Adding some logging, I found my LOLs app most commonly had the following
specificity values when `BindableProperty`'s are set:

* 5,284 - a single specificity value
* 34,306 - two specificity values

No `BindableProperty`'s in this app had more than two specificity values.

So, an improvement here would be to:

* Avoid `SortedList` for the most common calls

* Make fields that store up to two specificity values

* If a *third* specificity value is required, fall back to using
`SortedList`.

I introduced a new, internal `SetterSpecificityList` class for this logic.

The results of running `BindingBenchmarker`:

    > .\bin\dotnet\dotnet.exe run --project .\src\Core\tests\Benchmarks\Core.Benchmarks.csproj -c Release -- --filter Microsoft.Maui.Benchmarks.BindingBenchmarker.*
    ...
    Before:
    |           Method |     Mean |    Error |   StdDev |   Gen0 |   Gen1 | Allocated |
    |----------------- |---------:|---------:|---------:|-------:|-------:|----------:|
    |         BindName | 31.67 us | 0.689 us | 2.009 us | 1.7395 | 1.7090 |  14.45 KB |
    |        BindChild | 42.18 us | 0.864 us | 2.548 us | 2.4414 | 2.3804 |  20.16 KB |
    | BindChildIndexer | 78.37 us | 1.564 us | 3.266 us | 3.5400 | 3.4180 |  29.69 KB |
    After:
    |           Method |     Mean |    Error |   StdDev |   Gen0 |   Gen1 | Allocated |
    |----------------- |---------:|---------:|---------:|-------:|-------:|----------:|
    |         BindName | 27.13 us | 0.521 us | 1.016 us | 1.3733 | 1.3428 |  11.33 KB |
    |        BindChild | 37.77 us | 0.845 us | 2.437 us | 2.0752 | 2.0142 |  17.03 KB |
    | BindChildIndexer | 69.45 us | 1.356 us | 2.859 us | 3.1738 | 3.0518 |  26.56 KB |

My original numbers (before specificity changes in #13818) were:

    |           Method |     Mean |    Error |   StdDev |   Gen0 |   Gen1 | Allocated |
    |----------------- |---------:|---------:|---------:|-------:|-------:|----------:|
    |         BindName | 24.46 us | 0.554 us | 1.624 us | 1.2512 | 1.2207 |  10.23 KB |
    |        BindChild | 33.21 us | 0.743 us | 2.192 us | 1.9226 | 1.8921 |  15.94 KB |
    | BindChildIndexer | 61.59 us | 1.209 us | 1.952 us | 3.1128 | 3.0518 |  25.47 KB |

This gets *some* of the performance back, but not all.

The LOLs per second app, testing these changes on a Pixel 5:

    Before:
    376.98 LOLs/s
    After:
    391.44 LOLs/s
* Recreate the Navigation Host If It's been Destroyed

* - add some destroy checks

* Update TabbedPageTests.cs

* - add additional checks
* [create-pull-request] automated change

* Update MauiScrollView.cs

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Gerald Versluis <[email protected]>
When OnPlatform<T> is used as a StaticResource, cast it first to T
(extract the Onplatform value), then process as usual, and cast it again
to propertyType if needed

- fixes #16327
* Remove previous TitleView from Toolbar

* Update Issue16499.cs
* Recreate Details Fragment, if its been destroyed

* Update ToolbarTests.cs
* fix: remove reference to concrete native host app

* chore: fixing null dereference

* chore: update to avoid obsolete code

* chore: removing obsolete hard references

* chore: use private property on Tizen

* chore: fix null dereference

* chore: normalize Exception for null services

* chore: use current Android Application Context without strong type

* chore: make fields nullable

* chore: fixing nullable references

* chore: add null check for Maui Context

* chore: fixing obsolete message
* [Windows] Fixes border content clipping

Fixes clip path size to consider the border stroke thickness, so it only uses the inner space. For the space the border takes we consider both sides (top and bottom, or left and right) and not just the thickness.

On top of that, the clip should not be sentered with the content, so we need to offset it based on the contents position.

* [Windows] Fixes border content clipping

Fixes clip path size to consider the border stroke thickness, so it only uses the inner space. For the space the border takes we consider both sides (top and bottom, or left and right) and not just the thickness.

On top of that, the clip should not be sentered with the content, so we need to offset it based on the contents position.

* Fix BorderResizeContent sample

Add stroke thickness to polygon border

* Add border gallery for UI tests

* Minor fixups to the Border1 Controls.Sample.UITest

* Add border gallery ui tests

* Update border test

* Removed unnecessary .csproj changes

* Add WaitForStubControl, waiting for UI to appear

* Fix up border appium tests

* Make WaitForStubControl have label text - didn't seem to show up otherwise

* Disable test for now; will enable in a separate PR

---------

Co-authored-by: Bret Johnson <[email protected]>
Co-authored-by: Jeffrey Stedfast <[email protected]>
Bumps the xunit group with 3 updates: [xunit](https://github.com/xunit/xunit), [xunit.runner.visualstudio](https://github.com/xunit/xunit) and [xunit.runner.utility](https://github.com/xunit/xunit).


Updates `xunit` from 2.5.0 to 2.5.1
- [Commits](xunit/xunit@2.5.0...2.5.1)

Updates `xunit.runner.visualstudio` from 2.5.0 to 2.5.1
- [Commits](xunit/xunit@2.5.0...2.5.1)

Updates `xunit.runner.utility` from 2.5.0 to 2.5.1
- [Commits](xunit/xunit@2.5.0...2.5.1)

---
updated-dependencies:
- dependency-name: xunit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: xunit
- dependency-name: xunit.runner.visualstudio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: xunit
- dependency-name: xunit.runner.utility
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: xunit
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
occured -> occurred
…30921.1 (#17620)

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 8.0.0-prerelease.23431.1 -> To Version 8.0.0-prerelease.23471.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
# Conflicts:
#	eng/Versions.props
#	src/Templates/src/templates/maui-blazor/MauiApp.1.csproj
@@ -45,6 +45,18 @@
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#FFFFFF" BaseSize="168,208" />
</ItemGroup>

<ItemGroup>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need these? no right? default targets should take care of tis

@rmarinho rmarinho added this to the .NET 8 GA milestone Sep 26, 2023
@rmarinho rmarinho requested a review from Eilon September 26, 2023 12:39
@rmarinho rmarinho merged commit 1e71186 into net8.0 Sep 26, 2023
47 checks passed
@rmarinho rmarinho deleted the merge-main-net8 branch September 26, 2023 16:32
@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2023
@samhouts samhouts added the fixed-in-8.0.0-rc.2.9373 Look for this fix in 8.0.0-rc.2.9373! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-8.0.0-rc.2.9373 Look for this fix in 8.0.0-rc.2.9373! t/housekeeping ♻︎
Projects
None yet
Development

Successfully merging this pull request may close these issues.