From 247380263102ab85ac8aeabf3b61ed8b7b3f948d Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Thu, 17 Aug 2017 12:22:22 -0400 Subject: [PATCH 01/34] yakkety is obsolete and will not accept new uploads --- BUILD-PPA.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/BUILD-PPA.md b/BUILD-PPA.md index 17ee32c6..47ae672f 100644 --- a/BUILD-PPA.md +++ b/BUILD-PPA.md @@ -33,13 +33,6 @@ Build-Depends: git, cmake, default-jdk, clang, pkg-config, vim-common, libjavasc Depends: libjavascriptcoregtk-4.0-bin, libzip4, libicu55 ``` -If building for yakkety: - -``` -Build-Depends: git, cmake, default-jdk, clang, pkg-config, vim-common, libjavascriptcoregtk-4.0-dev, libglib2.0-dev, libzip-dev, libcurl4-gnutls-dev, libicu-dev -Depends: libjavascriptcoregtk-4.0-bin, libzip4, libicu57 -``` - If building for zesty: ``` From 7765c02f64a1241e422c90bbe0e74fd043264b7f Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Fri, 18 Aug 2017 23:02:48 -0400 Subject: [PATCH 02/34] =?UTF-8?q?Don=E2=80=99t=20apply=20Closure=20Compile?= =?UTF-8?q?r=20for=20Canary=20builds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is faster --- planck-cljs/script/bundle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/planck-cljs/script/bundle b/planck-cljs/script/bundle index 4e55f446..915d9552 100755 --- a/planck-cljs/script/bundle +++ b/planck-cljs/script/bundle @@ -36,7 +36,11 @@ fi CLOSURE_OPTIMIZATIONS="${CLOSURE_OPTIMIZATIONS:-SIMPLE}" -if [ $JAVASCRIPT_CORE == "3" ] && [ $CLOSURE_OPTIMIZATIONS != "NONE" ] +if [ ${CANARY_BUILD:-0} == "1" ] +then + echo "Because this is a Canary build, setting Closure Optimizations to NONE" + CLOSURE_OPTIMIZATIONS=NONE +elif [ $JAVASCRIPT_CORE == "3" ] && [ $CLOSURE_OPTIMIZATIONS != "NONE" ] then echo "Because JavaScriptCore 3, setting Closure Optimizations to WHITESPACE_ONLY" CLOSURE_OPTIMIZATIONS=WHITESPACE_ONLY From f1afbf5740d84d1a2a11bc862429a863c34b7d18 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Sat, 19 Aug 2017 12:19:28 -0400 Subject: [PATCH 03/34] Add minimal facsimile of cljs.nodejs This is so that code that only makes use of enable-util-print! can work. --- int-test/expected/PLANCK-OUT.txt | 5 +++++ int-test/script/gen-actual | 7 +++++++ planck-cljs/src/planck/repl.cljs | 8 ++++++++ 3 files changed, 20 insertions(+) diff --git a/int-test/expected/PLANCK-OUT.txt b/int-test/expected/PLANCK-OUT.txt index ccada140..1f01982a 100644 --- a/int-test/expected/PLANCK-OUT.txt +++ b/int-test/expected/PLANCK-OUT.txt @@ -525,3 +525,8 @@ nulltruea1[ ]{ "foo": 1 } +Test cljs.nodejs +nil +nil +hi +nil diff --git a/int-test/script/gen-actual b/int-test/script/gen-actual index ad958ecd..dd2580c1 100755 --- a/int-test/script/gen-actual +++ b/int-test/script/gen-actual @@ -708,3 +708,10 @@ echo "" #(require '[calculator :refer [add]]) #(add 2 3) #REPL_INPUT + +echo "Test cljs.nodejs" +$PLANCK < Date: Mon, 21 Aug 2017 22:50:40 -0400 Subject: [PATCH 04/34] AOT decode bundled source maps --- planck-cljs/script/bundle | 6 ++++++ planck-cljs/script/decode.cljs | 16 ++++++++++++++++ planck-cljs/src/planck/repl.cljs | 10 ++++++---- 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 planck-cljs/script/decode.cljs diff --git a/planck-cljs/script/bundle b/planck-cljs/script/bundle index 915d9552..9b765026 100755 --- a/planck-cljs/script/bundle +++ b/planck-cljs/script/bundle @@ -90,6 +90,12 @@ if [ ${file: -4} == ".map" ] && [ -f $file.optim ] then cp $file.optim $file fi +# For the second pass, we will have the planck binary available and we can use it to AOT decode source maps +if [ ${file: -4} == ".map" ] && [ -f ../../planck-c/build/planck ] +then + echo -n "." + ../../planck-c/build/planck ../script/decode.cljs $file +fi uncompressed_file_size=`wc -c $file | sed -e 's/^ *//' | cut -d' ' -f1` gzip -9 $file mv $file.bak $file diff --git a/planck-cljs/script/decode.cljs b/planck-cljs/script/decode.cljs new file mode 100644 index 00000000..455f5ddb --- /dev/null +++ b/planck-cljs/script/decode.cljs @@ -0,0 +1,16 @@ +(ns script.bootstrap.build + (:require + [cljs.source-map :as sm] + [cognitect.transit :as transit] + [planck.core :refer [slurp spit]])) + +(defn cljs->transit-json + [x] + (let [wtr (transit/writer :json)] + (transit/write wtr x))) + +(let [file (first *command-line-args*) + sm-json (slurp file) + decoded (sm/decode (.parse js/JSON sm-json)) + decoded-transit-json (cljs->transit-json decoded)] + (spit file decoded-transit-json)) diff --git a/planck-cljs/src/planck/repl.cljs b/planck-cljs/src/planck/repl.cljs index 0c17f9f9..4a556c0a 100644 --- a/planck-cljs/src/planck/repl.cljs +++ b/planck-cljs/src/planck/repl.cljs @@ -1000,10 +1000,12 @@ (let [source-map-path (fn [ns-sym] (str (cljs.js/ns->relpath ns-sym) ".js.map")) load-source-maps (fn [ns-sym] - (cljs/load-source-map! st ns-sym (->> ns-sym - source-map-path - js/PLANCK_LOAD - first)))] + (let [sm (-> ns-sym + source-map-path + js/PLANCK_LOAD + first + transit-json->cljs)] + (swap! st assoc-in [:source-maps ns-sym] sm)))] ;; Source maps for bundled macros namespaces other than cljs.core are loaded ;; via their cached ".js.map.json" file. (doseq [ns-sym '[cljs.core From daeb63ec69d4aae45e2bb56a71f0b5d278c32819 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Mon, 21 Aug 2017 23:17:56 -0400 Subject: [PATCH 05/34] Introduce a FAST_BUILD mode --- planck-cljs/script/bundle | 22 +++++++++++++++++++--- planck-cljs/src/planck/repl.cljs | 19 +++++++++++++------ 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/planck-cljs/script/bundle b/planck-cljs/script/bundle index 9b765026..b7201c31 100755 --- a/planck-cljs/script/bundle +++ b/planck-cljs/script/bundle @@ -34,11 +34,19 @@ then fi fi -CLOSURE_OPTIMIZATIONS="${CLOSURE_OPTIMIZATIONS:-SIMPLE}" +FAST_BUILD="${FAST_BUILD:-0}" if [ ${CANARY_BUILD:-0} == "1" ] then - echo "Because this is a Canary build, setting Closure Optimizations to NONE" + echo "Because this is a Canary build, setting FAST_BUILD=1" + FAST_BUILD=1 +fi + +CLOSURE_OPTIMIZATIONS="${CLOSURE_OPTIMIZATIONS:-SIMPLE}" + +if [ $FAST_BUILD == "1" ] +then + echo "Because this is a fast build, setting Closure Optimizations to NONE" CLOSURE_OPTIMIZATIONS=NONE elif [ $JAVASCRIPT_CORE == "3" ] && [ $CLOSURE_OPTIMIZATIONS != "NONE" ] then @@ -46,6 +54,14 @@ then CLOSURE_OPTIMIZATIONS=WHITESPACE_ONLY fi +AOT_DECODE_SOURCE_MAPS="${AOT_DECODE_SOURCE_MAPS:-1}" + +if [ $FAST_BUILD == "1" ] +then + echo "Because this is a fast build, disabling AOT decoding of source maps" + AOT_DECODE_SOURCE_MAPS=0 +fi + if [ $CLOSURE_OPTIMIZATIONS != "NONE" ] then echo "### Optimizing bundled JavaScript with Closure Optimizations:" $CLOSURE_OPTIMIZATIONS @@ -91,7 +107,7 @@ then cp $file.optim $file fi # For the second pass, we will have the planck binary available and we can use it to AOT decode source maps -if [ ${file: -4} == ".map" ] && [ -f ../../planck-c/build/planck ] +if [ $AOT_DECODE_SOURCE_MAPS == "1" ] && [ ${file: -4} == ".map" ] && [ -f ../../planck-c/build/planck ] then echo -n "." ../../planck-c/build/planck ../script/decode.cljs $file diff --git a/planck-cljs/src/planck/repl.cljs b/planck-cljs/src/planck/repl.cljs index 4a556c0a..d2343d3f 100644 --- a/planck-cljs/src/planck/repl.cljs +++ b/planck-cljs/src/planck/repl.cljs @@ -1000,12 +1000,19 @@ (let [source-map-path (fn [ns-sym] (str (cljs.js/ns->relpath ns-sym) ".js.map")) load-source-maps (fn [ns-sym] - (let [sm (-> ns-sym - source-map-path - js/PLANCK_LOAD - first - transit-json->cljs)] - (swap! st assoc-in [:source-maps ns-sym] sm)))] + (when-let [sm-text (->> ns-sym + source-map-path + js/PLANCK_LOAD + first)] + ;; Detect if we have source maps in need of decoding + ;; or if they are AOT decoded. + (if (or (string/starts-with? sm-text "{\"version\"") + (string/starts-with? sm-text "{\n\"version\"")) + (cljs/load-source-map! st ns-sym (->> ns-sym + source-map-path + js/PLANCK_LOAD + first)) + (swap! st assoc-in [:source-maps ns-sym] (transit-json->cljs sm-text)))))] ;; Source maps for bundled macros namespaces other than cljs.core are loaded ;; via their cached ".js.map.json" file. (doseq [ns-sym '[cljs.core From b76cd70c26fa8dc4fd8d5481c3e3b66fb3dd778e Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Wed, 23 Aug 2017 22:18:08 -0400 Subject: [PATCH 06/34] Strip source maps to make them smaller --- planck-cljs/script/decode.cljs | 8 +++-- planck-cljs/src/planck/repl.cljs | 47 +++++++++++++++++++++++++- planck-cljs/test/planck/repl_test.cljs | 6 ++++ 3 files changed, 57 insertions(+), 4 deletions(-) diff --git a/planck-cljs/script/decode.cljs b/planck-cljs/script/decode.cljs index 455f5ddb..82413a98 100644 --- a/planck-cljs/script/decode.cljs +++ b/planck-cljs/script/decode.cljs @@ -2,7 +2,8 @@ (:require [cljs.source-map :as sm] [cognitect.transit :as transit] - [planck.core :refer [slurp spit]])) + [planck.core :refer [slurp spit]] + [planck.repl :refer [strip-source-map]])) (defn cljs->transit-json [x] @@ -12,5 +13,6 @@ (let [file (first *command-line-args*) sm-json (slurp file) decoded (sm/decode (.parse js/JSON sm-json)) - decoded-transit-json (cljs->transit-json decoded)] - (spit file decoded-transit-json)) + stripped (strip-source-map decoded) + transit-json (cljs->transit-json stripped)] + (spit file transit-json)) diff --git a/planck-cljs/src/planck/repl.cljs b/planck-cljs/src/planck/repl.cljs index d2343d3f..50954301 100644 --- a/planck-cljs/src/planck/repl.cljs +++ b/planck-cljs/src/planck/repl.cljs @@ -28,6 +28,33 @@ [planck.repl-resources :refer [repl-special-doc-map special-doc-map]] [planck.themes :refer [get-theme]])) +(defn- distinct-by + "Returns a lazy sequence of the elements of coll, removing any elements that + return duplicate values when passed to a function f." + ([f] + (fn [rf] + (let [seen (volatile! #{})] + (fn + ([] (rf)) + ([result] (rf result)) + ([result x] + (let [fx (f x)] + (if (contains? @seen fx) + result + (do (vswap! seen conj fx) + (rf result x))))))))) + ([f coll] + (let [step (fn step [xs seen] + (lazy-seq + ((fn [[x :as xs] seen] + (when-let [s (seq xs)] + (let [fx (f x)] + (if (contains? seen fx) + (recur (rest s) seen) + (cons x (step (rest s) (conj seen fx))))))) + xs seen)))] + (step coll #{})))) + #_(s/fdef planck.repl$macros/dir :args (s/cat :sym symbol?)) @@ -690,12 +717,14 @@ (when sourcemap-json "and source map ") "for " path)))) +(declare strip-source-map) + (defn- write-cache [path name source cache] (when (and path source cache (:cache-path @app-env)) (let [cache-json (cljs->transit-json cache) sourcemap-json (when-let [sm (get-in @planck.repl/st [:source-maps (:name cache)])] - (cljs->transit-json sm))] + (cljs->transit-json (strip-source-map sm)))] (log-cache-activity :write path cache-json sourcemap-json) (js/PLANCK_CACHE (cache-prefix-for-path path (is-macros? cache)) (str (form-compiled-by-string (form-build-affecting-options)) "\n" source) @@ -1162,6 +1191,22 @@ (str \tab demunged " (" file (when line (str ":" line)) (when column (str ":" column)) ")" \newline))))) +(defn- strip-source-map + "Strips a source map down to the minimal representation needed for mapping + stacktraces. This means we only need the :line and :col fields, we only need + the last element in each vector of such maps, and we can eliminate + duplicates, taking the smallest col number for each unique value." + [sm] + (into {} + (map (fn [[row cols]] + [row (->> cols + (map (fn [[col frames]] + [col [(select-keys (peek frames) [:line :col])]])) + (sort-by first) + (distinct-by second) + (into {}))])) + sm)) + (defonce ^:private can-show-indicator (atom false)) (defn- reset-show-indicator! diff --git a/planck-cljs/test/planck/repl_test.cljs b/planck-cljs/test/planck/repl_test.cljs index f27790c2..206710f0 100644 --- a/planck-cljs/test/planck/repl_test.cljs +++ b/planck-cljs/test/planck/repl_test.cljs @@ -141,3 +141,9 @@ (is (thrown? js/Error (planck.repl/repl-read-string "34f"))) (is (thrown? js/Error (planck.repl/repl-read-string "a:"))) (is (thrown? js/Error (planck.repl/repl-read-string "]")))) + +(deftest strip-source-map-test + (let [input-sm {0 {2 [{:line 1 :col 1} {:line 2 :col 2 :name "a"}] + 3 [{:line 2 :col 2 :name "b"}]}} + stripped {0 {2 [{:line 2 :col 2}]}}] + (is (= stripped (planck.repl/strip-source-map input-sm))))) \ No newline at end of file From aece859bd44641742bca95189d4426599c7d0cdc Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Thu, 24 Aug 2017 12:40:49 -0400 Subject: [PATCH 07/34] Do a fast build if CI --- planck-cljs/script/bundle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planck-cljs/script/bundle b/planck-cljs/script/bundle index b7201c31..920f9715 100755 --- a/planck-cljs/script/bundle +++ b/planck-cljs/script/bundle @@ -36,9 +36,9 @@ fi FAST_BUILD="${FAST_BUILD:-0}" -if [ ${CANARY_BUILD:-0} == "1" ] +if [ ! -z "$TRAVIS_OS_NAME" ] then - echo "Because this is a Canary build, setting FAST_BUILD=1" + echo "Because this is a CI build, setting FAST_BUILD=1" FAST_BUILD=1 fi From 15799482748f1b87ef9e0a1521a2ac3b31f77e6a Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Fri, 25 Aug 2017 08:26:03 -0400 Subject: [PATCH 08/34] Add a changelog --- CHANGELOG.md | 573 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 573 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..91200ac0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,573 @@ +# Change Log +All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). + +## [Unreleased] +### Added +- Optimizations for source map loading when first exception is printed. + +## [2.7.3] - 2017-08-17 +### Fixed +- Fix issue with Ubuntu PPA release. + +## [2.7.0] - 2017-08-16 +### Added +- Ability to specify `-O` / `--optimizations` to apply Closure. +- Closure applied to bundled deps. +- Pretty print records. +- Update deps management for global exports, `:libs`. +- Auto-completion for symbols in Closure Library. + +### Changed +- ClojureScript 1.9.908. +- Add checked-arrays to `-h` output. +- No longer bundle `goog.structs.weak` (not available). + +### Fixed +- Disable `:def-emits-var` in code-loading forms. +- Increas buffers used for paths to be `PATH_MAX`. + +## [2.6.0] - 2017-07-28 +### Added +- Alpha support for TCP sockets in `planck.socket.alpha`. +- Support passing Maven coordinates for JAR deps. +- Hook up flush for writers and output streams. +- Hook up planck.shell/sh :in for smallish strings. +- Support for `:fn-invoke-direct` compiler option. +- Support `cljs.core/*command-line-args*`. +- Support for `:checked-arrays`. +- Make `*print-fn*` and `*print-err-fn*` like noderepljs for JavaScript objects. +- Pretty print JavaScript arrays and objects. + +### Changed +- ClojureScript 1.9.854. +- Update transit-clj to 0.8.300. +- Update fipp to 0.6.8. +- Revise dump SDK option to be `-S`. + +### Fixed +- Fixes crashes when using HTTP. +- Don't print `doc`s for macros that haven't been referred. +- Auto-complete after arrow and other special chars. +- Don’t demunge Planck native fns. +- Suppress additional meta printing for unknown types. +- Do a distinct in apropros to provide one response for fn-macros. + +## [2.5.0] - 2017-05-26 +### Changed +- ClojureScript 1.9.562. +- Pretty-print Eductions. + +### Fixed +- Fix crash when making HTTP post. + +## [2.4.0] - 2017-05-12 +### Changed +- ClojureScript 1.9.542. +- Improve completions. + +### Fixed +- Fix crash when making HTTP request. +- Fix find-doc implementation to be more accurate. +- Properly cache internal `run_timeout_fn`. + +## [2.3.0] - 2017-04-18 +### Added +- Show version with `-V` / `--version`. +- Ability to `-D` / `--dump-sdk`. +- SDK docs on website. +- Imitation of clojure.java.io/resource. +- Add get-arglists function (emacs integration). +- Ability to instrument bundled speced fns. + +### Changed +- ClojureScript 1.9.521 +- Don’t bundle cljs/core$macros.cljc or the bundle namespace. +- Make path-separator private. +- Make planck.io/build-uri private. +- Load source maps for more bundled namespaces. + +### Removed +- Don't bundle `tailrecursion/cljson`. + +### Fixed +- Crash if specify dumb as theme. +- Ctrl-C leads to a space after prompt. + +## [2.2.0] - 2017-02-25 +### Added +- Support for namespaced maps. + +### Changed +- ClojureScript 1.9.494 +- Deumunge $macros in symbols in macroexpand. + +### Fixed +- pprint wrapping honor width. +- Better support for pasting into REPL. +- Handle comments entered in REPL. + +## [2.1.0] - 2017-02-10 +### Added +- Ability to use Ctrl-R to `reverse-i-search` in the REPL. +- Print `ex-data` in `pst`. +- Better error reporting for malformed scripts. +- Available via `apt-get` on Ubuntu. + +### Changed +- ClojureScript 1.9.473. +- Use `poll` instead of `select` in order to async more than 1024 shell processes. + +### Fixed +- Add `::body` to spec of `planck.http/post`. + +## [2.0.0] - 2017-02-04 +### Added +- Support for Linux. +- Async Shell. +- Hi-Res Timer. +- Interrupt Forms Generating Output. +- Source for REPL-defined forms. +- Planck Classpath Environment Variable. + +### Changed +- ClojureScript 1.9.456. + +## [2.0.0-rc.1] - 2017-01-27 +### Changed +- ClojureScript 1.9.456. + +### Fixed +- Keep script running until `sh-async` completes. + +## [2.0.0-beta.6] - 2017-01-21 +### Added +- `source` works for `def` forms evaluated in the REPL. + +### Changed +- ClojureScript 1.9.397 +- Shut down JavaScriptCore when Planck is shut down. + +### Fixed +- Fix a leak. +- Fix bugs related to caching native function references. +- Fix bugs related to `JSValueRef` lifetimes. +- Fix bug when Ctrl-C out of long form. + +## [2.0.0-beta.5] - 2017-01-04 +### Changed +- ClojureScript 1.9.380. +- Updates to error indicator (caret). +- Optimize `-read-line` perf. +- No longer use source requiring C99 support. +- Improvements waiting for ClojureScript runtime initialization. +- Flow control when writing to Socket REPL. + +### Fixed +- Fix a corner case in `BufferedReader` implementation. +- Properly handle bad file descriptors. +- Fix bugs related to secondary prompt display with `-d`. +- Fix a memory leak converting strings. +- Better handling of Socket REPL lifecycle. +- Fix a few buffer overruns. +- Properly route Socket REPL printing when under load. +- Fix crash in `file-seq`. + +## [2.0.0-beta.4] - 2016-12-17 +### Added +- Can compile with either gcc or clang. +- Use nanosecond-resolution timers for `time` function. +- Use Planck's `eval` when needed by `cljs.spec.test` macros. + +### Changed +- ClojureScript 1.9.376. +- Syntax-hightlight specs in `doc` output. +- Various robustness revisions in C source. +- Update the copyright notices (in `-l` output). +- Pre-compile `cljs.spec.test`. + +### Fixed +- Don't reload goog JS that has already been loaded. +- Avoid stack overflow with deep require tree. +- Fix the ability to do HTTP POSTs. +- Support `planck.shell/sh` child processes that produce lots of output. + +## [2.0.0-beta.3] - 2016-11-27 +### Added +- Now builds on NixOS and Centos. +- High resolution timer for `time` macro. +- Added `load` REPL special. + +### Changed +- Use the new `require`, `require-macros`, `import`, macros from ClojureScript. + +### Fixed +- Fix build on OS X 10.9.5. +- Properly serialize callbacks. +- Fix `sh-async`. +- Guard against missing JARs on classpath causing crash. +- Fix socket REPL indication display (was interleaved with other text). +- Fix endless loop hitting Ctrl-D to stop when using dumb terminal mode. + +## [2.0.0-beta.2] - 2016-11-20 +### Added +- Ability to install via `brew install --devel planck`. + +### Changed +- ClojureScript 1.9.330. +- Add keyword completion candidates `:refer-clojure` `:exclude`. +- Build native portion (C code) with release optimizations. + +### Fixed +- Properly initialize `*assert*`. +- Fix issue when cursor has to hop left. +- Fix ability to `(exit 0)`. +- Fix blocking initializing JavaScriptCore on some Unixes. + +## [2.0.0-beta.1] - 2016-11-20 +### Added +- Support for Linux. +- Support for `PLANCK_CLASSPATH` env var. +- Interruptibility of REPL forms producing output. +- Warn if Planck can’t write to cache path. + +### Changed +- ClojureScript 1.9.293. +- Bundle `goog.labs.format.csv`. +- Abort if `-k` and `-K` specified. +- Eliminate double analysis of forms at REPL. +- Update `ns` docstring. + +### Fixed +- Preserve `ns-interns` when failing to load a namespace. +- Properly track loaded foreign-libs. +- Fix segfault typing `]` after an error. + +## [1.17] - 2016-09-11 +### Added +- Report filename for compiler warnings and errors. + +### Changed +- ClojureScript 1.9.229. +- Update bundled version of Transit to 0.8.239. +- Update bundled version of Fipp to 0.6.6. + +### Fixed +- Close pipes in shell/sh. + +## [1.16] - 2016-08-15 +### Added +- Support reading namespaced maps. +- Support IOFactory on std streams. + +### Changed +- ClojureScript 1.9.216 +- Use `org.clojure/tools.reader` 1.0.0-beta3. +- Improvements to tab completions. +- Many revsions for 2.0 alpha C-based port. + +### Fixed +- Properly initialize `*assert*` with session state (for `--elide-asserts`). +- Changes to support building on case-sensitive file system. + +## [1.15] - 2016-06-18 +### Added +- Add indicators for warnings. +- Format macroexpand output as code. +- Spec functions exposed in Planck namespaces. +- Format specs in docstrings. + +### Changed +- ClojureScript 1.9.76. + +### Fixed +- Wait for timers to complete before exiting (useful for `core.async`). + +## [1.14] - 2016-06-16 +### Added +- Support for cljs.spec. + +### Changed +- ClojureScript 1.9.14. + +### Fixed +- Partial fix for `eval` (#288). + +## [1.13] - 2016-05-27 +### Added +- Column indicators for analysis errors. +- Elide pasted prompts when pasting into REPL. + +### Changed +- Isolation for Socket REPLs (`*1`, _etc._). +- Better handling of async printing. +- Add `console.error` (previously only had `console.log`). +- Align secondary prompts for 1-char namespaces. + +### Fixed +- Properly handle case when `*print-newline*` is set to `false`. + +## [1.12.1] - 2016-05-18 +### Fixed +- Fix slurp failing on Mavericks. +- Fix crash with multi-line forms and single-character namespaces. + +## [1.12] - 2016-05-15 +### Added +- Pretty print REPL results using Fipp with syntax highlighting. +- A new `planck.http` namespace supporting `get` and `post`. +- Support `:foreign-libs` in `deps.cljs` embedded in JARs. +- Support re-configuring control keys used in REPL. +- Support disabling asserts at launch time (like `:elide-asserts`). +- Add simpler cache support via `-K` to create `.planck_cache` dir. + +### Changed +- console log simply logs text (w/o NSLog info). +- Don't refer to Maven (brew install w/o Java). +- Use `tools.reader` 1.0.0-beta1. +- Use Parinfer 1.8.1. +- Clean up stack traces (demunge symbols, elide `-invoke`). +- Mark a few vars as private. +- Minimal OS required Mavericks (was Lion). + +### Fixed +- Properly align docstring output for vars like `some->`. +- Fix a bug where caches were not invalided when using an updated JAR. + +## [1.11] - 2016-04-25 +### Added +- A quiet mode that disables banner and other output. +- Support for `clojure.core.reducers`. +- Ability to use `cljs.js` itself within Plank via `planck.core/init-empty-state`. +- Autocompletion on commonly used keywords and other autocomplete improvements. + +### Changed +- Update to ClojureScript 1.8.51. +- Use CloureScript `cljs.test` (instead of previous port). + +### Fixed +- Fix for multi-arg file, add File/toString. +- Exit with failure when port is bound. +- Fix for caching top-level files. +- Don't inadvertently load bundled artifacts from classpath. + +## [1.10] - 2016-03-02 +### Added +- Bundle port of `cljs.test` for use in bootstrap ([post](http://blog.fikesfarm.com/posts/2016-02-27-testing-with-planck.html)). +- Colors (with light and dark theme) ([post](http://blog.fikesfarm.com/posts/2016-02-04-planck-colors.html)). +- Indentation (via Parinfer) ([post](http://blog.fikesfarm.com/posts/2016-02-10-indenting-with-parinfer.html)). +- `eval` and friends `resolve`, `ns-resolve`, `intern` ([post](http://blog.fikesfarm.com/posts/2016-01-22-clojurescript-eval.html)). +- Securely prompt for and read password. +- Source mapping for user code. +- `with-open` and `line-seq`. +- `with-sh-dir` and `with-sh-env`. +- `sh` accepts string and file. +- Honor `:forms` in `doc` output. +- `planck.io/file-attributes` (like `fstat`). +- `find-doc`. +- Startup banner with helpful instructions. + +### Changed +- Use ClojureScript master (1.8.28). +- Throw exception on error from `sh`. +- `doc` for `catch`, `finally`, `&`. +- AOT compile Planck macro namespaces ([post](http://blog.fikesfarm.com/posts/2016-02-03-planck-macros-aot.html)). + +### Fixed +- Throw if using closed file. +- Properly index open JARs (needed for large classpaths). +- You can now `require` `planck.repl` namespace. +- Don't let `cljs.env` be inadvertently reloaded (clears `*compiler*`). +- Search all loaded macro namespaces for docs. + +## [1.9] - 2016-01-20 +### Added +- New website with comprehensive User Guide: [http://planck-repl.org](http://planck-repl.org). +- Socket REPL. +- Lazily load core analysis caches (2x faster in some cases). +- `apropos` and `dir` support. +- Protocol method doc output. +- Doc support for namespaces. +- Bundle `clojure.zip`, `clojure.data`. +- Multiple forms on a single REPL line. + +### Changed +- Use ClojureScript 1.7.228. +- Eliminate noisy var code when in verbose mode. +- Don't use default classpath of `.`. +- Add = signs in `-h` output for long args. +- Mention namespace for `*command-line-args*` in `-h`. +- Improve exception printing. + +### Fixed +- Fix crash if command line arg missing. +- Fix so you can use reader literals. +- Fix `source` failing on VMs. +- Purge analysis cache when reloading (allows reloading namespace with constant). +- Fix extra blank lines that appear when pasting. +- Proper caching of macro namespaces. +- If require fails, restore analysis cache state. +- Fix for syntax quote. +- Honor `:static-fns` for cache invalidation. +- Fix for `load-file`. + +## [1.8] - 2015-11-06 +### Added +- Tab completion for core macros. +- Support for `:static-fns` (via `-s` or `--static-fns`). +- Analysis / compilation cache (`-k ` option). +- `planck.core/*planck-version*`. + +### Changed +- Use ClojureScript 1.7.170. +- Can now `(require 'cljs.analyzer)`. + +### Fixed +- `0` is truthy. +- `doc` fix when using namespace alias. +- `source` fix when using namespace alias. + +## [1.7] - 2015-10-03 +### Added +- Support OS X 10.11 El Capitan. +- Support OS X 10.7 Lion. +- Support for setTimeout. +- Errors emitted when `spit` and `slurp` fail. +- Support terminating REPL by typing `quit` or `exit`. + +### Changed +- Use ClojureScript 1.7.122. +- Experimental analysis / compilation cache (`-k ` option). + +### Fixed +- `source` REPL special for `planck` namespace code. +- Fall back to ASCII encoding if needed when using `planck.shell`. +- Eliminate residual processing of `b` option. +- Properly merge requires (honoring established namespace aliases). +- Proper VT100 escape sequences (brace matching in iTerm). + +## [1.6] - 2015-08-22 +### Added +- Support JAR deps. +- Support `-c` / `--classpath` for specifying source directories and JAR deps. +- Support for OS X 10.8 Mountain Lion. +- Ship with bundled `cljs.pprint` and `cljs.test`. +- Support `source` REPL special. +- Support `import` REPL special. +- Support for `planck.core/*command-line-args*`. +- Support `:encoding` option for file I/O. +- Support for byte-oriented streams (`planck.io/input-stream` and `planck.io/output-stream`). +- `doc` output for macros. +- `doc` and tab completion for special forms. + +### Changed +- Read pre-compiled namespaces and analysis metadata for faster loading. +- Deprecate `-s` / `--src` in favor of using `-c` / `--classpath`. +- Revise `planck.core/file-seq` to be lazy (in terms of `tree-seq`). + +### Fixed +- Capture stderr for `planck.shell/sh`. +- Fix a glitch in brace highlighting when vertically aligned. +- Properly exit if `planck.core/exit` is called with `0`. +- Don't block on I/O in `planck.core/shell/sh`. +- Properly decode UTF-8 from stdin. + +## [1.5] - 2015-08-15 +### Added +- Brace highlighting (cursor temporarily jumps to previous matching brace). +- Improved `require` & `require-macros` (`:as` _etc._, error reporting). +- `file-seq` support +- `load-file` REPL special. +- Exit codes (`1` if unhandled exception, or explcit via `planck.core/exit`). +- Hit Ctrl-C to get out of a form and get a new prompt. +- Doc output improvement. +- Google Closure indexed so you can require things from there. +- Ship with `cljs.test` / `cljs.pprint` and lots of Google Closure. +- `-d` / `--dumb-terminal` option (facilitates `rlwrap`). +- `-l` / `--legal` to show licenses / copyrights. + +### Changed +- Rearranged so that there is now a `planck.core` to hold core fns. +- Smaller binary (gzipped ClojureScript runtime internally). + +### Fixed +- Don't lock up on syntax error. + +## [1.4] - 2015-08-09 +### Added +- 2× launch perf improvement (for scripts). +- Execute host commands via `planck.shell` namespace. +- Streaming file I/O: `reader`/`writer` using `IOFactory`. +- Repeated ordered `-e` `-i` options. +- Improved tab completion (considers namespaces, specials, _etc_.). +- `pst` (print stack trace) support. +- Mavericks support. + +### Changed +- ClojureScript 1.7.28 -> 1.7.48. +- Work towards improved `doc` support. + +### Fixed +- Crash with single-char ns. +- Printing to `stderr` via `*print-err-fn*`. +- Properly suppress printing of `nil` values for launch opts. +- Fixes some crashes mishandling UTF-8. + +## [1.3] - 2015-08-03 +### Changed +- Updated to no longer depend on CocoaPods. +- Fast startup even with readline support. +- Tweaks for tab completion (macros included, private vars excluded). +- Cleanup startup options, especially with respect to those used for dev. + +## [1.2] - 2015-08-02 +### Added +- Source mapping of stack traces. +- Readline support and auto-completion. + +## [1.1] - 2015-08-01 +### Added +- Adds `read-line` support. + +### Fixed +- Fixes ^D so that it exits REPL. + +## [1.0] - 2015-07-31 +### Added +- Initial release. + +[Unreleased]: https://github.com/mfikes/planck/compare/2.7.3...HEAD +[2.7.3]: https://github.com/mfikes/planck/compare/2.7.0...2.7.3 +[2.7.0]: https://github.com/mfikes/planck/compare/2.6.0...2.7.0 +[2.6.0]: https://github.com/mfikes/planck/compare/2.5.0...2.6.0 +[2.5.0]: https://github.com/mfikes/planck/compare/2.4.0...2.5.0 +[2.4.0]: https://github.com/mfikes/planck/compare/2.3.0...2.4.0 +[2.3.0]: https://github.com/mfikes/planck/compare/2.2.0...2.3.0 +[2.2.0]: https://github.com/mfikes/planck/compare/2.1.0...2.2.0 +[2.1.0]: https://github.com/mfikes/planck/compare/2.0.0...2.1.0 +[2.0.0]: https://github.com/mfikes/planck/compare/2.0.0-rc.1...2.0.0 +[2.0.0-rc.1]: https://github.com/mfikes/planck/compare/2.0.0-beta.6...2.0.0-rc.1 +[2.0.0-beta.6]: https://github.com/mfikes/planck/compare/2.0.0-beta.5...2.0.0-beta.6 +[2.0.0-beta.5]: https://github.com/mfikes/planck/compare/2.0.0-beta.4...2.0.0-beta.5 +[2.0.0-beta.4]: https://github.com/mfikes/planck/compare/2.0.0-beta.3...2.0.0-beta.4 +[2.0.0-beta.3]: https://github.com/mfikes/planck/compare/2.0.0-beta.2...2.0.0-beta.3 +[2.0.0-beta.2]: https://github.com/mfikes/planck/compare/2.0.0-beta.1...2.0.0-beta.2 +[2.0.0-beta.1]: https://github.com/mfikes/planck/compare/1.17...2.0.0-beta.1 +[1.17]: https://github.com/mfikes/planck/compare/1.16...1.17 +[1.16]: https://github.com/mfikes/planck/compare/1.15...1.16 +[1.15]: https://github.com/mfikes/planck/compare/1.14...1.15 +[1.14]: https://github.com/mfikes/planck/compare/1.13...1.14 +[1.13]: https://github.com/mfikes/planck/compare/1.12.1...1.13 +[1.12.1]: https://github.com/mfikes/planck/compare/1.12...1.12.1 +[1.12]: https://github.com/mfikes/planck/compare/1.11...1.12 +[1.11]: https://github.com/mfikes/planck/compare/1.10...1.11 +[1.10]: https://github.com/mfikes/planck/compare/1.9...1.10 +[1.9]: https://github.com/mfikes/planck/compare/1.8...1.9 +[1.8]: https://github.com/mfikes/planck/compare/1.7...1.8 +[1.7]: https://github.com/mfikes/planck/compare/1.6...1.7 +[1.6]: https://github.com/mfikes/planck/compare/1.5...1.6 +[1.5]: https://github.com/mfikes/planck/compare/1.4...1.5 +[1.4]: https://github.com/mfikes/planck/compare/1.3...1.4 +[1.3]: https://github.com/mfikes/planck/compare/1.2...1.3 +[1.2]: https://github.com/mfikes/planck/compare/1.1...1.2 +[1.1]: https://github.com/mfikes/planck/compare/1.0...1.1 +[1.0]: https://github.com/mfikes/planck/compare/63d50fe673c147e2d5810424daa75344f36b33bb...1.0 From d5bad92dd789451c3dc3e4602e8dc5a2ef4fb018 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Fri, 25 Aug 2017 16:27:01 -0400 Subject: [PATCH 09/34] Honor cljs.core/*main-cli-fn* Fixes #535 --- CHANGELOG.md | 1 + int-test/expected/PLANCK-OUT.txt | 10 +++++++ int-test/script/gen-actual | 20 +++++++++++++ int-test/src/test_main_cli_fn/core.cljs | 7 +++++ int-test/src/test_main_cli_fn/exit.cljs | 13 +++++++++ int-test/src/test_main_cli_fn/one.cljs | 6 ++++ int-test/src/test_main_cli_fn/unhandled.cljs | 12 ++++++++ int-test/src/test_main_cli_fn/zero.cljs | 6 ++++ planck-c/engine.c | 14 +++++++++ planck-c/engine.h | 2 ++ planck-c/main.c | 4 +++ planck-cljs/src/planck/repl.cljs | 17 ++++++++--- site/src/scripts.md | 30 ++++++++++++++++++++ 13 files changed, 138 insertions(+), 4 deletions(-) create mode 100644 int-test/src/test_main_cli_fn/core.cljs create mode 100644 int-test/src/test_main_cli_fn/exit.cljs create mode 100644 int-test/src/test_main_cli_fn/one.cljs create mode 100644 int-test/src/test_main_cli_fn/unhandled.cljs create mode 100644 int-test/src/test_main_cli_fn/zero.cljs diff --git a/CHANGELOG.md b/CHANGELOG.md index 91200ac0..a4f73cec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. This change ## [Unreleased] ### Added - Optimizations for source map loading when first exception is printed. +- Honor `cljs.core/*main-cli-fn*`, calling if set. ## [2.7.3] - 2017-08-17 ### Fixed diff --git a/int-test/expected/PLANCK-OUT.txt b/int-test/expected/PLANCK-OUT.txt index 1f01982a..a55359a6 100644 --- a/int-test/expected/PLANCK-OUT.txt +++ b/int-test/expected/PLANCK-OUT.txt @@ -33,6 +33,16 @@ Test main unhandled 1 Test main exit 17 +Test main cli fn +"Hello" "World" +Test main cli fn zero +0 +Test main cli fn one +0 +Test main cli fn unhandled +1 +Test main cli fn exit +17 Test REPL exit nil 118 diff --git a/int-test/script/gen-actual b/int-test/script/gen-actual index dd2580c1..ecc9d370 100755 --- a/int-test/script/gen-actual +++ b/int-test/script/gen-actual @@ -87,6 +87,26 @@ echo "Test main exit" $PLANCK -c $SRC -m test-main.exit echo $? +echo "Test main cli fn" +$PLANCK $SRC/test_main_cli_fn/core.cljs Hello World + +echo "Test main cli fn zero" +$PLANCK $SRC/test_main_cli_fn/zero.cljs +echo $? + +echo "Test main cli fn one" +# Return value of main is _not_ the return value +$PLANCK $SRC/test_main_cli_fn/one.cljs +echo $? + +echo "Test main cli fn unhandled" +$PLANCK $SRC/test_main_cli_fn/unhandled.cljs > /dev/null +echo $? + +echo "Test main cli fn exit" +$PLANCK $SRC/test_main_cli_fn/exit.cljs +echo $? + echo "Test REPL exit" $PLANCK < caching-js-eval (compile?) (comp compiling))) +(defn- run-main-impl + [main args] + (try + (apply main args) + (catch :default e + (handle-error e true)))) + (defn- ^:export run-main [main-ns & args] (let [main-args (js->clj args) @@ -1017,12 +1024,14 @@ nil (merge opts {:ns (symbol main-ns)}) (fn [{:keys [ns value error] :as ret}] - (try - (apply value main-args) - (catch :default e - (handle-error e true))))))))) + (run-main-impl value main-args))))))) nil)) +(defn- ^:export run-main-cli-fn + [] + (when (fn? *main-cli-fn*) + (run-main-impl *main-cli-fn* *command-line-args*))) + (defn- load-bundled-source-maps! [] (when-not (get (:source-maps @planck.repl/st) 'cljs.core) diff --git a/site/src/scripts.md b/site/src/scripts.md index 72449722..ea445163 100644 --- a/site/src/scripts.md +++ b/site/src/scripts.md @@ -40,6 +40,8 @@ Hello there! ### Main Function +#### Specifying the Main Namespace + If you'd like your script to start execution by executing a main function, you can make use of Planck's `-m` command-line option, specifying the namespace containing a `-main` function. Let's say you have `foo/core.cljs` with: ``` @@ -59,6 +61,34 @@ $ planck -m foo.core ClojureScript Hello ClojureScript! ``` +#### Specifying the Main Function + +Alternatively, you can make use of `cljs.core/*main-cli-fn*`. If this Var is set to a function, and `-m` hasn't been specified, then the main function will be called. + +This can be especially useful for standalone scripts on Linux, where it is not possible to specify interpreter arguments in the shebang line. Consider this alternative to the above, where this file is saved as `foo`: + +``` +#!/usr/bin/env planck +(ns foo.core) + +(defn greet [name] + (println (str "Hello " name "!"))) + +(defn -main [name] + (greet name)) + +(set! *main-cli-fn* -main) +``` + +Then this works: + +``` +$ ./foo ClojureScript +Hello ClojureScript! +``` + +All that needs to be ensured is that the code that `set!`s `*main-cli-fn*` is called, either via a `-e` to require the needed namespace, or by direct execution as in the example above. + ### Interacting with standard input and output When writing scripts, getting input from standard input is quite useful. Clojure From b4d11bd4219ca072174312f0eb88cc5745f819bb Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Sat, 26 Aug 2017 08:24:05 -0400 Subject: [PATCH 10/34] Initi mem used for sigaction when ignoring sigpipe --- planck-c/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/planck-c/main.c b/planck-c/main.c index 50c7d0d5..daa875e3 100644 --- a/planck-c/main.c +++ b/planck-c/main.c @@ -22,6 +22,8 @@ void ignore_sigpipe() { struct sigaction sa; + memset(&sa, 0, sizeof(struct sigaction)); + sigemptyset(&sa.sa_mask); sa.sa_handler = SIG_IGN; sa.sa_flags = 0; if (sigaction(SIGPIPE, &sa, 0) == -1) { From 5c0f775c1a28351a16abc04adf619f8a1b4191f6 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Sat, 26 Aug 2017 08:48:15 -0400 Subject: [PATCH 11/34] Free ClojureScript version string used in banner --- planck-c/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/planck-c/main.c b/planck-c/main.c index daa875e3..4daaff9b 100644 --- a/planck-c/main.c +++ b/planck-c/main.c @@ -104,13 +104,15 @@ char *get_cljs_version() { free(bundle_js); return version; } else { - return "(Unknown)"; + return strdup("(Unknown)"); } } void banner() { printf("Planck %s\n", PLANCK_VERSION); - printf("ClojureScript %s\n", get_cljs_version()); + char* cljs_version = get_cljs_version(); + printf("ClojureScript %s\n", cljs_version); + free(cljs_version); printf(" Docs: (doc function-name-here)\n"); printf(" (find-doc \"part-of-name-here\")\n"); From 604a08cdbc4e7d0992637572957c3133023bc378 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Sat, 26 Aug 2017 09:30:22 -0400 Subject: [PATCH 12/34] Initialize break_out to suppress warnings --- planck-c/repl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planck-c/repl.c b/planck-c/repl.c index 7dc66e5c..ef89acff 100644 --- a/planck-c/repl.c +++ b/planck-c/repl.c @@ -308,7 +308,7 @@ void run_cmdline_loop(repl_t *repl) { // so that things like brace highlighting work properly. // But for large input, let process line more efficiently // handle the input. - bool break_out; + bool break_out = false; if (strlen(input_line) < 16384) { char *tokenize = strdup(input_line); char *saveptr; From f3910495466f43d2b12cfd8a6abc6f88049ca012 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Sat, 26 Aug 2017 09:33:56 -0400 Subject: [PATCH 13/34] Add JavaScriptCore valgrind suppression file --- valgrind/JSC.supp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 valgrind/JSC.supp diff --git a/valgrind/JSC.supp b/valgrind/JSC.supp new file mode 100644 index 00000000..1bee881d --- /dev/null +++ b/valgrind/JSC.supp @@ -0,0 +1,27 @@ +{ + + Memcheck:Cond + ... + obj:/usr/lib/*/libjavascriptcore* +} + +{ + + Memcheck:Value8 + ... + obj:/usr/lib/*/libjavascriptcore* +} + +{ + + Memcheck:Addr8 + ... + obj:/usr/lib/*/libjavascriptcore* +} + +{ + + Memcheck:Addr4 + ... + obj:/usr/lib/*/libjavascriptcore* +} From 96c2ebd86647d2d6864f1fd25ce10f5e4c4acf44 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Sat, 26 Aug 2017 10:22:48 -0400 Subject: [PATCH 14/34] Fix leak in handling of REPL input --- planck-c/repl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/planck-c/repl.c b/planck-c/repl.c index ef89acff..ad78d903 100644 --- a/planck-c/repl.c +++ b/planck-c/repl.c @@ -245,11 +245,14 @@ bool process_line(repl_t *repl, char *input_line, bool split_on_newlines) { pthread_mutex_t repl_print_mutex = PTHREAD_MUTEX_INITIALIZER; void run_cmdline_loop(repl_t *repl) { + + char *input_line = NULL; + while (true) { - char *input_line = NULL; if (config.dumb_terminal) { display_prompt(repl->current_prompt); + free(input_line); input_line = get_input(); if (input_line == NULL) { // Ctrl-D pressed printf("\n"); @@ -301,6 +304,7 @@ void run_cmdline_loop(repl_t *repl) { } } + free(input_line); input_line = line; } @@ -332,6 +336,8 @@ void run_cmdline_loop(repl_t *repl) { break; } } + + free(input_line); } void completion(const char *buf, linenoiseCompletions *lc) { From 0bede943ddca566fafe9c49ede0bd92c62165350 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Sat, 26 Aug 2017 10:29:25 -0400 Subject: [PATCH 15/34] Fix leak in handling secondary prompt --- planck-c/repl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/planck-c/repl.c b/planck-c/repl.c index ad78d903..1b0d869a 100644 --- a/planck-c/repl.c +++ b/planck-c/repl.c @@ -276,8 +276,10 @@ void run_cmdline_loop(repl_t *repl) { fprintf(stdout, "\n"); } - char *line = linenoise(repl->current_prompt, form_prompt(repl, true), prompt_ansi_code_for_theme(config.theme), + char *secondary_prompt = form_prompt(repl, true); + char *line = linenoise(repl->current_prompt, secondary_prompt, prompt_ansi_code_for_theme(config.theme), repl->indent_space_count); + free(secondary_prompt); pthread_mutex_lock(&repl_print_mutex); From d996c2ec787682dc3b6f88fd503166aa6faa9470 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Sat, 26 Aug 2017 10:40:18 -0400 Subject: [PATCH 16/34] Fix leak of current_ns string --- planck-c/repl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/planck-c/repl.c b/planck-c/repl.c index 1b0d869a..ab3d1892 100644 --- a/planck-c/repl.c +++ b/planck-c/repl.c @@ -530,7 +530,6 @@ int run_repl() { repl_t *repl = make_repl(); s_repl = repl; - repl->current_ns = strdup("cljs.user"); repl->current_prompt = form_prompt(repl, false); // Per-type initialization From f288823b20a2d92df9fec2ed8108c42c7e63a296 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Sat, 26 Aug 2017 12:02:44 -0400 Subject: [PATCH 17/34] Changelog entry [ci skip] --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4f73cec..57bf9542 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ All notable changes to this project will be documented in this file. This change - Optimizations for source map loading when first exception is printed. - Honor `cljs.core/*main-cli-fn*`, calling if set. +### Fixed +- Eliminate leaks and properly initialize memory. + ## [2.7.3] - 2017-08-17 ### Fixed - Fix issue with Ubuntu PPA release. From bb159fec322db946f03d19350a51db8dcde429db Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Sun, 27 Aug 2017 11:09:49 -0400 Subject: [PATCH 18/34] Add unzip to Nixos build env [ci skip] --- build-envs/nixos-16.09_64/Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-envs/nixos-16.09_64/Vagrantfile b/build-envs/nixos-16.09_64/Vagrantfile index 973e7cbf..43d6eea1 100644 --- a/build-envs/nixos-16.09_64/Vagrantfile +++ b/build-envs/nixos-16.09_64/Vagrantfile @@ -3,7 +3,7 @@ Vagrant.configure(2) do |config| config.vm.box = "nixos/nixos-16.09-x86_64" config.vm.provision "shell", inline: <<-SHELL - nix-env -iA nixos.git nixos.clang nixos.gnumake nixos.cmake nixos.pkgconfig nixos.vim nixos.jdk nixos.maven nixos.webkitgtk nixos.glib nixos.pcre nixos.libzip nixos.icu nixos.curl nixos.zlib + nix-env -iA nixos.git nixos.clang nixos.gnumake nixos.cmake nixos.pkgconfig nixos.vim nixos.jdk nixos.maven nixos.webkitgtk nixos.glib nixos.pcre nixos.libzip nixos.icu nixos.curl nixos.zlib nixos.unzip mkdir bin curl -L https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > bin/lein chmod +x bin/lein From 1960a3292fb2e45923e1598ab683a11585a28687 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Fri, 1 Sep 2017 08:38:42 -0400 Subject: [PATCH 19/34] Clarify that deps.cljs can be used directly --- site/src/dependencies.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site/src/dependencies.md b/site/src/dependencies.md index 6e730bf0..d0064ddf 100644 --- a/site/src/dependencies.md +++ b/site/src/dependencies.md @@ -69,7 +69,9 @@ It is possible to use foreign libraries with Planck. > “Foreign” libraries are implemented in a language that is not ClojureScript. (In other words, JavaScript!) -Planck will honor a `deps.cljs` file embedded in a JAR file. A `deps.cljs` file will have a [`:foreign-libs`](https://github.com/clojure/clojurescript/wiki/Compiler-Options#foreign-libs) specification for upstream foreign dependencies packaged in the JAR, essentially indicating the synthetic namespace, the JavaScript file that needs to be loaded, and an indication of any other dependencies that need to be loaded. +Planck will honor any `deps.cljs` files on the classpath (including those embedded in a JAR file). A `deps.cljs` file will have a [`:foreign-libs`](https://github.com/clojure/clojurescript/wiki/Compiler-Options#foreign-libs) specification for foreign dependencies, essentially indicating the synthetic namespace, the JavaScript file that needs to be loaded, and an indication of any other dependencies that need to be loaded. + +> While `deps.cljs` files are usually bundled in JAR files in order to convey upstream foreign lib dependencies, you can also put a `deps.cljs` file directly on Planck's classpath in order to specify `:foreign-libs`. (This is useful since Planck doesn't provide a command line argument mechanism for specifying foreign libs.) One easy way to make use of foreign libs packaged in this manner is via the excellent [CLJSJS](http://cljsjs.github.io) project. While many of the libraries packaged by CLJSJS cannot work with Planck because they either require a browser environment or Node, some utility libraries work just fine. From defb6a3ebdb8e46c7814e4f9cc14c2ab8d43910f Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Fri, 1 Sep 2017 09:27:33 -0400 Subject: [PATCH 20/34] Update compiler options link --- site/src/dependencies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/src/dependencies.md b/site/src/dependencies.md index d0064ddf..f488b7c9 100644 --- a/site/src/dependencies.md +++ b/site/src/dependencies.md @@ -69,7 +69,7 @@ It is possible to use foreign libraries with Planck. > “Foreign” libraries are implemented in a language that is not ClojureScript. (In other words, JavaScript!) -Planck will honor any `deps.cljs` files on the classpath (including those embedded in a JAR file). A `deps.cljs` file will have a [`:foreign-libs`](https://github.com/clojure/clojurescript/wiki/Compiler-Options#foreign-libs) specification for foreign dependencies, essentially indicating the synthetic namespace, the JavaScript file that needs to be loaded, and an indication of any other dependencies that need to be loaded. +Planck will honor any `deps.cljs` files on the classpath (including those embedded in a JAR file). A `deps.cljs` file will have a [`:foreign-libs`](https://clojurescript.org/reference/compiler-options#foreign-libs) specification for foreign dependencies, essentially indicating the synthetic namespace, the JavaScript file that needs to be loaded, and an indication of any other dependencies that need to be loaded. > While `deps.cljs` files are usually bundled in JAR files in order to convey upstream foreign lib dependencies, you can also put a `deps.cljs` file directly on Planck's classpath in order to specify `:foreign-libs`. (This is useful since Planck doesn't provide a command line argument mechanism for specifying foreign libs.) From 9f75ce29f9cbe311db2e66fd45049d20e2b8e186 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Tue, 5 Sep 2017 08:07:22 -0400 Subject: [PATCH 21/34] Set up current env ns for use in get-arglists --- int-test/expected/PLANCK-OUT.txt | 5 +++++ int-test/script/gen-actual | 8 ++++++++ planck-cljs/src/planck/repl.cljs | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/int-test/expected/PLANCK-OUT.txt b/int-test/expected/PLANCK-OUT.txt index a55359a6..ceee19bf 100644 --- a/int-test/expected/PLANCK-OUT.txt +++ b/int-test/expected/PLANCK-OUT.txt @@ -540,3 +540,8 @@ nil nil hi nil +Test get-arglist +nil +#'foo.core/fun +([arg1 arg2]) +([f coll] [f val coll]) diff --git a/int-test/script/gen-actual b/int-test/script/gen-actual index ecc9d370..31932e5a 100755 --- a/int-test/script/gen-actual +++ b/int-test/script/gen-actual @@ -735,3 +735,11 @@ $PLANCK <> s repl-read-string first (resolve-var @env/*compiler*))] + (when-let [var (some->> s repl-read-string first (resolve-var (assoc-in @env/*compiler* [:ns :name] (.-name *ns*))))] (let [arglists (if-not (or (:macro var)) (:arglists var) (-> var :meta :arglists second))] From c0ea406e85c7b4ebf696c0cb71da82e6334e08e0 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Tue, 5 Sep 2017 08:29:34 -0400 Subject: [PATCH 22/34] Use code closer to cljs.analyzer/resolve-symbol --- planck-cljs/src/planck/repl.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planck-cljs/src/planck/repl.cljs b/planck-cljs/src/planck/repl.cljs index b711e2bf..9baf002e 100644 --- a/planck-cljs/src/planck/repl.cljs +++ b/planck-cljs/src/planck/repl.cljs @@ -1901,7 +1901,7 @@ found." [s] (try - (when-let [var (some->> s repl-read-string first (resolve-var (assoc-in @env/*compiler* [:ns :name] (.-name *ns*))))] + (when-let [var (some->> s repl-read-string first (resolve-var (assoc @env/*compiler* :ns (ana/get-namespace ana/*cljs-ns*))))] (let [arglists (if-not (or (:macro var)) (:arglists var) (-> var :meta :arglists second))] From ca38311c612ff5114bbbe9ccec36889cac08fd47 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Tue, 5 Sep 2017 08:54:28 -0400 Subject: [PATCH 23/34] Update changelog for get-arglists fix --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57bf9542..e6aa03e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. This change ### Fixed - Eliminate leaks and properly initialize memory. +- `planck.repl/get-arglists` now resolves symbols in current namespace. ## [2.7.3] - 2017-08-17 ### Fixed From 4a01f7fa5d97befdd4c39047b8c507f4e74d1e88 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Tue, 5 Sep 2017 08:58:38 -0400 Subject: [PATCH 24/34] Update changelog for cljs.nodejs [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6aa03e3..0236b06f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. This change ### Added - Optimizations for source map loading when first exception is printed. - Honor `cljs.core/*main-cli-fn*`, calling if set. +- Facsimile of `cljs.nodejs` for code calling `enable-util-print!`. ### Fixed - Eliminate leaks and properly initialize memory. From 8504dfa07d4e19b098ff061ef1d05373d866848c Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Thu, 7 Sep 2017 12:16:05 -0400 Subject: [PATCH 25/34] Allow require of goog Fixes #529 --- CHANGELOG.md | 1 + planck-cljs/src/planck/repl.cljs | 1 + planck-cljs/test/planck/repl_test.cljs | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0236b06f..f5843dc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file. This change ### Fixed - Eliminate leaks and properly initialize memory. - `planck.repl/get-arglists` now resolves symbols in current namespace. +- It is now possible to require `goog`. ## [2.7.3] - 2017-08-17 ### Fixed diff --git a/planck-cljs/src/planck/repl.cljs b/planck-cljs/src/planck/repl.cljs index 9baf002e..b666e4f4 100644 --- a/planck-cljs/src/planck/repl.cljs +++ b/planck-cljs/src/planck/repl.cljs @@ -891,6 +891,7 @@ (defn- skip-load? [{:keys [name macros]}] (or + (= name 'goog) (= name 'cljsjs.parinfer) (= name 'cljs.core) (and (= name 'clojure.core.rrb-vector.macros) macros) diff --git a/planck-cljs/test/planck/repl_test.cljs b/planck-cljs/test/planck/repl_test.cljs index 206710f0..061bf020 100644 --- a/planck-cljs/test/planck/repl_test.cljs +++ b/planck-cljs/test/planck/repl_test.cljs @@ -6,6 +6,7 @@ [clojure.test.check.clojure-test :refer-macros [defspec]] [clojure.test.check.generators :as gen] [clojure.test.check.properties :as prop :include-macros true] + [goog :as g] [planck.repl :as repl])) (deftest get-highlight-coords @@ -146,4 +147,8 @@ (let [input-sm {0 {2 [{:line 1 :col 1} {:line 2 :col 2 :name "a"}] 3 [{:line 2 :col 2 :name "b"}]}} stripped {0 {2 [{:line 2 :col 2}]}}] - (is (= stripped (planck.repl/strip-source-map input-sm))))) \ No newline at end of file + (is (= stripped (planck.repl/strip-source-map input-sm))))) + +(deftest require-goog-test + (is (false? (g/isArrayLike nil))) + (is (true? (g/isArray #js [])))) From 84b50fc8f00f48663f5db1cf414d3d92360be5a6 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Mon, 25 Sep 2017 10:52:58 -0400 Subject: [PATCH 26/34] With latest ClojureScript, always set :def-emits-var --- planck-cljs/src/planck/repl.cljs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/planck-cljs/src/planck/repl.cljs b/planck-cljs/src/planck/repl.cljs index b666e4f4..eadd484e 100644 --- a/planck-cljs/src/planck/repl.cljs +++ b/planck-cljs/src/planck/repl.cljs @@ -1784,6 +1784,10 @@ (merge {:context :expr} (if (load-form? expression-form) {:source-map true} + {:def-emits-var true}) + ;; With CLJS-2367, we can unconditionally set :def-emits-var, thus allowing the + ;; self-hosted implementation to use this to detect REPLs (avoiding CLJS-2365, etc.) + (when-not (neg? (gstring/compareVersions *clojurescript-version* "1.9.933")) {:def-emits-var true})) (merge {:source-map true} (when (:cache-path @app-env) From a1534449261f8bf15e505f2327b6d07899e5889e Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Wed, 27 Sep 2017 09:01:57 -0400 Subject: [PATCH 27/34] Make :redef be non-fatal --- planck-cljs/script/build.clj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/planck-cljs/script/build.clj b/planck-cljs/script/build.clj index 3af4776e..32a7c5f9 100644 --- a/planck-cljs/script/build.clj +++ b/planck-cljs/script/build.clj @@ -15,12 +15,15 @@ (System/getenv "CLJS_CHECKED_ARRAYS") (keyword (System/getenv "CLJS_CHECKED_ARRAYS")) :else false)) +(def non-fatal-warnings #{:redef}) + (cljs.analyzer/with-warning-handlers [(fn [warning-type env extra] (when (warning-type cljs.analyzer/*cljs-warnings*) (when-let [s (cljs.analyzer/error-message warning-type extra)] (binding [*out* *err*] - (println "WARNING:" (cljs.analyzer/message env s)) + (println "WARNING:" (cljs.analyzer/message env s))) + (when-not (warning-type non-fatal-warnings) (System/exit 1)))))] (api/build (api/inputs "src") {:output-dir "out" From d31d5795cc49991e8ada5824884f5b3d768f79b8 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Fri, 29 Sep 2017 11:16:54 -0400 Subject: [PATCH 28/34] Add a build env for Ubuntu 17.10 --- build-envs/ubuntu-17.10_64/Vagrantfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 build-envs/ubuntu-17.10_64/Vagrantfile diff --git a/build-envs/ubuntu-17.10_64/Vagrantfile b/build-envs/ubuntu-17.10_64/Vagrantfile new file mode 100644 index 00000000..d09a0ecf --- /dev/null +++ b/build-envs/ubuntu-17.10_64/Vagrantfile @@ -0,0 +1,13 @@ +Vagrant.configure(2) do |config| + + config.vm.box = "ubuntu/artful64" + + config.vm.provision "shell", inline: <<-SHELL + sudo apt-get update + sudo apt-get install -y git clang cmake pkg-config javascriptcoregtk-4.0 libglib2.0-dev libzip-dev libcurl4-gnutls-dev libicu-dev default-jdk maven unzip + mkdir bin + curl -L https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > bin/lein + chmod +x bin/lein + SHELL + +end From e31b30b57aa023da0837252fe4a28c89727ce562 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Fri, 29 Sep 2017 11:20:56 -0400 Subject: [PATCH 29/34] Only init_classpath if classpath set Fixes #538 Thanks to @bandresen --- CHANGELOG.md | 1 + planck-c/main.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5843dc3..25ba36cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file. This change - Eliminate leaks and properly initialize memory. - `planck.repl/get-arglists` now resolves symbols in current namespace. - It is now possible to require `goog`. +- Fix SIGSEGV with glibc 2.26. ## [2.7.3] - 2017-08-17 ### Fixed diff --git a/planck-c/main.c b/planck-c/main.c index 4daaff9b..d058b740 100644 --- a/planck-c/main.c +++ b/planck-c/main.c @@ -506,8 +506,9 @@ int main(int argc, char **argv) { } } - init_classpath(classpath); - + if (classpath) { + init_classpath(classpath); + } if (config.num_src_paths == 0) { char *classpath = getenv("PLANCK_CLASSPATH"); From 77bc955228991ff22f91ed06576cd8b81db9370d Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Sat, 30 Sep 2017 11:39:57 -0400 Subject: [PATCH 30/34] Use tools.reader version specified by ClojureScript --- planck-cljs/project.clj | 3 --- planck-cljs/script/build | 33 +++++++++++++++++---------------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/planck-cljs/project.clj b/planck-cljs/project.clj index 996e7196..9f34809d 100644 --- a/planck-cljs/project.clj +++ b/planck-cljs/project.clj @@ -8,13 +8,10 @@ [tubular "1.0.0"]] :source-paths ["dev"]} :build-release - {} - :build-commit {}} :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript ~clojurescript-version] [org.clojure/test.check "0.10.0-alpha2"] - [org.clojure/tools.reader "1.0.5"] [com.cognitect/transit-clj "0.8.300"] [com.cognitect/transit-cljs "0.8.239"] [fipp "0.6.8"] diff --git a/planck-cljs/script/build b/planck-cljs/script/build index a49776f2..c39e4cab 100755 --- a/planck-cljs/script/build +++ b/planck-cljs/script/build @@ -23,24 +23,25 @@ export LEIN_JVM_OPTS= export LEIN_SILENT=true if [ -n "$CLJS_COMMIT" ]; then - if [ ! -e clojurescript ]; then - git clone https://github.com/clojure/clojurescript --quiet - cd clojurescript - git reset --hard $CLJS_COMMIT - # Apply patches - # curl -L http://dev.clojure.org/jira/secure/attachment/16577/CLJS-1997.patch | git apply - # Deal with the case when building in sandbox mode - if [ -e ../profiles.clj ]; then - export MAVEN_OPTS="-Dmaven.repo.local=../sandbox-m2" - echo "{:dev {:local-repo \"../sandbox-m2\"}}" > profiles.clj - fi - script/uberjar > /dev/null 2>&1 - cd .. + if [ -e clojurescript ]; then + rm -rf clojurescript fi - CLJSC_CP=clojurescript/target/cljs.jar:`script/lein with-profile build-commit classpath` -else - CLJSC_CP=`script/lein with-profile build-release classpath` + git clone https://github.com/clojure/clojurescript --quiet + cd clojurescript + git reset --hard $CLJS_COMMIT + # Apply patches + # curl -L http://dev.clojure.org/jira/secure/attachment/16577/CLJS-1997.patch | git apply + # Deal with the case when building in sandbox mode + if [ -e ../profiles.clj ]; then + export MAVEN_OPTS="-Dmaven.repo.local=../sandbox-m2" + echo "{:dev {:local-repo \"../sandbox-m2\"}}" > profiles.clj + fi + export CLJS_VERSION=`script/build 2> /dev/null | grep 'Building ClojureScript' | tail -1 | cut -c 31-` + echo Using locally built ClojureScript $CLJS_VERSION + cd .. fi +CLJSC_CP=`script/lein with-profile build-release classpath` + mkdir -p out/cljs/analyzer java -cp $CLJSC_CP clojure.main script/build.clj From 9ea5749ff7f1eec3a37436a45bed5b25ce4b9602 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Sun, 1 Oct 2017 16:25:23 -0400 Subject: [PATCH 31/34] Document parameterized builds [ci skip] --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index d93f0ef7..e1ff011f 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,26 @@ $ script/build The resulting binary will be `planck-c/build/planck`. +### Parameterized Builds + +Set the optional `FAST_BUILD` environment variable to quickly build a development version that skips Closure optimization: + +``` +$ FAST_BUILD=1 script/build +``` + +To build against a specific (locally installed) ClojureScript version, specify `CLJS_VERSION`: + +``` +$ CLJS_VERSION=1.9.908 script/build +``` + +To locally build and use a specific ClojureScript commit, specify `CLJS_COMMIT`: + +``` +$ CLJS_COMMIT=d450122 script/build +``` + ## Tests ``` From 54d022b0869d4166d24ab4518b53727b201a551f Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Sun, 1 Oct 2017 20:00:33 -0400 Subject: [PATCH 32/34] Ignore temporary build files [ci skip] --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index d9b34e0a..08f495e3 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ planck-cljs/clojurescript build-envs/*/*-cloudimg-console.log /compiler /planck-cljs/jscomp.js +/planck-cljs/bundle.c +/planck-cljs/bundle_dict.c From 1c863a362b17b82ac33fab57ef569fd67b91a713 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Tue, 3 Oct 2017 13:27:49 -0400 Subject: [PATCH 33/34] Update to ClojureScript 1.9.946 --- planck-cljs/project.clj | 2 +- site/src/performance.md | 2 +- site/src/repl.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/planck-cljs/project.clj b/planck-cljs/project.clj index 9f34809d..777c01e2 100644 --- a/planck-cljs/project.clj +++ b/planck-cljs/project.clj @@ -1,6 +1,6 @@ (def clojurescript-version (or (System/getenv "CANARY_CLOJURESCRIPT_VERSION") (System/getenv "CLJS_VERSION") - "1.9.908")) + "1.9.946")) (defproject planck "0.1.0" :profiles {:dev {:dependencies [[org.clojure/clojurescript ~clojurescript-version] diff --git a/site/src/performance.md b/site/src/performance.md index 898b26f1..5f41803a 100644 --- a/site/src/performance.md +++ b/site/src/performance.md @@ -40,7 +40,7 @@ The caching mechanism works whether your are running `planck` to execute a scrip Planck uses a (naïve) file timestamp mechanism to know if cache files are stale, and it additionally looks at comments like the following ``` -// Compiled by ClojureScript 1.9.908 {:static-fns true, :elide-asserts true} +// Compiled by ClojureScript 1.9.946 {:static-fns true, :elide-asserts true} ``` in the compiled JavaScript to see if the files are applicable. If a file can’t be used, it is replaced with an updated copy. diff --git a/site/src/repl.md b/site/src/repl.md index 4b4d3deb..22516fd3 100644 --- a/site/src/repl.md +++ b/site/src/repl.md @@ -6,7 +6,7 @@ If you don't provide any `-i` or `-e` options or args to `planck` when launching ``` $ planck Planck 2.7.0 -ClojureScript 1.9.908 +ClojureScript 1.9.946 Docs: (doc function-name-here) (find-doc "part-of-name-here") Source: (source function-name-here) From 20296fb2fa9c4f85043380b77f593fdd95accdd5 Mon Sep 17 00:00:00 2001 From: Mike Fikes Date: Tue, 3 Oct 2017 13:39:50 -0400 Subject: [PATCH 34/34] 2.8.0 --- CHANGELOG.md | 5 ++++- planck-c/globals.h | 2 +- site/src/repl.md | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25ba36cc..997a9915 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). ## [Unreleased] + +## [2.8.0] - 2017-10-03 ### Added - Optimizations for source map loading when first exception is printed. - Honor `cljs.core/*main-cli-fn*`, calling if set. @@ -543,7 +545,8 @@ All notable changes to this project will be documented in this file. This change ### Added - Initial release. -[Unreleased]: https://github.com/mfikes/planck/compare/2.7.3...HEAD +[Unreleased]: https://github.com/mfikes/planck/compare/2.8.0...HEAD +[2.8.0]: https://github.com/mfikes/planck/compare/2.7.3...2.8.0 [2.7.3]: https://github.com/mfikes/planck/compare/2.7.0...2.7.3 [2.7.0]: https://github.com/mfikes/planck/compare/2.6.0...2.7.0 [2.6.0]: https://github.com/mfikes/planck/compare/2.5.0...2.6.0 diff --git a/planck-c/globals.h b/planck-c/globals.h index eceb92ae..62a778ab 100644 --- a/planck-c/globals.h +++ b/planck-c/globals.h @@ -1,6 +1,6 @@ // Global variables used throughout Planck -#define PLANCK_VERSION "2.7.3" +#define PLANCK_VERSION "2.8.0" #define EXIT_SUCCESS_INTERNAL -257 diff --git a/site/src/repl.md b/site/src/repl.md index 22516fd3..8de31e4b 100644 --- a/site/src/repl.md +++ b/site/src/repl.md @@ -5,7 +5,7 @@ If you don't provide any `-i` or `-e` options or args to `planck` when launching ``` $ planck -Planck 2.7.0 +Planck 2.8.0 ClojureScript 1.9.946 Docs: (doc function-name-here) (find-doc "part-of-name-here")