From 2f1ea85776a0ccb2f401682743ef68303984af80 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 22 Mar 2021 22:40:44 -0500 Subject: [PATCH 1/8] update react-map-gl version --- modules/demo/deck/3d-heatmap/package.json | 2 +- modules/demo/deck/3d-tiles/package.json | 2 +- modules/demo/deck/ShanghaiData/package.json | 2 +- modules/demo/deck/arc/package.json | 2 +- modules/demo/deck/brushing/package.json | 2 +- modules/demo/deck/data-filter/package.json | 2 +- modules/demo/deck/geojson/package.json | 2 +- modules/demo/deck/heatmap/package.json | 2 +- modules/demo/deck/highway/package.json | 2 +- modules/demo/deck/icon/package.json | 2 +- modules/demo/deck/line/package.json | 2 +- modules/demo/deck/playground/package.json | 2 +- modules/demo/deck/scatterplot/package.json | 2 +- modules/demo/deck/scenegraph-layer/package.json | 2 +- modules/demo/deck/screen-grid/package.json | 2 +- modules/demo/deck/tagmap/package.json | 2 +- modules/demo/deck/text-layer/package.json | 2 +- modules/demo/deck/trips/package.json | 2 +- modules/demo/deck/worldmap/package.json | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/modules/demo/deck/3d-heatmap/package.json b/modules/demo/deck/3d-heatmap/package.json index 0166698ad..b85e70dd8 100644 --- a/modules/demo/deck/3d-heatmap/package.json +++ b/modules/demo/deck/3d-heatmap/package.json @@ -16,7 +16,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", diff --git a/modules/demo/deck/3d-tiles/package.json b/modules/demo/deck/3d-tiles/package.json index 88c1dbf2e..ef2acf71b 100644 --- a/modules/demo/deck/3d-tiles/package.json +++ b/modules/demo/deck/3d-tiles/package.json @@ -18,7 +18,7 @@ "@loaders.gl/3d-tiles": "^2.1.1", "react": "^16.8.0", "react-dom": "^16.8.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", diff --git a/modules/demo/deck/ShanghaiData/package.json b/modules/demo/deck/ShanghaiData/package.json index 98b7c662d..a3c4f8967 100644 --- a/modules/demo/deck/ShanghaiData/package.json +++ b/modules/demo/deck/ShanghaiData/package.json @@ -15,7 +15,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", diff --git a/modules/demo/deck/arc/package.json b/modules/demo/deck/arc/package.json index c1a53b620..2fd9688e3 100644 --- a/modules/demo/deck/arc/package.json +++ b/modules/demo/deck/arc/package.json @@ -16,7 +16,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", diff --git a/modules/demo/deck/brushing/package.json b/modules/demo/deck/brushing/package.json index 24145e302..924f1ad29 100644 --- a/modules/demo/deck/brushing/package.json +++ b/modules/demo/deck/brushing/package.json @@ -16,7 +16,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", diff --git a/modules/demo/deck/data-filter/package.json b/modules/demo/deck/data-filter/package.json index cfc4db3ff..61aeac73a 100644 --- a/modules/demo/deck/data-filter/package.json +++ b/modules/demo/deck/data-filter/package.json @@ -17,7 +17,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0", + "react-map-gl": "6.1.10", "styletron-engine-atomic": "^1.4.0", "styletron-react": "^5.2.0" }, diff --git a/modules/demo/deck/geojson/package.json b/modules/demo/deck/geojson/package.json index d87b686c1..88ed906d0 100644 --- a/modules/demo/deck/geojson/package.json +++ b/modules/demo/deck/geojson/package.json @@ -16,7 +16,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", diff --git a/modules/demo/deck/heatmap/package.json b/modules/demo/deck/heatmap/package.json index f14820afa..4d13fa88f 100644 --- a/modules/demo/deck/heatmap/package.json +++ b/modules/demo/deck/heatmap/package.json @@ -15,7 +15,7 @@ "deck.gl": "^8.1.0", "react": "^16.0.0", "react-dom": "^16.0.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", diff --git a/modules/demo/deck/highway/package.json b/modules/demo/deck/highway/package.json index f23fd6d35..02c0cd6fc 100644 --- a/modules/demo/deck/highway/package.json +++ b/modules/demo/deck/highway/package.json @@ -17,7 +17,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", diff --git a/modules/demo/deck/icon/package.json b/modules/demo/deck/icon/package.json index 4df991824..c4d69fdb3 100644 --- a/modules/demo/deck/icon/package.json +++ b/modules/demo/deck/icon/package.json @@ -15,7 +15,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0", + "react-map-gl": "6.1.10", "supercluster": "^6.0.1" }, "devDependencies": { diff --git a/modules/demo/deck/line/package.json b/modules/demo/deck/line/package.json index 308700529..96b41d90f 100644 --- a/modules/demo/deck/line/package.json +++ b/modules/demo/deck/line/package.json @@ -15,7 +15,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", diff --git a/modules/demo/deck/playground/package.json b/modules/demo/deck/playground/package.json index df34d51e8..c2ea8e2e0 100644 --- a/modules/demo/deck/playground/package.json +++ b/modules/demo/deck/playground/package.json @@ -24,7 +24,7 @@ "react": "~16.9.0", "react-ace": "^6.1.4", "react-dom": "~16.9.0", - "react-map-gl": "^5.0.0", + "react-map-gl": "6.1.10", "react-virtualized-auto-sizer": "^1.0.2" }, "devDependencies": { diff --git a/modules/demo/deck/scatterplot/package.json b/modules/demo/deck/scatterplot/package.json index c43e83dbb..631a2aec7 100644 --- a/modules/demo/deck/scatterplot/package.json +++ b/modules/demo/deck/scatterplot/package.json @@ -15,7 +15,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", diff --git a/modules/demo/deck/scenegraph-layer/package.json b/modules/demo/deck/scenegraph-layer/package.json index d0c6e3c28..176f4abf1 100644 --- a/modules/demo/deck/scenegraph-layer/package.json +++ b/modules/demo/deck/scenegraph-layer/package.json @@ -16,7 +16,7 @@ "@loaders.gl/gltf": "^2.1.1", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", diff --git a/modules/demo/deck/screen-grid/package.json b/modules/demo/deck/screen-grid/package.json index b9f8e23be..a207cefe6 100644 --- a/modules/demo/deck/screen-grid/package.json +++ b/modules/demo/deck/screen-grid/package.json @@ -15,7 +15,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", diff --git a/modules/demo/deck/tagmap/package.json b/modules/demo/deck/tagmap/package.json index 62bce78e9..f6765800b 100644 --- a/modules/demo/deck/tagmap/package.json +++ b/modules/demo/deck/tagmap/package.json @@ -16,7 +16,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0", + "react-map-gl": "6.1.10", "tagmap.js": "^1.1.1" }, "devDependencies": { diff --git a/modules/demo/deck/text-layer/package.json b/modules/demo/deck/text-layer/package.json index 33c4180b7..64b390861 100644 --- a/modules/demo/deck/text-layer/package.json +++ b/modules/demo/deck/text-layer/package.json @@ -15,7 +15,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", diff --git a/modules/demo/deck/trips/package.json b/modules/demo/deck/trips/package.json index 2490815c1..320d2ef8a 100644 --- a/modules/demo/deck/trips/package.json +++ b/modules/demo/deck/trips/package.json @@ -15,7 +15,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", diff --git a/modules/demo/deck/worldmap/package.json b/modules/demo/deck/worldmap/package.json index 2f6e0b20f..f356d8bfd 100644 --- a/modules/demo/deck/worldmap/package.json +++ b/modules/demo/deck/worldmap/package.json @@ -16,7 +16,7 @@ "deck.gl": "^8.1.0", "react": "^16.3.0", "react-dom": "^16.3.0", - "react-map-gl": "^5.0.0" + "react-map-gl": "6.1.10" }, "devDependencies": { "@babel/core": "^7.4.0", From 3f47cb938df1eceb1b8bf53c0dacb32771db1600 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 22 Mar 2021 22:47:10 -0500 Subject: [PATCH 2/8] add dotenv to bin scripts, default parallel_level to 1 --- modules/core/bin/cmake-js/linux.sh | 14 +++++--- modules/core/bin/exec.js | 53 +++++++++++++----------------- modules/core/package.json | 1 + package.json | 1 + scripts/exec.js | 10 +++--- scripts/relink-bin-dirs/linux.sh | 2 ++ yarn.lock | 31 +++++++++-------- 7 files changed, 60 insertions(+), 52 deletions(-) diff --git a/modules/core/bin/cmake-js/linux.sh b/modules/core/bin/cmake-js/linux.sh index 910a354b6..e3f6c82b1 100755 --- a/modules/core/bin/cmake-js/linux.sh +++ b/modules/core/bin/cmake-js/linux.sh @@ -16,23 +16,27 @@ done if [[ "$debug" == "false" ]]; then args="${args:+$args }-O build/Release"; compile_commands_json="build/Release/compile_commands.json"; + args="${args:+$args }--CDCMAKE_LIBRARY_OUTPUT_DIRECTORY=$(realpath -m build/Release)"; else args="${args:+$args }-D -O build/Debug"; compile_commands_json="build/Debug/compile_commands.json"; + args="${args:+$args }--CDCMAKE_LIBRARY_OUTPUT_DIRECTORY=$(realpath -m build/Debug)"; fi RAPIDS_CORE_PATH=$(dirname $(realpath "$0")) RAPIDS_CORE_PATH=$(realpath "$RAPIDS_CORE_PATH/../../") RAPIDS_MODULES_PATH=$(realpath "$RAPIDS_CORE_PATH/../") -if [ -z ${JOBS:+x} ]; then - JOBS=$(node -e "console.log(require('os').cpus().length-2)"); -fi +echo "\ +===================================================== +PARALLEL_LEVEL=${PARALLEL_LEVEL:-1} +=====================================================" -PARALLEL_LEVEL=$JOBS CMAKE_BUILD_PARALLEL_LEVEL=$JOBS \ +PARALLEL_LEVEL=${PARALLEL_LEVEL:-1} \ +CMAKE_BUILD_PARALLEL_LEVEL=${PARALLEL_LEVEL:-1} \ CCACHE_CONFIGPATH="$RAPIDS_MODULES_PATH/.cache/ccache" \ HOME="$RAPIDS_CORE_PATH" \ - cmake-js $args + cmake-js ${args} ln -f -s $compile_commands_json compile_commands.json diff --git a/modules/core/bin/exec.js b/modules/core/bin/exec.js index 9031e0af0..169027fc5 100755 --- a/modules/core/bin/exec.js +++ b/modules/core/bin/exec.js @@ -1,41 +1,34 @@ #!/usr/bin/env node -var Path = require('path'); -var binp = Path.join(__dirname, '../', 'node_modules', '.bin'); -var opts = { +module.exports = function (cmd, args, env = {}) { + + require('dotenv').config(); + + var Path = require('path'); + var env_ = Object.assign({}, process.env, env); + var binp = Path.join(__dirname, '../', 'node_modules', '.bin'); + var opts = { shell: true, stdio: 'inherit', cwd: process.cwd(), - env: Object.assign({}, process.env, { - PATH: `${process.env.PATH}:${binp}` }) -}; - -module.exports = function(cmd, args) { - - var name = (() => { - switch (require('os').platform()) { - case 'win32': - return 'windows.sh' - default: - return 'linux.sh' - } - })(); - - var proc = require('child_process').spawn( - Path.join(__dirname, cmd, name), args, opts); + env: Object.assign({}, env_, { + PATH: `${env_.PATH}:${binp}` + }) + }; - ['SIGTERM', 'SIGINT', 'SIGBREAK', 'SIGHUP'].forEach((signal) => { - process.on(signal, () => proc.kill(signal)) - }); + var name = (() => { + switch (require('os').platform()) { + case 'win32': + return 'windows.sh' + default: + return 'linux.sh' + } + })(); - proc.on('exit', (code, signal) => { - // exit code could be null when OS kills the process(out of memory, etc) or - // due to node handling it but if the signal is SIGINT the user exited the - // process so we want exit code 0 - process.exit(code === null ? signal === 'SIGINT' ? 0 : 1 : code); - }); + return require('child_process').spawnSync( + Path.join(__dirname, cmd, name), args, opts); } if (require.main === module) { - module.exports(process.argv[2], process.argv.slice(3)); + module.exports(process.argv[2], process.argv.slice(3)); } diff --git a/modules/core/package.json b/modules/core/package.json index 05736788d..fcfeca1aa 100644 --- a/modules/core/package.json +++ b/modules/core/package.json @@ -36,6 +36,7 @@ }, "devDependencies": { "@types/jest": "25.2.2", + "dotenv": "8.2.0", "jest": "26.6.3", "jest-silent-reporter": "0.1.2", "esm": "3.2.25", diff --git a/package.json b/package.json index 19ebd46aa..22f79548c 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "@typescript-eslint/eslint-plugin": "4.17.0", "@typescript-eslint/parser": "4.17.0", "cmake-js": "6.0.0", + "dotenv": "8.2.0", "eslint": "7.22.0", "lerna": "3.22.1", "lint-staged": "10.5.1", diff --git a/scripts/exec.js b/scripts/exec.js index 23056e79a..2d27e68bc 100755 --- a/scripts/exec.js +++ b/scripts/exec.js @@ -1,5 +1,7 @@ #!/usr/bin/env node +require('dotenv').config(); + var name = (() => { switch (require('os').platform()) { case 'win32': return 'win32.sh'; @@ -7,12 +9,12 @@ var name = (() => { } })(); -var Path = require('path'); +var Path = require('path'); var rootdir = Path.join(__dirname, '../'); var cmdpath = Path.join(__dirname, process.argv[2]); -var cwd = Path.join(cmdpath, Path.relative(cmdpath, rootdir)); +var cwd = Path.join(cmdpath, Path.relative(cmdpath, rootdir)); require('child_process') .spawnSync(Path.join(cmdpath, name), // command - process.argv.slice(3), - {stdio: 'inherit', cwd}); + process.argv.slice(3), + { stdio: 'inherit', cwd }); diff --git a/scripts/relink-bin-dirs/linux.sh b/scripts/relink-bin-dirs/linux.sh index a9eb99200..5d07296ed 100755 --- a/scripts/relink-bin-dirs/linux.sh +++ b/scripts/relink-bin-dirs/linux.sh @@ -24,6 +24,8 @@ for DIR in $DIRS; do if [[ "$BIN" != $DIR/node_modules/.bin ]]; then rm -rf "$DIR/node_modules/.bin" ln -sf "$BIN" "$DIR/node_modules/.bin" + # copy the .env settings file + touch ".env" && cp ".env" "$DIR/.env" # copy the ESLint settings file (for the VSCode ESLint plugin) cp ".eslintrc.js" "$DIR/.eslintrc.js" # remove the local .cache symlink diff --git a/yarn.lock b/yarn.lock index 36b6a5334..147ec10e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6302,6 +6302,11 @@ dot-prop@^5.1.0: dependencies: is-obj "^2.0.0" +dotenv@8.2.0: + version "8.2.0" + resolved "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + draco3d@^1.3.6: version "1.4.1" resolved "https://registry.npmjs.org/draco3d/-/draco3d-1.4.1.tgz#2abdcf7b59caaac50f7e189aec454176c57146b2" @@ -6348,9 +6353,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.3.649: - version "1.3.693" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.693.tgz#5089c506a925c31f93fcb173a003a22e341115dd" - integrity sha512-vUdsE8yyeu30RecppQtI+XTz2++LWLVEIYmzeCaCRLSdtKZ2eXqdJcrs85KwLiPOPVc6PELgWyXBsfqIvzGZag== + version "1.3.694" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.694.tgz#f5dbbec0ce9bbf93487b7d38b8396f4e58ab51c8" + integrity sha512-8YJ/OZjbK5luOd27dmk34B47oa/zNGRHrKTEmfO3qPns1kFAJ36Lb+OtYzNlCoXtkPYuDbX0ztofuL7ArMHJkQ== elliptic@^6.5.3: version "6.5.4" @@ -12072,16 +12077,16 @@ react-is@^16.12.0, react-is@^16.3.2, react-is@^16.8.1, react-is@^16.8.6: integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== react-is@^17.0.1: - version "17.0.1" - resolved "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" - integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA== + version "17.0.2" + resolved "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" + integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== -react-map-gl@6.1.10, react-map-gl@^5.0.0, react-map-gl@^5.1.0: +react-map-gl@6.1.10, react-map-gl@^5.1.0: version "6.1.10" resolved "https://registry.npmjs.org/react-map-gl/-/react-map-gl-6.1.10.tgz#8616562d1439f5718c02e5a69379d8f200f7a099" integrity sha512-TZ0GSMSY3fK6bh5wTnoUHdJRyhJLmr2flZBonTR+7Br5Q/iAtOSnr5PMH8G/IE9KZ8AmwpyzdujvQXTI3ZycUA== @@ -12438,9 +12443,9 @@ regjsgen@^0.5.1: integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== regjsparser@^0.6.4: - version "0.6.7" - resolved "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.7.tgz#c00164e1e6713c2e3ee641f1701c4b7aa0a7f86c" - integrity sha512-ib77G0uxsA2ovgiYbCVGx4Pv3PSttAx2vIwidqQzbL2U5S4Q+j00HdSAneSBuyVcMvEnTXMjiGgB+DlXozVhpQ== + version "0.6.8" + resolved "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.8.tgz#4532c3da36d75d56e3f394ce2ea6842bde7496bd" + integrity sha512-3weFrFQREJhJ2PW+iCGaG6TenyzNSZgsBKZ/oEf6Trme31COSeIWhHw9O6FPkuXktfx+b6Hf/5e6dKPHaROq2g== dependencies: jsesc "~0.5.0" @@ -12911,9 +12916,9 @@ semver@7.0.0: integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== semver@7.x, semver@^7.0.0, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: - version "7.3.4" - resolved "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" - integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + version "7.3.5" + resolved "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== dependencies: lru-cache "^6.0.0" From 5f043b5238b3265484f65c6c3912a55f50d286e1 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 22 Mar 2021 22:47:30 -0500 Subject: [PATCH 3/8] don't hide the .cache folder from VSCode file viewer --- node-rapids.code-workspace | 1 - 1 file changed, 1 deletion(-) diff --git a/node-rapids.code-workspace b/node-rapids.code-workspace index 1f3dff448..672e232a6 100644 --- a/node-rapids.code-workspace +++ b/node-rapids.code-workspace @@ -171,7 +171,6 @@ "files.exclude": { "**/.git": true, "**/.DS_Store": true, - "**/.cache": true, "**/.cmake-js": true }, "files.watcherExclude": { From eb81185e336b7ee575601e4b8adc9722c46ee997 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 22 Mar 2021 22:49:26 -0500 Subject: [PATCH 4/8] Fix issue where CMAKE_CUDA_ARCHITECTURES is reset if configure/build are done separately --- docker-compose.yml | 6 +++--- modules/core/cmake/Modules/ConfigureCUDA.cmake | 16 ++++++++++++---- modules/core/cmake/Modules/ConfigureCUDF.cmake | 9 +++++++++ .../core/cmake/Modules/ConfigureCUSPATIAL.cmake | 9 +++++++++ 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index c90e42879..6cd0ce034 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -141,9 +141,9 @@ services: - *usr_share_icons environment: <<: *common_environment_variables - # Build for CUDA architecture sm_72 - CUDAARCHS: "72-real" - JOBS: 2 + # Build SASS and PTX for CUDA architecture sm_72 + CUDAARCHS: "${CUDAARCHS:-72-real}" + PARALLEL_LEVEL: "${PARALLEL_LEVEL:-2}" cap_add: - SYS_ADMIN - SYS_PTRACE diff --git a/modules/core/cmake/Modules/ConfigureCUDA.cmake b/modules/core/cmake/Modules/ConfigureCUDA.cmake index dff1b7e4c..a009d772a 100644 --- a/modules/core/cmake/Modules/ConfigureCUDA.cmake +++ b/modules/core/cmake/Modules/ConfigureCUDA.cmake @@ -28,15 +28,15 @@ if(DEFINED ENV{CUDAARCHS}) if("$ENV{CUDAARCHS}" STREQUAL "") # If CUDAARCHS is , auto-detect current GPU arch set(NODE_RAPIDS_CMAKE_BUILD_FOR_DETECTED_ARCHS TRUE) - message(STATUS "Auto-detecting GPU architecture because the CUDAARCH environment variable = '") + message(STATUS "Auto-detecting GPU architecture because the CUDAARCHS environment variable = '") elseif("$ENV{CUDAARCHS}" STREQUAL "ALL") # If CUDAARCHS is "ALL," build for all supported archs set(NODE_RAPIDS_CMAKE_BUILD_FOR_ALL_CUDA_ARCHS TRUE) - message(STATUS "Building all supported GPU architectures because the CUDAARCH environment variable = 'ALL'") + message(STATUS "Building all supported GPU architectures because the CUDAARCHS environment variable = 'ALL'") else() # Use the current value of the CUDAARCHS env var set(CMAKE_CUDA_ARCHITECTURES "$ENV{CUDAARCHS}") - message(STATUS "Using GPU architectures from CUDAARCH env var: $ENV{CUDAARCHS}") + message(STATUS "Using GPU architectures from CUDAARCHS env var: $ENV{CUDAARCHS}") endif() elseif(DEFINED CMAKE_CUDA_ARCHITECTURES) if(CMAKE_CUDA_ARCHITECTURES STREQUAL "") @@ -54,7 +54,7 @@ elseif(DEFINED CMAKE_CUDA_ARCHITECTURES) else() # Fall-back to auto-detecting the current GPU architecture set(NODE_RAPIDS_CMAKE_BUILD_FOR_DETECTED_ARCHS TRUE) - message(STATUS "Auto-detecting GPU architectures because CUDAARCH env var is not defined, and CMAKE_CUDA_ARCHITECTURES was not specified.") + message(STATUS "Auto-detecting GPU architectures because CUDAARCHS env var is not defined, and CMAKE_CUDA_ARCHITECTURES was not specified.") endif() # Build the list of supported architectures @@ -118,6 +118,14 @@ message(STATUS "BUILD_FOR_DETECTED_ARCHS: ${NODE_RAPIDS_CMAKE_BUILD_FOR_DETECTED message(STATUS "BUILD_FOR_ALL_CUDA_ARCHS: ${NODE_RAPIDS_CMAKE_BUILD_FOR_ALL_CUDA_ARCHS}") message(STATUS "CMAKE_CUDA_ARCHITECTURES: ${CMAKE_CUDA_ARCHITECTURES}") +if (NOT "${CMAKE_CUDA_ARCHITECTURES}" STREQUAL "75-real") + message(FATAL_ERROR "Expected CMAKE_CUDA_ARCHITECTURES to equal 75-real. Got ${CMAKE_CUDA_ARCHITECTURES}") +endif() + +# Unset this first +# unset(CMAKE_CUDA_ARCHITECTURES CACHE) +set(CMAKE_CUDA_ARCHITECTURES "${CMAKE_CUDA_ARCHITECTURES}" CACHE STRING "" FORCE) + # Enable the CUDA language enable_language(CUDA) diff --git a/modules/core/cmake/Modules/ConfigureCUDF.cmake b/modules/core/cmake/Modules/ConfigureCUDF.cmake index 916d53583..38a3597c3 100644 --- a/modules/core/cmake/Modules/ConfigureCUDF.cmake +++ b/modules/core/cmake/Modules/ConfigureCUDF.cmake @@ -24,6 +24,15 @@ function(find_and_configure_cudf VERSION) OUTPUT_VARIABLE NODE_RAPIDS_CPM_SOURCE_CACHE OUTPUT_STRIP_TRAILING_WHITESPACE) + # Have to set these in case configure and build steps are run separately + # TODO: figure out why + set(BUILD_TESTS OFF) + set(BUILD_BENCHMARKS OFF) + set(JITIFY_USE_CACHE ON) + set(CUDA_STATIC_RUNTIME ON) + set(CUDF_USE_ARROW_STATIC ON) + set(PER_THREAD_DEFAULT_STREAM ON) + set(DISABLE_DEPRECATION_WARNING ${DISABLE_DEPRECATION_WARNINGS}) set(CUDF_GENERATED_INCLUDE_DIR ${NODE_RAPIDS_CPM_SOURCE_CACHE}/cudf-build) CPMAddPackage(NAME cudf diff --git a/modules/core/cmake/Modules/ConfigureCUSPATIAL.cmake b/modules/core/cmake/Modules/ConfigureCUSPATIAL.cmake index fc1b176c3..f76bb4df4 100644 --- a/modules/core/cmake/Modules/ConfigureCUSPATIAL.cmake +++ b/modules/core/cmake/Modules/ConfigureCUSPATIAL.cmake @@ -24,6 +24,15 @@ function(find_and_configure_cuspatial VERSION) OUTPUT_VARIABLE NODE_RAPIDS_CPM_SOURCE_CACHE OUTPUT_STRIP_TRAILING_WHITESPACE) + # Have to set these in case configure and build steps are run separately + # TODO: figure out why + set(BUILD_TESTS OFF) + set(BUILD_BENCHMARKS OFF) + set(JITIFY_USE_CACHE ON) + set(CUDA_STATIC_RUNTIME ON) + set(CUDF_USE_ARROW_STATIC ON) + set(PER_THREAD_DEFAULT_STREAM ON) + set(DISABLE_DEPRECATION_WARNING ${DISABLE_DEPRECATION_WARNINGS}) set(CUDF_GENERATED_INCLUDE_DIR ${NODE_RAPIDS_CPM_SOURCE_CACHE}/cudf-build) CPMAddPackage(NAME cuspatial From d4570fdcea11dd756bf84f9376694b96ac3e5730 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 22 Mar 2021 22:50:39 -0500 Subject: [PATCH 5/8] use project root as the ccache base dir --- modules/core/cmake/Modules/ccache.conf.in | 14 +++++++------- modules/core/src/index.ts | 4 ++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/modules/core/cmake/Modules/ccache.conf.in b/modules/core/cmake/Modules/ccache.conf.in index cb39eb09b..222f38db4 100644 --- a/modules/core/cmake/Modules/ccache.conf.in +++ b/modules/core/cmake/Modules/ccache.conf.in @@ -1,9 +1,9 @@ -max_size = 0 -hash_dir = false +max_size=0 +hash_dir=false # let ccache preserve C++ comments, because some of them may be meaningful to the compiler -keep_comments_cpp = true -base_dir = @NODE_RAPIDS_MODULES_BASE_DIR@ -cache_dir = @NODE_RAPIDS_CMAKE_CCACHE_DIR@ -compiler_check = %compiler% --version +keep_comments_cpp=true +base_dir=@NODE_RAPIDS_BASE_DIR@ +cache_dir=@NODE_RAPIDS_CMAKE_CCACHE_DIR@ +compiler_check=%compiler% --version # Uncomment to debug ccache preprocessor errors/cache misses -# log_file = @NODE_RAPIDS_CMAKE_CCACHE_DIR@/ccache.log +# log_file=@NODE_RAPIDS_CMAKE_CCACHE_DIR@/ccache.log diff --git a/modules/core/src/index.ts b/modules/core/src/index.ts index 00071b329..525c89ea0 100644 --- a/modules/core/src/index.ts +++ b/modules/core/src/index.ts @@ -18,6 +18,8 @@ export * from './loadnativemodule'; export const modules_path = Path.resolve(__dirname, '..', '..', '..'); +export const project_root_dir_path = Path.resolve(modules_path, '..'); + export const ccache_path = Path.resolve(modules_path, '.cache', 'ccache'); export const cpm_source_cache_path = Path.resolve(modules_path, '.cache', 'cpm'); @@ -25,3 +27,5 @@ export const cpm_source_cache_path = Path.resolve(modules_path, '.cache', 'cpm') export const cpp_include_path = Path.resolve(modules_path, 'core', 'include'); export const cmake_modules_path = Path.resolve(modules_path, 'core', 'cmake', 'Modules'); + +export const cmake_fetchcontent_base = Path.resolve(modules_path, '.cache', 'build'); From 94bf7c20657f70d04a8ff5d11d34bb78f65a2fa7 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 22 Mar 2021 22:51:18 -0500 Subject: [PATCH 6/8] set FETCHCONTENT_BASE_DIR so dependencies will all be built in a common location --- modules/core/cmake/Modules/ConfigureCXX.cmake | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/modules/core/cmake/Modules/ConfigureCXX.cmake b/modules/core/cmake/Modules/ConfigureCXX.cmake index 247c5f5f9..369acf961 100644 --- a/modules/core/cmake/Modules/ConfigureCXX.cmake +++ b/modules/core/cmake/Modules/ConfigureCXX.cmake @@ -32,9 +32,9 @@ if(NODE_RAPIDS_USE_CCACHE) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM_PATH}") else() execute_process(COMMAND node -p - "require('@rapidsai/core').modules_path" + "require('@rapidsai/core').project_root_dir_path" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE NODE_RAPIDS_MODULES_BASE_DIR + OUTPUT_VARIABLE NODE_RAPIDS_BASE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND node -p "require('@rapidsai/core').cmake_modules_path" @@ -67,6 +67,24 @@ execute_process(COMMAND node -p set(ENV{CPM_SOURCE_CACHE} ${NODE_RAPIDS_CPM_SOURCE_CACHE}) message(STATUS "Using CPM source cache: $ENV{CPM_SOURCE_CACHE}") +if (NOT DEFINED ENV{NODE_RAPIDS_USE_LOCAL_DEPS_BUILD_DIRS}) + execute_process(COMMAND node -p + "require('@rapidsai/core').cmake_fetchcontent_base" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE NODE_RAPIDS_FETCHCONTENT_BASE_DIR + OUTPUT_STRIP_TRAILING_WHITESPACE) + + set(FETCHCONTENT_BASE_DIR "${NODE_RAPIDS_FETCHCONTENT_BASE_DIR}") + message(STATUS "Using CMake FetchContent base dir: ${FETCHCONTENT_BASE_DIR}") + + # Can't set these yet because the order of include paths is different + # when using libcudf from a build dir vs. CPM running the CMakeLists.txt. + # set(rmm_ROOT "${FETCHCONTENT_BASE_DIR}/rmm-build") + # set(cudf_ROOT "${FETCHCONTENT_BASE_DIR}/cudf-build") + # # set(cugraph_ROOT "${FETCHCONTENT_BASE_DIR}/cugraph-build") + # set(cuspatial_ROOT "${FETCHCONTENT_BASE_DIR}/cuspatial-build") +endif() + execute_process(COMMAND node -p "require('@rapidsai/core').cpp_include_path" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} From 6733be37a3ab3013fcaf9c61a96956917f232876 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 22 Mar 2021 22:51:30 -0500 Subject: [PATCH 7/8] use CPMFindPackage instead of CPMAddPackage --- modules/core/cmake/Modules/ConfigureCUDF.cmake | 2 +- modules/core/cmake/Modules/ConfigureCUSPATIAL.cmake | 2 +- modules/core/cmake/Modules/ConfigureCuGraph.cmake | 2 +- modules/core/cmake/Modules/ConfigureOpenGLEW.cmake | 2 +- modules/core/cmake/Modules/ConfigureOpenGLFW.cmake | 2 +- modules/core/cmake/Modules/ConfigureRAFT.cmake | 2 +- modules/core/cmake/Modules/ConfigureRMM.cmake | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/core/cmake/Modules/ConfigureCUDF.cmake b/modules/core/cmake/Modules/ConfigureCUDF.cmake index 38a3597c3..77ad65057 100644 --- a/modules/core/cmake/Modules/ConfigureCUDF.cmake +++ b/modules/core/cmake/Modules/ConfigureCUDF.cmake @@ -35,7 +35,7 @@ function(find_and_configure_cudf VERSION) set(DISABLE_DEPRECATION_WARNING ${DISABLE_DEPRECATION_WARNINGS}) set(CUDF_GENERATED_INCLUDE_DIR ${NODE_RAPIDS_CPM_SOURCE_CACHE}/cudf-build) - CPMAddPackage(NAME cudf + CPMFindPackage(NAME cudf VERSION ${VERSION} GIT_REPOSITORY https://github.com/trxcllnt/cudf.git GIT_TAG fix/async-set-value-literal diff --git a/modules/core/cmake/Modules/ConfigureCUSPATIAL.cmake b/modules/core/cmake/Modules/ConfigureCUSPATIAL.cmake index f76bb4df4..590e0607b 100644 --- a/modules/core/cmake/Modules/ConfigureCUSPATIAL.cmake +++ b/modules/core/cmake/Modules/ConfigureCUSPATIAL.cmake @@ -35,7 +35,7 @@ function(find_and_configure_cuspatial VERSION) set(DISABLE_DEPRECATION_WARNING ${DISABLE_DEPRECATION_WARNINGS}) set(CUDF_GENERATED_INCLUDE_DIR ${NODE_RAPIDS_CPM_SOURCE_CACHE}/cudf-build) - CPMAddPackage(NAME cuspatial + CPMFindPackage(NAME cuspatial VERSION ${VERSION} # GIT_REPOSITORY https://github.com/rapidsai/cuspatial.git # GIT_TAG branch-${VERSION} diff --git a/modules/core/cmake/Modules/ConfigureCuGraph.cmake b/modules/core/cmake/Modules/ConfigureCuGraph.cmake index 32407dbdb..22c02de76 100644 --- a/modules/core/cmake/Modules/ConfigureCuGraph.cmake +++ b/modules/core/cmake/Modules/ConfigureCuGraph.cmake @@ -19,7 +19,7 @@ function(find_and_configure_cugraph VERSION) include(get_cpm) include(ConfigureRAFT) - CPMAddPackage(NAME cugraph + CPMFindPackage(NAME cugraph VERSION ${CUGRAPH_VERSION} GIT_REPOSITORY https://github.com/rapidsai/cugraph.git GIT_TAG branch-${CUGRAPH_VERSION} diff --git a/modules/core/cmake/Modules/ConfigureOpenGLEW.cmake b/modules/core/cmake/Modules/ConfigureOpenGLEW.cmake index 82d89e752..5c27c33f4 100644 --- a/modules/core/cmake/Modules/ConfigureOpenGLEW.cmake +++ b/modules/core/cmake/Modules/ConfigureOpenGLEW.cmake @@ -18,7 +18,7 @@ include(get_cpm) add_compile_definitions(GLEW_EGL) -CPMAddPackage(NAME glew +CPMFindPackage(NAME glew VERSION ${GLEW_VERSION} GIT_REPOSITORY https://github.com/Perlmint/glew-cmake.git GIT_TAG glew-cmake-${GLEW_VERSION} diff --git a/modules/core/cmake/Modules/ConfigureOpenGLFW.cmake b/modules/core/cmake/Modules/ConfigureOpenGLFW.cmake index cea3bd4b4..4b25f8108 100644 --- a/modules/core/cmake/Modules/ConfigureOpenGLFW.cmake +++ b/modules/core/cmake/Modules/ConfigureOpenGLFW.cmake @@ -22,7 +22,7 @@ else() set(GLFW_GIT_BRANCH_NAME "${GLFW_VERSION}") endif() -CPMAddPackage(NAME glfw +CPMFindPackage(NAME glfw VERSION ${GLFW_VERSION} GIT_REPOSITORY https://github.com/glfw/glfw.git GIT_TAG ${GLFW_GIT_BRANCH_NAME} diff --git a/modules/core/cmake/Modules/ConfigureRAFT.cmake b/modules/core/cmake/Modules/ConfigureRAFT.cmake index ea641d7f8..e6236b109 100644 --- a/modules/core/cmake/Modules/ConfigureRAFT.cmake +++ b/modules/core/cmake/Modules/ConfigureRAFT.cmake @@ -18,7 +18,7 @@ function(find_and_configure_raft VERSION) include(get_cpm) - CPMAddPackage(NAME raft + CPMFindPackage(NAME raft VERSION ${RAFT_VERSION} GIT_REPOSITORY https://github.com/rapidsai/raft.git GIT_TAG ${RAFT_BRANCH} diff --git a/modules/core/cmake/Modules/ConfigureRMM.cmake b/modules/core/cmake/Modules/ConfigureRMM.cmake index 75d8938aa..6d8ea4efa 100644 --- a/modules/core/cmake/Modules/ConfigureRMM.cmake +++ b/modules/core/cmake/Modules/ConfigureRMM.cmake @@ -18,7 +18,7 @@ function(find_and_configure_rmm VERSION) include(get_cpm) - CPMAddPackage(NAME rmm + CPMFindPackage(NAME rmm VERSION ${RMM_VERSION} GIT_REPOSITORY https://github.com/rapidsai/rmm.git GIT_TAG branch-${RMM_VERSION} From 914d819c8a2ba1db2fa278ba346edfafb69f4804 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Tue, 23 Mar 2021 10:58:10 -0500 Subject: [PATCH 8/8] switch cudf and cuspatial to take advantage of smaller libcudf.so --- modules/core/cmake/Modules/ConfigureCUDF.cmake | 2 +- modules/core/cmake/Modules/ConfigureCUSPATIAL.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/cmake/Modules/ConfigureCUDF.cmake b/modules/core/cmake/Modules/ConfigureCUDF.cmake index 77ad65057..164752c53 100644 --- a/modules/core/cmake/Modules/ConfigureCUDF.cmake +++ b/modules/core/cmake/Modules/ConfigureCUDF.cmake @@ -38,7 +38,7 @@ function(find_and_configure_cudf VERSION) CPMFindPackage(NAME cudf VERSION ${VERSION} GIT_REPOSITORY https://github.com/trxcllnt/cudf.git - GIT_TAG fix/async-set-value-literal + GIT_TAG nr/03232021 GIT_SHALLOW TRUE SOURCE_SUBDIR cpp OPTIONS "BUILD_TESTS OFF" diff --git a/modules/core/cmake/Modules/ConfigureCUSPATIAL.cmake b/modules/core/cmake/Modules/ConfigureCUSPATIAL.cmake index 590e0607b..186143d0d 100644 --- a/modules/core/cmake/Modules/ConfigureCUSPATIAL.cmake +++ b/modules/core/cmake/Modules/ConfigureCUSPATIAL.cmake @@ -42,7 +42,7 @@ function(find_and_configure_cuspatial VERSION) GIT_REPOSITORY https://github.com/trxcllnt/cuspatial.git # Can also use a local path to your repo clone for testing # GIT_REPOSITORY /home/ptaylor/dev/rapids/cuspatial - GIT_TAG fix/async-set-value-literal + GIT_TAG nr/03232021 GIT_SHALLOW TRUE SOURCE_SUBDIR cpp OPTIONS "BUILD_TESTS OFF"