From 0cac7b17d606b5e0c9ee1a87331c46cde45e794e Mon Sep 17 00:00:00 2001 From: Mathias Lang Date: Tue, 9 Jan 2024 00:08:31 +0100 Subject: [PATCH] Build with -preview=in This reduces the number of deprecations issued in dub. --- dub.sdl | 1 + source/dub/internal/vibecompat/core/file.d | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dub.sdl b/dub.sdl index d4be719e6..b61882586 100644 --- a/dub.sdl +++ b/dub.sdl @@ -7,6 +7,7 @@ license "MIT" targetPath "bin" +dflags "-preview=in" // Deprecated module(s) excludedSourceFiles "source/dub/packagesupplier.d" diff --git a/source/dub/internal/vibecompat/core/file.d b/source/dub/internal/vibecompat/core/file.d index 64faf3b34..e3fc1c1b5 100644 --- a/source/dub/internal/vibecompat/core/file.d +++ b/source/dub/internal/vibecompat/core/file.d @@ -101,7 +101,7 @@ void copyFile(string from, string to) copyFile(NativePath(from), NativePath(to)); } -version (Windows) extern(Windows) int CreateHardLinkW(in wchar* to, in wchar* from, void* attr=null); +version (Windows) extern(Windows) int CreateHardLinkW(const(wchar)* to, const(wchar)* from, void* attr=null); // guess whether 2 files are identical, ignores filename and content private bool sameFile(NativePath a, NativePath b)