From 7e952f1d42368a990cb5d5129f18019cc6567823 Mon Sep 17 00:00:00 2001 From: Nimaoth Date: Fri, 25 Oct 2024 17:59:08 +0200 Subject: [PATCH] Fixed long compile times on windows --- src/desktop_main.nim | 2 +- src/vfs_local.nim | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/desktop_main.nim b/src/desktop_main.nim index 4734a927..790f6b19 100644 --- a/src/desktop_main.nim +++ b/src/desktop_main.nim @@ -29,7 +29,7 @@ when enableTerminal: logCategory "main" when defined(windows): - import winim + import winim/lean proc ownsConsole*(): bool = when defined(windows): diff --git a/src/vfs_local.nim b/src/vfs_local.nim index d2c28822..f8feafb2 100644 --- a/src/vfs_local.nim +++ b/src/vfs_local.nim @@ -2,6 +2,9 @@ import std/[os, options, unicode, strutils] import misc/[custom_async, custom_logger, util, timer, regex] import vfs +when defined(windows): + import winim/lean + import nimsumtree/[rope] {.push gcsafe.} @@ -112,9 +115,6 @@ proc fillDirectoryListing(directoryListing: var DirectoryListing, path: string, except OSError: discard -when defined(windows): - import winim - method getDirectoryListingImpl*(self: VFSLocal, path: string): Future[DirectoryListing] {.async: (raises: []).} = if path.len == 0: when defined(windows):