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 #19898

Merged
merged 13 commits into from
Jan 15, 2024
Merged

[net8.0] Merge main to net8 #19898

merged 13 commits into from
Jan 15, 2024

Conversation

rmarinho
Copy link
Member

Description of Change

Merge latest changes from main to net8 branch.

Mike Parker and others added 13 commits January 11, 2024 19:50
* Fix SetProgressViewOffset on SwipeRefreshLayout

* - update refresh icon to a better color to trigger screen shot comparison

* - remove extra code

* - add better exception
* Show the Raw HTML in case of error

* Try to add UITest for Broken HTML
… Mac Idiom (#19838)

### Description of Change

Update to ```SearchBarExtensions``` so ```UpdateCancelButton``` sets the
```TintColor``` on the Cancel ```UIButton``` when using Mac idiom.
Device test added verifying the changes for Mac Catalyst and iOS.

### Issues Fixed

Fixes [#18110](#18110)
* Squash all the iOS Keyboard Improvements

* delay was enough manually, but not for tests

* remove debugging

* Add logic for Disconnect to be more useful

* fix spacing from github merge conflict commit

* accidently removed a var declaration

* Improve UITests and add double scroll for LargeTitles

* Add UITest for the grid star

* Style changes

* more style

* add fixtureTeardown

* only check for LargeTitles in portrait mode

* Add changes for LargeTitles on iPad

* remove the popover code until we get tests
* [ci] Bump XCode to 15.1.0

* Go to Xcode 15.2

* New xcode 15.1 doesn't support 14.5 simulators
* dont install xharness globally

* Fix restore
* [xamlg] improve error for Xamarin.Forms namespace

Fixes: #18637

Using the old namespace `http://xamarin.com/schemas/2014/forms` was
causing a NRE:

    System.NullReferenceException: Object reference not set to an instance of an object.
    at Microsoft.Maui.Controls.Xaml.XmlTypeXamlExtensions.GetTypeReference[T](XmlType xmlType, IEnumerable`1 xmlnsDefinitions, String defaultAssemblyName, Func`2 refFromTypeInfo)
    at Microsoft.Maui.Controls.SourceGen.CodeBehindGenerator.GetTypeNameFromCustomNamespace(XmlType xmlType, Compilation compilation, AssemblyCaches caches)
    at Microsoft.Maui.Controls.SourceGen.CodeBehindGenerator.GetTypeName(XmlType xmlType, Compilation compilation, AssemblyCaches caches)
    at Microsoft.Maui.Controls.SourceGen.CodeBehindGenerator.TryParseXaml(SourceText text, String uid, Compilation compilation, AssemblyCaches caches, CancellationToken cancellationToken, String targetFramework, String& accessModifier, String& rootType, String& rootClrNamespace, Boolean& generateDefaultCtor, Boolean& addXamlCompilationAttribute, Boolean& hideFromIntellisense, Boolean& xamlResourceIdOnly, String& baseType, IEnumerable`1& namedFields, Exception& exception)
    at Microsoft.Maui.Controls.SourceGen.CodeBehindGenerator.GenerateXamlCodeBehind(ProjectItem projItem, Compilation compilation, SourceProductionContext context, AssemblyCaches caches)
    at Microsoft.Maui.Controls.SourceGen.CodeBehindGenerator.<>c.<Initialize>b__1_1(SourceProductionContext sourceProductionContext, ValueTuple`3 provider)
    at Microsoft.CodeAnalysis.UserFunctionExtensions.<>c__DisplayClass3_0`2.<WrapUserAction>b__0(TInput1 input1, TInput2 input2, CancellationToken token)

In f939049, I inadvertently introduced this NRE, but even after fixing
it, I would instead get:

    FormsNamespace.xaml.sg.cs(15,48): error CS1001: Identifier expected

Due to the namespace, type, and base type all being `null` in this case,
the generated C# is invalid.

Instead of generating C# *at all*, let's emit an error message that says
to use the correct namespace.

I also provided a `Location` for the error message, so we will now know
what file the error originated from.

I attempted to write some test here, but adding an invalid file like
this causes the XAML unit tests project to fail to build. It feels like
we actually need to create a unit test project for the source generator
-- as there isn't one now.

* Add `[Obsolete]` to `FormsUri`
@rmarinho rmarinho merged commit 62ca213 into net8.0 Jan 15, 2024
47 checks passed
@rmarinho rmarinho deleted the nett8-merge-main branch January 15, 2024 15:31
@github-actions github-actions bot locked and limited conversation to collaborators Feb 15, 2024
@samhouts samhouts added the fixed-in-net8.0-nightly This may be available in a nightly release! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-net8.0-nightly This may be available in a nightly release! t/housekeeping ♻︎
Projects
None yet
Development

Successfully merging this pull request may close these issues.