From 7e6f4723c352996a29ed6e072c50dedf4ae8111b Mon Sep 17 00:00:00 2001 From: rockcavera Date: Tue, 23 Jan 2024 18:48:18 -0300 Subject: [PATCH] Fix system.currentSourcePath() documentation [backport 2.0] (#23243) The documentation links for `parentDir()` and `getCurrentDir()` are broken as they are no longer part of `std/os`. Link changed to `std/private/ospaths2`. (cherry picked from commit 9c155eacccbf437f907230621aee7e9f16f28930) --- lib/system/compilation.nim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/system/compilation.nim b/lib/system/compilation.nim index 64ed6cd79d..4db8497812 100644 --- a/lib/system/compilation.nim +++ b/lib/system/compilation.nim @@ -144,16 +144,17 @@ template currentSourcePath*: string = instantiationInfo(-1, true).filename ## Returns the full file-system path of the current source. ## ## To get the directory containing the current source, use it with - ## `os.parentDir() `_ as `currentSourcePath.parentDir()`. + ## `ospaths2.parentDir() `_ as + ## `currentSourcePath.parentDir()`. ## ## The path returned by this template is set at compile time. ## ## See the docstring of `macros.getProjectPath() `_ - ## for an example to see the distinction between the `currentSourcePath` - ## and `getProjectPath`. + ## for an example to see the distinction between the `currentSourcePath()` + ## and `getProjectPath()`. ## ## See also: - ## * `getCurrentDir proc `_ + ## * `ospaths2.getCurrentDir() proc `_ proc slurp*(filename: string): string {.magic: "Slurp".} ## This is an alias for `staticRead <#staticRead,string>`_.