diff options
-rw-r--r-- | changelogs/changelog_0_19_0.md | 2 | ||||
-rw-r--r-- | compiler/vmops.nim | 3 | ||||
-rw-r--r-- | doc/codeowners.rst | 2 | ||||
-rw-r--r-- | doc/contributing.rst | 8 | ||||
-rw-r--r-- | doc/nims.rst | 2 | ||||
-rw-r--r-- | lib/deprecated/pure/ospaths.nim (renamed from lib/pure/ospaths.nim) | 0 | ||||
-rw-r--r-- | lib/pure/os.nim | 2 | ||||
-rw-r--r-- | lib/pure/osproc.nim | 1 | ||||
-rw-r--r-- | tests/assert/testhelper.nim | 2 | ||||
-rw-r--r-- | tests/newconfig/tfoo.nims | 3 | ||||
-rw-r--r-- | tests/vm/tvmmisc.nim | 1 | ||||
-rw-r--r-- | tools/kochdocs.nim | 2 |
12 files changed, 9 insertions, 19 deletions
diff --git a/changelogs/changelog_0_19_0.md b/changelogs/changelog_0_19_0.md index 7464f50b6..18d3ca2b3 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 b34221f9b..f87ab4508 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 0758e3ffb..129c47cfc 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 84b15f419..a2c95db74 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 <https://nim-lang.github.io/Nim/ospaths.html#parentDir%2Cstring>`_ +See `parentDir <https://nim-lang.github.io/Nim/os.html#parentDir%2Cstring>`_ example. The RestructuredText Nim uses has a special syntax for including code snippets diff --git a/doc/nims.rst b/doc/nims.rst index dea09e1e8..034ad1fda 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 <macros.html>`_ -* `ospaths <ospaths.html>`_ +* `os <os.html>`_ * `strutils <strutils.html>`_ * `math <math.html>`_ * `distros <distros.html>`_ diff --git a/lib/pure/ospaths.nim b/lib/deprecated/pure/ospaths.nim index 34d452fd2..34d452fd2 100644 --- a/lib/pure/ospaths.nim +++ b/lib/deprecated/pure/ospaths.nim diff --git a/lib/pure/os.nim b/lib/pure/os.nim index 658bb6d3a..e2dd872e8 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 879a2d3a7..0cf2171de 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 754d562ec..2e5ede990 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 b9b9a87af..a9e40956e 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 350f3c08e..85de26e39 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 94a445897..69275548f 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 |