mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
CIs: attempt to use csources_v1 (#16282)
* CIs: attempt to use csources_v1
* also updated the BSDs
* also updated azure pipelines
* std modules should not itself use the 'std/' import dir...
* compiler has to be careful with std/ for v1 booting
(cherry picked from commit a9b62de895)
This commit is contained in:
@@ -965,6 +965,8 @@ proc expandTilde*(path: string): string {.
|
||||
## Windows: this is still supported despite Windows platform not having this
|
||||
## convention; also, both ``~/`` and ``~\`` are handled.
|
||||
##
|
||||
## **Warning**: `~bob` and `~bob/` are not yet handled correctly.
|
||||
##
|
||||
## See also:
|
||||
## * `getHomeDir proc <#getHomeDir>`_
|
||||
## * `getConfigDir proc <#getConfigDir>`_
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
## macro system.
|
||||
|
||||
import std/private/since
|
||||
import macros, typetraits
|
||||
import macros
|
||||
|
||||
proc checkPragma(ex, prag: var NimNode) =
|
||||
since (1, 3):
|
||||
|
||||
@@ -108,7 +108,7 @@ since (1, 3, 5):
|
||||
doAssert elementType(myiter(3)) is int
|
||||
typeof(block: (for ai in a: ai))
|
||||
|
||||
import std/macros
|
||||
import macros
|
||||
|
||||
macro genericParamsImpl(T: typedesc): untyped =
|
||||
# auxiliary macro needed, can't do it directly in `genericParams`
|
||||
|
||||
@@ -13,7 +13,7 @@ runnableExamples:
|
||||
let j = a.toJson
|
||||
doAssert j.jsonTo(type(a)).toJson == j
|
||||
|
||||
import std/[json,strutils,tables,sets,strtabs,options]
|
||||
import json, strutils, tables, sets, strtabs, options
|
||||
|
||||
#[
|
||||
Future directions:
|
||||
@@ -27,7 +27,7 @@ add a way to customize serialization, for e.g.:
|
||||
objects.
|
||||
]#
|
||||
|
||||
import std/macros
|
||||
import macros
|
||||
|
||||
type
|
||||
Joptions* = object
|
||||
@@ -106,7 +106,7 @@ proc hasField[T](obj: T, field: string): bool =
|
||||
return true
|
||||
return false
|
||||
|
||||
macro accessField(obj: typed, name: static string): untyped =
|
||||
macro accessField(obj: typed, name: static string): untyped =
|
||||
newDotExpr(obj, ident(name))
|
||||
|
||||
template fromJsonFields(newObj, oldObj, json, discKeys, opt) =
|
||||
@@ -146,7 +146,7 @@ template fromJsonFields(newObj, oldObj, json, discKeys, opt) =
|
||||
json.len == numMatched
|
||||
else:
|
||||
json.len == num and num == numMatched
|
||||
|
||||
|
||||
checkJson ok, $(json.len, num, numMatched, $T, json)
|
||||
|
||||
proc fromJson*[T](a: var T, b: JsonNode, opt = Joptions())
|
||||
@@ -278,7 +278,7 @@ proc toJson*[T](a: T): JsonNode =
|
||||
proc fromJsonHook*[K, V](t: var (Table[K, V] | OrderedTable[K, V]),
|
||||
jsonNode: JsonNode) =
|
||||
## Enables `fromJson` for `Table` and `OrderedTable` types.
|
||||
##
|
||||
##
|
||||
## See also:
|
||||
## * `toJsonHook proc<#toJsonHook,(Table[K,V]|OrderedTable[K,V])>`_
|
||||
runnableExamples:
|
||||
@@ -314,7 +314,7 @@ proc toJsonHook*[K, V](t: (Table[K, V] | OrderedTable[K, V])): JsonNode =
|
||||
|
||||
proc fromJsonHook*[A](s: var SomeSet[A], jsonNode: JsonNode) =
|
||||
## Enables `fromJson` for `HashSet` and `OrderedSet` types.
|
||||
##
|
||||
##
|
||||
## See also:
|
||||
## * `toJsonHook proc<#toJsonHook,SomeSet[A]>`_
|
||||
runnableExamples:
|
||||
@@ -348,7 +348,7 @@ proc toJsonHook*[A](s: SomeSet[A]): JsonNode =
|
||||
|
||||
proc fromJsonHook*[T](self: var Option[T], jsonNode: JsonNode) =
|
||||
## Enables `fromJson` for `Option` types.
|
||||
##
|
||||
##
|
||||
## See also:
|
||||
## * `toJsonHook proc<#toJsonHook,Option[T]>`_
|
||||
runnableExamples:
|
||||
@@ -383,7 +383,7 @@ proc toJsonHook*[T](self: Option[T]): JsonNode =
|
||||
|
||||
proc fromJsonHook*(a: var StringTableRef, b: JsonNode) =
|
||||
## Enables `fromJson` for `StringTableRef` type.
|
||||
##
|
||||
##
|
||||
## See also:
|
||||
## * `toJsonHook` proc<#toJsonHook,StringTableRef>`_
|
||||
runnableExamples:
|
||||
@@ -401,7 +401,7 @@ proc fromJsonHook*(a: var StringTableRef, b: JsonNode) =
|
||||
|
||||
proc toJsonHook*(a: StringTableRef): JsonNode =
|
||||
## Enables `toJson` for `StringTableRef` type.
|
||||
##
|
||||
##
|
||||
## See also:
|
||||
## * `fromJsonHook` proc<#fromJsonHook,StringTableRef,JsonNode>`_
|
||||
runnableExamples:
|
||||
|
||||
@@ -74,7 +74,7 @@ when defined(js):
|
||||
system.`+`(a, b)
|
||||
{.pop.}
|
||||
|
||||
elif defined(posix):
|
||||
elif defined(posix) and not defined(osx):
|
||||
import posix
|
||||
|
||||
elif defined(windows):
|
||||
|
||||
@@ -4,7 +4,7 @@ this can eventually be moved to std/os and `walkDirRec` can be implemented in te
|
||||
to avoid duplication
|
||||
]##
|
||||
|
||||
import std/[os,strutils]
|
||||
import os, strutils
|
||||
|
||||
type
|
||||
PathEntry* = object
|
||||
|
||||
@@ -33,8 +33,8 @@ runnableExamples:
|
||||
## * `hashes module<hashes.html>`_ for efficient computations of hash values for diverse Nim types
|
||||
## * `md5 module<md5.html>`_ implements the MD5 checksum algorithm
|
||||
|
||||
import std/strutils
|
||||
from std/endians import bigEndian32, bigEndian64
|
||||
import strutils
|
||||
from endians import bigEndian32, bigEndian64
|
||||
|
||||
const Sha1DigestSize = 20
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ template `[]`*(a: Wrapnil): untyped =
|
||||
else:
|
||||
default(T)
|
||||
|
||||
import std/macros
|
||||
import macros
|
||||
|
||||
proc replace(n: NimNode): NimNode =
|
||||
if n.kind == nnkPar:
|
||||
|
||||
Reference in New Issue
Block a user