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

chore: Update logging to .net 7 (to get latest nullable annotations) #117

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<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="Microsoft.Extensions.Logging.Console" Version="7.0.0" />

<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<UpToDateCheckInput Include="..\..\shared\**\*.xaml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<UpToDateCheckInput Include="..\..\shared\**\*.xaml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
-->
<Version>6.2.11</Version>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Microsoft.UI.Xaml" Version="2.6.2" />
<PackageReference Include="Uno.UI" Version="4.6.19" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" />
</ItemGroup>
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<None Include="wwwroot\web.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.4.0" />
<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'" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<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="Microsoft.Extensions.Logging.Console" Version="7.0.0" />

<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<UpToDateCheckInput Include="..\..\shared\**\*.xaml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<UpToDateCheckInput Include="..\..\shared\**\*.xaml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<None Include="wwwroot\web.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.4.0" />
<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'" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.1.3" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.196" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" />

<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ internal sealed partial class DevServer : IAsyncDisposable
public static async Task<DevServer> Start(CancellationToken ct)
{
#if !HAS_UNO_DEVSERVER
throw new NotSupportedException("Dev server is not supported on this platform.");
throw new NotSupportedException("Dev server has not been referenced.");
dr1rrb marked this conversation as resolved.
Show resolved Hide resolved
#else
var path = await GetDevServer(ct);
var port = GetTcpPort();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#if !UNO_RUNTIMETESTS_DISABLE_UI

#if !IS_UNO_RUNTIMETEST_PROJECT
#pragma warning disable
#endif

using System;
using System.Linq;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -42,7 +47,8 @@ public bool IsEnabled(LogLevel logLevel)
=> _logger.IsEnabled(logLevel);

/// <inheritdoc />
public IDisposable BeginScope<TState>(TState state)
public IDisposable? BeginScope<TState>(TState state)
where TState : notnull
=> _logger.BeginScope(state);

/// <inheritdoc />
Expand Down
Loading