mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 21:43:33 +00:00
committed by
Andreas Rumpf
parent
9b9f5dee0b
commit
6c7abe6e5b
@@ -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
|
||||
|
||||
@@ -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`)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>`_
|
||||
|
||||
@@ -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.
|
||||
##
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -3,9 +3,6 @@ mode = ScriptMode.Whatif
|
||||
|
||||
exec "gcc -v"
|
||||
|
||||
# test that ospaths actually compiles:
|
||||
import ospaths
|
||||
|
||||
--forceBuild
|
||||
--path: "../friends"
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# bug #4462
|
||||
import macros
|
||||
import os
|
||||
import ospaths
|
||||
import strutils
|
||||
|
||||
block:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user