Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 a9b62de)
  • Loading branch information
Araq authored and narimiran committed Apr 28, 2021
1 parent 424a00d commit ba02bf5
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .builds/freebsd.yml
Expand Up @@ -15,7 +15,7 @@ environment:
tasks:
- setup: |
cd Nim
git clone --depth 1 -q https://github.com/nim-lang/csources.git
git clone --depth 1 -q https://github.com/nim-lang/csources_v1.git csources
gmake -C csources -j $(sysctl -n hw.ncpu)
bin/nim c --skipUserCfg --skipParentCfg koch
echo 'export PATH=$HOME/Nim/bin:$PATH' >> $HOME/.buildenv
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_docs.yml
Expand Up @@ -59,7 +59,7 @@ jobs:
id: csources-version
shell: bash
run: |
sha=$(git ls-remote https://github.com/nim-lang/csources master | cut -f 1)
sha=$(git ls-remote https://github.com/nim-lang/csources_v1 master | cut -f 1)
echo "::set-output name=sha::$sha"
- name: 'Get prebuilt csources from cache'
Expand All @@ -73,7 +73,7 @@ jobs:
if: steps.csources-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: nim-lang/csources
repository: nim-lang/csources_v1
path: csources

- name: 'Build 1-stage compiler from csources'
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Expand Up @@ -53,7 +53,7 @@ jobs:
- checkout: self
fetchDepth: 1

- bash: git clone --depth 1 https://github.com/nim-lang/csources
- bash: git clone --depth 1 https://github.com/nim-lang/csources_v1 csources
displayName: 'Checkout Nim csources'

- task: NodeTool@0
Expand Down
2 changes: 1 addition & 1 deletion ci/build.bat
Expand Up @@ -2,7 +2,7 @@ REM Some debug info
echo "Running on %CI_RUNNER_ID% (%CI_RUNNER_DESCRIPTION%) with tags %CI_RUNNER_TAGS%."
gcc -v

git clone --depth 1 https://github.com/nim-lang/csources.git
git clone --depth 1 https://github.com/nim-lang/csources_v1.git csources
cd csources
call build64.bat
cd ..
Expand Down
2 changes: 1 addition & 1 deletion ci/build.sh
@@ -1,7 +1,7 @@
sh ci/deps.sh

# Build from C sources.
git clone --depth 1 https://github.com/nim-lang/csources.git
git clone --depth 1 https://github.com/nim-lang/csources_v1.git csources
cd csources
sh build.sh
cd ..
Expand Down
2 changes: 1 addition & 1 deletion ci/nsis_build.bat
Expand Up @@ -25,7 +25,7 @@ Rem Build csources
koch csources -d:release || exit /b

rem Grab C sources and nimsuggest
git clone --depth 1 https://github.com/nim-lang/csources.git
git clone --depth 1 https://github.com/nim-lang/csources_v1.git csources

set PATH=%CD%\bin;%PATH%

Expand Down
2 changes: 1 addition & 1 deletion compiler/vmgen.nim
Expand Up @@ -16,7 +16,7 @@
# types that use the 'node' field; the reason is that slots are
# re-used in a register based VM. Example:
#
#..code-block:: nim
#.. code-block:: nim
# let s = a & b # no matter what, create fresh node
# s = a & b # no matter what, keep the node
#
Expand Down
2 changes: 2 additions & 0 deletions lib/pure/os.nim
Expand Up @@ -943,6 +943,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>`_
Expand Down
2 changes: 1 addition & 1 deletion lib/std/monotimes.nim
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions lib/std/wrapnils.nim
@@ -1,6 +1,6 @@
## This module allows chains of field-access and indexing where the LHS can be nil.
## This simplifies code by reducing need for if-else branches around intermediate values
## that maybe be nil.
## that may be nil.
##
## Note: experimental module and relies on {.experimental: "dotOperators".}
## Unstable API.
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ba02bf5

Please sign in to comment.