Skip to content

Commit

Permalink
chore: Update to latests uno
Browse files Browse the repository at this point in the history
  • Loading branch information
dr1rrb committed Oct 19, 2023
1 parent 634f0d4 commit 0639e5c
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
<RuntimeIdentifier Condition="'$(TargetFramework)' == 'net7.0-macos'">osx-x64</RuntimeIdentifier>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Uno.UI" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.UI.DevServer" Version="5.0.0-dev.3500" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.UI" Version="5.0.0-dev.3552" />
<PackageReference Include="Uno.UI.DevServer" Version="5.0.0-dev.3552" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3552" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />

<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Uno.UI.Skia.Gtk" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.UI.DevServer" Version="5.0.0-dev.3500" /><!--Note: Keep the DevServer package also in release for hot reload tests (cf. HotReloadHelper).-->
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.UI.Skia.Gtk" Version="5.0.0-dev.3552" />
<PackageReference Include="Uno.UI.DevServer" Version="5.0.0-dev.3552" /><!--Note: Keep the DevServer package also in release for hot reload tests (cf. HotReloadHelper).-->
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3552" />

<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Uno.UI.Skia.Linux.FrameBuffer" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.UI.DevServer" Version="5.0.0-dev.3500" /><!--Note: Keep the DevServer package also in release for hot reload tests (cf. HotReloadHelper).-->
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.UI.Skia.Linux.FrameBuffer" Version="5.0.0-dev.3552" />
<PackageReference Include="Uno.UI.DevServer" Version="5.0.0-dev.3552" /><!--Note: Keep the DevServer package also in release for hot reload tests (cf. HotReloadHelper).-->
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3552" />

<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Uno.UI.Skia.Wpf" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.UI.DevServer" Version="5.0.0-dev.3500"/><!--Note: Keep the DevServer package also in release for hot reload tests (cf. HotReloadHelper).-->
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.UI.Skia.Wpf" Version="5.0.0-dev.3552" />
<PackageReference Include="Uno.UI.DevServer" Version="5.0.0-dev.3552"/><!--Note: Keep the DevServer package also in release for hot reload tests (cf. HotReloadHelper).-->
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3552" />

<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.4.0" />
<PackageReference Include="Uno.UI.WebAssembly" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.UI.DevServer" Version="5.0.0-dev.3500" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.UI.WebAssembly" Version="5.0.0-dev.3552" />
<PackageReference Include="Uno.UI.DevServer" Version="5.0.0-dev.3552" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3552" />
<PackageReference Include="Uno.Wasm.Bootstrap" Version="7.0.5" />
<PackageReference Include="Uno.Wasm.Bootstrap.DevServer" Version="7.0.5" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<SupportedOSPlatformVersion Condition="'$(TargetFramework)'=='net7.0-macos'">10.14</SupportedOSPlatformVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Uno.WinUI" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.WinUI.DevServer" Version="5.0.0-dev.3500" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.WinUI" Version="5.0.0-dev.3552" />
<PackageReference Include="Uno.WinUI.DevServer" Version="5.0.0-dev.3552" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3552" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />

<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Uno.WinUI.Skia.Gtk" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.WinUI.DevServer" Version="5.0.0-dev.3500" /><!--Note: Keep the DevServer package also in release for hot reload tests (cf. HotReloadHelper).-->
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.WinUI.Skia.Gtk" Version="5.0.0-dev.3552" />
<PackageReference Include="Uno.WinUI.DevServer" Version="5.0.0-dev.3552" /><!--Note: Keep the DevServer package also in release for hot reload tests (cf. HotReloadHelper).-->
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3552" />

<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Uno.WinUI.Skia.Linux.FrameBuffer" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.WinUI.DevServer" Version="5.0.0-dev.3500" /><!--Note: Keep the DevServer package also in release for hot reload tests (cf. HotReloadHelper).-->
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.WinUI.Skia.Linux.FrameBuffer" Version="5.0.0-dev.3552" />
<PackageReference Include="Uno.WinUI.DevServer" Version="5.0.0-dev.3552" /><!--Note: Keep the DevServer package also in release for hot reload tests (cf. HotReloadHelper).-->
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3552" />

<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Uno.WinUI.Skia.Wpf" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.WinUI.DevServer" Version="5.0.0-dev.3500" /><!--Note: Keep the DevServer package also in release for hot reload tests (cf. HotReloadHelper).-->
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.WinUI.Skia.Wpf" Version="5.0.0-dev.3552" />
<PackageReference Include="Uno.WinUI.DevServer" Version="5.0.0-dev.3552" /><!--Note: Keep the DevServer package also in release for hot reload tests (cf. HotReloadHelper).-->
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3552" />

<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.4.0" />
<PackageReference Include="Uno.WinUI.WebAssembly" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.WinUI.DevServer" Version="5.0.0-dev.3500" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3500" />
<PackageReference Include="Uno.WinUI.WebAssembly" Version="5.0.0-dev.3552" />
<PackageReference Include="Uno.WinUI.DevServer" Version="5.0.0-dev.3552" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3552" />
<PackageReference Include="Uno.Wasm.Bootstrap" Version="7.0.5" />
<PackageReference Include="Uno.Wasm.Bootstrap.DevServer" Version="7.0.5" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System;
using System.Collections;
using System.IO;
using System.Linq;
using System.Net.WebSockets;
using System.Reflection;
using System.Threading;
Expand Down Expand Up @@ -50,6 +51,11 @@ public async ValueTask EnsureReady(CancellationToken ct)
throw new InvalidOperationException("Dev server is not available.");
}

if (RemoteControlClient.Instance.Processors.OfType<ClientHotReloadProcessor>().FirstOrDefault() is not { } hotReload)
{
throw new InvalidOperationException("App is not configured to accept hot-reload.");
}

var timeout = Task.Delay(ConnectionTimeout, ct);
if (await Task.WhenAny(timeout, RemoteControlClient.Instance.WaitForConnection(ct)) == timeout)
{
Expand All @@ -62,10 +68,7 @@ public async ValueTask EnsureReady(CancellationToken ct)

_log.LogTrace("Client connected, waiting for dev-server to load the workspace (i.e. initializing roslyn with the solution) ...");

var processors = typeof(RemoteControlClient).GetField("_processors", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(RemoteControlClient.Instance) as IDictionary ?? throw new InvalidOperationException("Processors is null");
var processor = processors["hotreload"] as ClientHotReloadProcessor ?? throw new InvalidOperationException("HotReloadProcessor is null");
var hotReloadReady = typeof(ClientHotReloadProcessor).GetProperty("HotReloadWorkspaceLoaded", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(processor) as Task ?? throw new IOException("HotReloadWorkspaceLoaded is null");

var hotReloadReady = hotReload.WaitForWorkspaceLoaded(ct);
timeout = Task.Delay(WorkspaceTimeout, ct);
if (await Task.WhenAny(timeout, hotReloadReady) == timeout)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ static HotReloadHelper()
TryUseDevServerFileUpdater();
}

if (!IsSupported)
{
TryUseLocalFileUpdater();
}
//if (!IsSupported)
//{
// TryUseLocalFileUpdater();
//}
}

static partial void TryUseDevServerFileUpdater();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#if !UNO_RUNTIMETESTS_DISABLE_LIBRARY && WINDOWS_UWP
#if !IS_UNO_RUNTIMETEST_PROJECT
#pragma warning disable
#endif


using System.Diagnostics.CodeAnalysis;

#nullable enable
namespace System.Reflection.Metadata
{
/// <summary>Indicates that a type that should receive notifications of metadata updates.</summary>
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public sealed class MetadataUpdateHandlerAttribute : Attribute
{
/// <summary>Initializes the attribute.</summary>
/// <param name="handlerType">A type that handles metadata updates and that should be notified when any occur.</param>
public MetadataUpdateHandlerAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type handlerType) => this.HandlerType = handlerType;

Check failure on line 18 in src/Uno.UI.RuntimeTests.Engine.Library/Library/_Compat/MetadataUpdateHandlerAttribute.cs

View workflow job for this annotation

GitHub Actions / build

'DynamicallyAccessedMembersAttribute' is inaccessible due to its protection level

Check failure on line 18 in src/Uno.UI.RuntimeTests.Engine.Library/Library/_Compat/MetadataUpdateHandlerAttribute.cs

View workflow job for this annotation

GitHub Actions / build

'DynamicallyAccessedMemberTypes' is inaccessible due to its protection level

/// <summary>Gets the type that handles metadata updates and that should be notified when any occur.</summary>
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)]

Check failure on line 21 in src/Uno.UI.RuntimeTests.Engine.Library/Library/_Compat/MetadataUpdateHandlerAttribute.cs

View workflow job for this annotation

GitHub Actions / build

'DynamicallyAccessedMembersAttribute' is inaccessible due to its protection level

Check failure on line 21 in src/Uno.UI.RuntimeTests.Engine.Library/Library/_Compat/MetadataUpdateHandlerAttribute.cs

View workflow job for this annotation

GitHub Actions / build

'DynamicallyAccessedMemberTypes' is inaccessible due to its protection level
public Type HandlerType { get; }
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Library\Helpers\HotReloadHelper.MetadataUpdateHandler.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Library\Helpers\HotReloadHelper.NotSupported.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Library\_Compat\CallerArgumentExpressionAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Library\_Compat\MetadataUpdateHandlerAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Library\_Private\ColorExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Library\Helpers\HotReloadHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Library\Helpers\ImageAssert.cs" />
Expand Down

0 comments on commit 0639e5c

Please sign in to comment.