From 91bb5200aa7cb99486f496d9bc113fef35747f55 Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Fri, 24 Oct 2025 22:10:47 +1000 Subject: [PATCH] another --- .../Features/FileWatching/IdeFileWatcher.cs | 2 +- src/SharpIDE.Godot/IdeRoot.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SharpIDE.Application/Features/FileWatching/IdeFileWatcher.cs b/src/SharpIDE.Application/Features/FileWatching/IdeFileWatcher.cs index 4bce411..15dabe0 100644 --- a/src/SharpIDE.Application/Features/FileWatching/IdeFileWatcher.cs +++ b/src/SharpIDE.Application/Features/FileWatching/IdeFileWatcher.cs @@ -33,7 +33,7 @@ public sealed class IdeFileWatcher(ILogger logger) : IDisposable fileWatcher.OnCreated += OnEvent; fileWatcher.OnDeleted += OnEvent; fileWatcher.OnRenamed += OnEvent; - fileWatcher.OnError += static (s, e) => Console.WriteLine($"FileSystemWatcher: Error - {e.GetException().Message}"); + fileWatcher.OnError += (s, e) => _logger.LogError(e.GetException(), "FileSystemWatcher: Error"); fileWatcher.Start(); _fileWatcher = fileWatcher; diff --git a/src/SharpIDE.Godot/IdeRoot.cs b/src/SharpIDE.Godot/IdeRoot.cs index f92e3bf..3cb2f23 100644 --- a/src/SharpIDE.Godot/IdeRoot.cs +++ b/src/SharpIDE.Godot/IdeRoot.cs @@ -141,8 +141,9 @@ public partial class IdeRoot : Control var timer = Stopwatch.StartNew(); var solutionModel = await VsPersistenceMapper.GetSolutionModel(path); // TODO: Probably refactor into a DI Service timer.Stop(); - _logger.LogInformation("Solution model fully created in {ElapsedMilliseconds} ms", timer.ElapsedMilliseconds); await _nodeReadyTcs.Task; + // Do not use injected services until after _nodeReadyTcs - Services aren't injected until _Ready + _logger.LogInformation("Solution model fully created in {ElapsedMilliseconds} ms", timer.ElapsedMilliseconds); _solutionExplorerPanel.SolutionModel = solutionModel; _codeEditorPanel.Solution = solutionModel; _bottomPanelManager.Solution = solutionModel;