From ae5094e1432cef8c32575915ae1e19deffe7df61 Mon Sep 17 00:00:00 2001 From: alaviss Date: Sun, 15 Mar 2020 22:44:07 +0000 Subject: [PATCH 1/3] azure-pipelines: walkaround issues with triggers (#13657) See https://status.dev.azure.com/_event/179641421 --- azure-pipelines.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e04974f5bd514..310feb8f72975 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,3 +1,12 @@ +trigger: + branches: + include: + - '*' +pr: + branches: + include: + - '*' + jobs: - job: packages From fd3583803e8e310c2c6f60c79aab42a56b931a56 Mon Sep 17 00:00:00 2001 From: Joey Date: Mon, 16 Mar 2020 01:59:16 -0600 Subject: [PATCH 2/3] Fix gdb scripts (#13658) * Fix nim-gdb and rename to nim-gdb.bash * Add symlink to nim-gdb.bash * Fix windows debug script * Add PR suggestions * Make readlink check easier to maintain/understand * Swap symlinks --- bin/nim-gdb | 20 +++++++++----------- bin/nim-gdb.bash | 1 + bin/nim-gdb.bat | 6 +----- 3 files changed, 11 insertions(+), 16 deletions(-) create mode 120000 bin/nim-gdb.bash diff --git a/bin/nim-gdb b/bin/nim-gdb index e6e3a1c4944ff..b9956073bdd77 100755 --- a/bin/nim-gdb +++ b/bin/nim-gdb @@ -5,25 +5,23 @@ set -e which nim > /dev/null || (echo "nim not in PATH"; exit 1) which gdb > /dev/null || (echo "gdb not in PATH"; exit 1) -which readlink > /dev/null || which greadlink > /dev/null || (echo "readlink not in PATH. Please install coreutils from brew if on Mac."; exit 1) -nreadlink () { - (which greadlink > /dev/null && greadlink "$@") || (which readlink > /dev/null && readlink "$@") || echo "Readlink could not be found" -} +if [[ "$(uname -s)" == "Darwin" ]]; then + which greadlink > /dev/null || (echo "readlink not in PATH. Please install coreutils from homebrew."; exit 1) + READLINK=greadlink +else + which readlink > /dev/null || (echo "readlink not in PATH."; exit 1) + READLINK=readlink +fi # Find out where the pretty printer Python module is -NIM_SYSROOT=$(dirname $(dirname $(nreadlink -e $(which nim)))) +NIM_SYSROOT=$(dirname $(dirname $($READLINK -e $(which nim)))) GDB_PYTHON_MODULE_PATH="$NIM_SYSROOT/tools/nim-gdb.py" # Run GDB with the additional arguments that load the pretty printers # Set the environment variable `NIM_GDB` to overwrite the call to a # different/specific command (defaults to `gdb`). NIM_GDB="${NIM_GDB:-gdb}" - -# This is needed for some reason. I can't get -eval-command to work ever -echo "source $GDB_PYTHON_MODULE_PATH" > gdbcommands.txt # exec replaces the new process of bash with gdb. It is always good to # have fewer processes. -exec ${NIM_GDB} --command="gdbcommands.txt" "$@" - -rm gdbcommands.txt +exec "${NIM_GDB}" -eval-command="source $GDB_PYTHON_MODULE_PATH" "$@" diff --git a/bin/nim-gdb.bash b/bin/nim-gdb.bash new file mode 120000 index 0000000000000..f6eba4b0c4040 --- /dev/null +++ b/bin/nim-gdb.bash @@ -0,0 +1 @@ +nim-gdb \ No newline at end of file diff --git a/bin/nim-gdb.bat b/bin/nim-gdb.bat index 58b66b61fb399..453d700bd2eb4 100644 --- a/bin/nim-gdb.bat +++ b/bin/nim-gdb.bat @@ -6,11 +6,7 @@ for %%i in ("%NIM_BIN%\..\") do (set NIM_ROOT=%%~fi) set @GDB_PYTHON_MODULE_PATH=%NIM_ROOT%\tools\nim-gdb.py set @NIM_GDB=gdb.exe -@echo source %@GDB_PYTHON_MODULE_PATH%> wingdbcommand.txt - -%@NIM_GDB% --command="wingdbcommand.txt" %* - -del wingdbcommand.txt /f /q +%@NIM_GDB% -eval-command="source %@GDB_PYTHON_MODULE_PATH%" %* EXIT /B %ERRORLEVEL% @echo on From fe53f6ef4f4fe296d70c68b8c56d3c8afa06a168 Mon Sep 17 00:00:00 2001 From: Kartik Saranathan <278928+Kartiku@users.noreply.github.com> Date: Mon, 16 Mar 2020 04:07:10 -0400 Subject: [PATCH 3/3] fix typo (#13660) [ci skip] --- doc/nimc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/nimc.rst b/doc/nimc.rst index b67c05a0e1eee..138f1e7f00fcb 100644 --- a/doc/nimc.rst +++ b/doc/nimc.rst @@ -160,7 +160,7 @@ passed as a command line argument to the compiler. The ``nim`` executable processes configuration files in the following directories (in this order; later files overwrite previous settings): -1) ``$nim/config/nim.cfg``, ``/etc/nim/nim.cfg`` (UNIX) or ``\config\nim.cfg`` (Windows). This file can be skipped with the ``--skipCfg`` command line option. +1) ``$nim/config/nim.cfg``, ``/etc/nim/nim.cfg`` (UNIX) or ``\config\nim.cfg`` (Windows). This file can be skipped with the ``--skipCfg`` command line option. 2) If environment variable ``XDG_CONFIG_HOME`` is defined, ``$XDG_CONFIG_HOME/nim/nim.cfg`` or ``~/.config/nim/nim.cfg`` (POSIX) or ``%APPDATA%/nim/nim.cfg`` (Windows). This file can be skipped with the ``--skipUserCfg`` command line option. 3) ``$parentDir/nim.cfg`` where ``$parentDir`` stands for any parent directory of the project file's path. These files can be skipped with the ``--skipParentCfg`` command line option. 4) ``$projectDir/nim.cfg`` where ``$projectDir`` stands for the project file's path. This file can be skipped with the ``--skipProjCfg`` command line option.