Open Marc-Antoine-Soucy opened 1 year ago
I tried building the app on the latest pre-release, but I would get this error: 1> MSBUILD : error : Generation failed: System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Generation failed for Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator. System.NullReferenceException: Object reference not set to an instance of an object.
1>MSBUILD : error : at Uno.Roslyn.GeneratorExecutionContextExtensions.GetMSBuildItemsWithAdditionalFiles(GeneratorExecutionContext context, String name) in /home/vsts/work/1/s/src/SourceGenerators/SourceGeneratorHelpers/Helpers/GeneratorExecutionContextExtensions.cs:line 37
1>MSBUILD : error : at Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGeneration.GetWinUIItems(String name) in /home/vsts/work/1/s/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlCodeGeneration.cs:line 222
1>MSBUILD : error : at Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGeneration..ctor(GeneratorExecutionContext context) in /home/vsts/work/1/s/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlCodeGeneration.cs:line 125
1>MSBUILD : error : at Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator.Execute(GeneratorExecutionContext context) in /home/vsts/work/1/s/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlCodeGenerator.cs:line 52
1>MSBUILD : error : at Uno.SourceGeneration.Host.SourceGeneratorEngine.<>cDisplayClass4_1.3 generatorDef) in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\SourceGeneratorEngine.cs:line 243 1>MSBUILD : error : at System.Linq.Parallel.SelectQueryOperator
2.SelectQueryOperatorEnumerator1.MoveNext(TOutput& currentElement, TKey& currentKey) 1>MSBUILD : error : at System.Linq.Parallel.StopAndGoSpoolingTask
2.SpoolingWork()
1>MSBUILD : error : at System.Linq.Parallel.SpoolingTaskBase.Work()
1>MSBUILD : error : at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
1>MSBUILD : error : at System.Threading.Tasks.Task.Execute()
1>MSBUILD : error : --- End of inner exception stack trace ---
1>MSBUILD : error :
1>MSBUILD : error : Server stack trace:
1>MSBUILD : error : at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)
1>MSBUILD : error : at System.Linq.Parallel.DefaultMergeHelper2.System.Linq.Parallel.IMergeHelper<TInputOutput>.Execute() 1>MSBUILD : error : at System.Linq.Parallel.MergeExecutor
1.Execute[TKey](PartitionedStream2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId) 1>MSBUILD : error : at System.Linq.Parallel.PartitionedStreamMerger
1.Receive[TKey](PartitionedStream2 partitionedStream) 1>MSBUILD : error : at System.Linq.Parallel.UnaryQueryOperator
2.UnaryQueryOperatorResults.ChildResultsRecipient.Receive[TKey](PartitionedStream2 inputStream) 1>MSBUILD : error : at System.Linq.Parallel.ScanQueryOperator
1.ScanEnumerableQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient1 recipient) 1>MSBUILD : error : at System.Linq.Parallel.UnaryQueryOperator
2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient1 recipient) 1>MSBUILD : error : at System.Linq.Parallel.QueryOperator
1.ExecuteAndGetResultsAsArray()
1>MSBUILD : error : at Uno.SourceGeneration.Host.SourceGeneratorEngine.Generate() in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\SourceGeneratorEngine.cs:line 166
1>MSBUILD : error : at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
1>MSBUILD : error : at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
1>MSBUILD : error :
1>MSBUILD : error : Exception rethrown at [0]:
1>MSBUILD : error : at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
1>MSBUILD : error : at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
1>MSBUILD : error : at Uno.SourceGeneratorTasks.RemoteSourceGeneratorEngine.Generate(RemotableLogger2 logger, BuildEnvironment environment)
1>MSBUILD : error : at Uno.SourceGeneration.Host.Server.GenerationServerHost.GenerateForCollection(EnvironmentPool collection, BuildEnvironment environment) in D:\a\1\s\src\Uno.SourceGeneration.Host\Server\GenerationServerHost.netframework.cs:line 61
1>MSBUILD : error : at Uno.SourceGeneration.Host.Server.GenerationServerHost.RunGeneration(RunRequest request, CancellationToken cancellationToken) in D:\a\1\s\src\Uno.SourceGeneration.Host\Server\GenerationServerHost.cs:line 73
1>MSBUILD : error : ---> (Inner Exception #0) System.InvalidOperationException: Generation failed for Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator. System.NullReferenceException: Object reference not set to an instance of an object.
1>MSBUILD : error : at Uno.Roslyn.GeneratorExecutionContextExtensions.GetMSBuildItemsWithAdditionalFiles(GeneratorExecutionContext context, String name) in /home/vsts/work/1/s/src/SourceGenerators/SourceGeneratorHelpers/Helpers/GeneratorExecutionContextExtensions.cs:line 37
1>MSBUILD : error : at Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGeneration.GetWinUIItems(String name) in /home/vsts/work/1/s/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlCodeGeneration.cs:line 222
1>MSBUILD : error : at Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGeneration..ctor(GeneratorExecutionContext context) in /home/vsts/work/1/s/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlCodeGeneration.cs:line 125
1>MSBUILD : error : at Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator.Execute(GeneratorExecutionContext context) in /home/vsts/work/1/s/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlCodeGenerator.cs:line 52
1>MSBUILD : error : at Uno.SourceGeneration.Host.SourceGeneratorEngine.<>cDisplayClass4_1.3 generatorDef) in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\SourceGeneratorEngine.cs:line 243 1>MSBUILD : error : at System.Linq.Parallel.SelectQueryOperator
2.SelectQueryOperatorEnumerator1.MoveNext(TOutput& currentElement, TKey& currentKey) 1>MSBUILD : error : at System.Linq.Parallel.StopAndGoSpoolingTask
2.SpoolingWork()
1>MSBUILD : error : at System.Linq.Parallel.SpoolingTaskBase.Work()
1>MSBUILD : error : at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
1>MSBUILD : error : at System.Threading.Tasks.Task.Execute()<---
1>MSBUILD : error :
1>MSBUILD : error : ---> (Inner Exception #1) System.InvalidOperationException: Generation failed for Uno.UI.SourceGenerators.RemoteControl.RemoteControlGenerator. System.NullReferenceException: Object reference not set to an instance of an object.
1>MSBUILD : error : at Uno.Roslyn.GeneratorExecutionContextExtensions.GetMSBuildItemsWithAdditionalFiles(GeneratorExecutionContext context, String name) in /home/vsts/work/1/s/src/SourceGenerators/SourceGeneratorHelpers/Helpers/GeneratorExecutionContextExtensions.cs:line 37
1>MSBUILD : error : at Uno.UI.SourceGenerators.RemoteControl.RemoteControlGenerator.<>cDisplayClass4_0.2.MoveNext() 1>MSBUILD : error : at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext()
1>MSBUILD : error : at System.Linq.Enumerable.1.MoveNext() 1>MSBUILD : error : at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext()
1>MSBUILD : error : at System.String.Join(String separator, IEnumerable`1 values)
1>MSBUILD : error : at Uno.UI.SourceGenerators.RemoteControl.RemoteControlGenerator.BuildSearchPaths(GeneratorExecutionContext context, IndentedStringBuilder sb) in /home/vsts/work/1/s/src/SourceGenerators/Uno.UI.SourceGenerators/RemoteControl/RemoteControlGenerator.cs:line 88
1>MSBUILD : error : at Uno.UI.SourceGenerators.RemoteControl.RemoteControlGenerator.Execute(GeneratorExecutionContext context) in /home/vsts/work/1/s/src/SourceGenerators/Uno.UI.SourceGenerators/RemoteControl/RemoteControlGenerator.cs:line 51
1>MSBUILD : error : at Uno.SourceGeneration.Host.SourceGeneratorEngine.<>cDisplayClass4_1.3 generatorDef) in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\SourceGeneratorEngine.cs:line 224 1>MSBUILD : error : at Uno.SourceGeneration.Host.SourceGeneratorEngine.<>c__DisplayClass4_1.<Generate>b__13(ValueTuple
3 generatorDef) in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\SourceGeneratorEngine.cs:line 243
1>MSBUILD : error : at System.Linq.Parallel.SelectQueryOperator2.SelectQueryOperatorEnumerator
1.MoveNext(TOutput& currentElement, TKey& currentKey)
1>MSBUILD : error : at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
1>MSBUILD : error : at System.Linq.Parallel.SpoolingTaskBase.Work()
1>MSBUILD : error : at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
1>MSBUILD : error : at System.Threading.Tasks.Task.Execute()<---
1>MSBUILD : error :
1> C:\Users\ma.soucy.nuget\packages\uno.sourcegenerationtasks\4.1.0\build\netstandard1.0\Uno.SourceGenerationTasks.targets(134,2): error : Generation failed, error code Rejected
For the latest pre-release you'll need to the latest uno-sourcegeneration tasks as well. Is the package installed explicitly in your app ?
Apparently, yes. I will update it
Also, can you try with iOS 16.1? I recall there was an issue with UINavigation and iOS 16, but I can't find the link anymore.
I don't have access to an IOS 16.1 device/simulator. Is it easy to install one?
now, even thought I get another error message when I try to build on the simulator
1> C:\Users\ma.soucy.nuget\packages\uno.ui\4.6.0-dev.772\buildTransitive\xamarinios10\uno.winui.common.targets(212,3): error : Building for the iOS Simulator requires the use of the static registrar. Make sure that MtouchExtraArgs
contains --registrar:static
. See https://github.com/unoplatform/uno/issues/9430 for more details.
even thought I put I'm trying to put it elsewhere in the page, or with a = instead of : but nothing seems to work.
Can you tell what does not work? Are there errors ? Also, it's likely that you already have an MtouchExtraArgs entry in the file below.
Yeah, you are correct, there was another MtouchExtraArgs entry below that. When I built it after that, it remained stuck in the splashscreen. So, I closed the app and reopened it and it closed itself almost instantly. I'm not sure if that's the navigation bug you were referring to?
Actually, it was an exception I somehow missed, and the problem was the mergedDictionnary was not created when building the app.
Now, I am building it again because I forgot to check the build/debugging logs. It might take a bit of time because it takes a while to build.
So, I can confirm this bug also happens on the latest pre-release 4.6.0-dev.772
IOSNavBarTitle16.zip added a sample app
There's no ... in the title, but the root problem, which is that there's not enough space for a reasonable title to display is still very obviously there.
Current behavior
On IOS 16, on pages where there is a (single) in the commandbar, the title is shortened to one letter + ...
example: Orders being shortened to O...
Expected behavior
I would expect the title to be fully shown, just like on previous IOS versions.
How to reproduce it (as minimally and precisely as possible)
IOSNavBarTitle16.zip
<CommandBar Background="{StaticResource BackgroundColor}" toolkit:UIElementExtensions.Elevation="0">
In a certain app, which uses NativeDefaultCommandBar, any page with a commandbar like this one has this issue with IOS 16. I am working right now on making a sample
Workaround
So far, I found 2:
1: If you put
<AppBarButton/>
(just like that, empty), above the real AppBarButton with an icon, it gives more space to the title. If you do it several times, it gives enough space for the whole title to show. I do not understand why it works.2: You can also set the grid, which contains the title, to horizontalAlignment=Stretch, and then add some margin to manually center the title.
Works on UWP/WinUI
Yes
Environment
Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
NuGet package version(s)
`
`
Affected platforms
iOS
IDE
Visual Studio 2022
IDE version
17.3.6
Relevant plugins
No response
Anything else we need to know?
I am working on making a sample.