diff --git a/changelogs/changelog_0_19_0.md b/changelogs/changelog_0_19_0.md index 7464f50b6b..18d3ca2b33 100644 --- a/changelogs/changelog_0_19_0.md +++ b/changelogs/changelog_0_19_0.md @@ -223,7 +223,7 @@ into the namespace "Nim" in order to avoid naming conflicts with existing C++ code. This is done for all Nim code - internal and exported. -- Added ``macros.getProjectPath`` and ``ospaths.putEnv`` procs to Nim's virtual +- Added ``macros.getProjectPath`` and ``os.putEnv`` procs to Nim's virtual machine. - The ``deadCodeElim`` option is now always turned on and the switch has no diff --git a/compiler/vmops.nim b/compiler/vmops.nim index b34221f9bd..f87ab45085 100644 --- a/compiler/vmops.nim +++ b/compiler/vmops.nim @@ -21,9 +21,6 @@ template mathop(op) {.dirty.} = template osop(op) {.dirty.} = registerCallback(c, "stdlib.os." & astToStr(op), `op Wrapper`) -template ospathsop(op) {.dirty.} = - registerCallback(c, "stdlib.ospaths." & astToStr(op), `op Wrapper`) - template systemop(op) {.dirty.} = registerCallback(c, "stdlib.system." & astToStr(op), `op Wrapper`) diff --git a/doc/codeowners.rst b/doc/codeowners.rst index 0758e3ffb2..129c47cfcf 100644 --- a/doc/codeowners.rst +++ b/doc/codeowners.rst @@ -51,7 +51,7 @@ async dom96 strutils araq sequtils dom96, araq times GULPF -os, ospaths dom96, araq +os dom96, araq re araq nre flaviu math, fenv krux02, cooldome diff --git a/doc/contributing.rst b/doc/contributing.rst index 84b15f419b..a2c95db74f 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -22,7 +22,7 @@ There are 3 types of tests: 2. tests in ``when isMainModule:`` block, ran by ``nim c mymod.nim`` ``nimble test`` also typially runs these in external nimble packages. -3. testament tests, eg: tests/stdlib/tospaths.nim (only used for Nim repo). +3. testament tests, eg: tests/stdlib/tos.nim (only used for Nim repo). Not all the tests follow the convention here, feel free to change the ones that don't. Always leave the code cleaner than you found it. @@ -30,7 +30,7 @@ that don't. Always leave the code cleaner than you found it. Stdlib ------ -If you change the stdlib (anything under ``lib/``, eg ``lib/pure/ospaths.nim``), +If you change the stdlib (anything under ``lib/``, eg ``lib/pure/os.nim``), put a test in the file you changed. Add the tests under a ``when isMainModule:`` condition so they only get executed when the tester is building the file. Each test should be in a separate ``block:`` statement, such that @@ -53,7 +53,7 @@ Sample test: doAssert: not 1 == 2 Newer tests tend to be run via ``testament`` rather than via ``when isMainModule:``, -eg ``tests/stdlib/tospaths.nim``; this allows additional features such as custom +eg ``tests/stdlib/tos.nim``; this allows additional features such as custom compiler flags; for more details see below. Compiler @@ -197,7 +197,7 @@ as well as ``testament`` and guarantee they stay in sync. result = a & "Bar" -See `parentDir `_ +See `parentDir `_ example. The RestructuredText Nim uses has a special syntax for including code snippets diff --git a/doc/nims.rst b/doc/nims.rst index dea09e1e8c..034ad1fda8 100644 --- a/doc/nims.rst +++ b/doc/nims.rst @@ -31,7 +31,7 @@ available. So the stdlib modules using ``importc`` cannot be used with Nim's VM. However, at least the following modules are available: * `macros `_ -* `ospaths `_ +* `os `_ * `strutils `_ * `math `_ * `distros `_ diff --git a/lib/pure/ospaths.nim b/lib/deprecated/pure/ospaths.nim similarity index 100% rename from lib/pure/ospaths.nim rename to lib/deprecated/pure/ospaths.nim diff --git a/lib/pure/os.nim b/lib/pure/os.nim index 658bb6d3a6..e2dd872e80 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -1934,8 +1934,6 @@ proc moveDir*(source, dest: string) {.tags: [ReadIOEffect, WriteIOEffect], noNim copyDir(source, dest) removeDir(source) -#include ospaths - proc expandSymlink*(symlinkPath: string): string {.noNimScript.} = ## Returns a string representing the path to which the symbolic link points. ## diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 879a2d3a72..0cf2171ded 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -15,7 +15,6 @@ include "system/inclrtl" import strutils, os, strtabs, streams, cpuinfo -#from ospaths import quoteShell, quoteShellWindows, quoteShellPosix export quoteShell, quoteShellWindows, quoteShellPosix when defined(windows): diff --git a/tests/assert/testhelper.nim b/tests/assert/testhelper.nim index 754d562ec9..2e5ede990e 100644 --- a/tests/assert/testhelper.nim +++ b/tests/assert/testhelper.nim @@ -1,5 +1,5 @@ from strutils import endsWith, split -from ospaths import isAbsolute +from os import isAbsolute proc checkMsg*(msg, expectedEnd, name: string)= let filePrefix = msg.split(' ', maxSplit = 1)[0] diff --git a/tests/newconfig/tfoo.nims b/tests/newconfig/tfoo.nims index b9b9a87af6..a9e40956e0 100644 --- a/tests/newconfig/tfoo.nims +++ b/tests/newconfig/tfoo.nims @@ -3,9 +3,6 @@ mode = ScriptMode.Whatif exec "gcc -v" -# test that ospaths actually compiles: -import ospaths - --forceBuild --path: "../friends" diff --git a/tests/vm/tvmmisc.nim b/tests/vm/tvmmisc.nim index 350f3c08e3..85de26e39f 100644 --- a/tests/vm/tvmmisc.nim +++ b/tests/vm/tvmmisc.nim @@ -1,7 +1,6 @@ # bug #4462 import macros import os -import ospaths import strutils block: diff --git a/tools/kochdocs.nim b/tools/kochdocs.nim index 94a4458973..69275548f6 100644 --- a/tools/kochdocs.nim +++ b/tools/kochdocs.nim @@ -105,7 +105,7 @@ doc/manual/var_t_return.rst doc = """ lib/system.nim lib/system/nimscript.nim -lib/pure/ospaths.nim +lib/deprecated/pure/ospaths.nim lib/pure/parsejson.nim lib/pure/cstrutils.nim lib/core/macros.nim