mirror of
https://github.com/janet-lang/janet
synced 2025-02-17 17:20:01 +00:00
Update Changelog
Also change how add-body in jpm works. We keep an array of thunks instead of a single thunk.
This commit is contained in:
parent
04579664fd
commit
f001b0a40c
@ -10,6 +10,11 @@ All notable changes to this project will be documented in this file.
|
|||||||
- Remove Emscripten build. Instead, use the amalgamated source code with a custom toolchain.
|
- Remove Emscripten build. Instead, use the amalgamated source code with a custom toolchain.
|
||||||
- Update documentation.
|
- Update documentation.
|
||||||
- Add `module/add-paths`
|
- Add `module/add-paths`
|
||||||
|
- Add `file/temp`
|
||||||
|
- Small bug fixes
|
||||||
|
- Allow signaling from C functions (yielding) via janet\_signalv. This
|
||||||
|
makes it easy to write C functions that work with event loops, such as
|
||||||
|
in libuv or embedded in a game.
|
||||||
- Fix segfault regression when macros are called with bad arity.
|
- Fix segfault regression when macros are called with bad arity.
|
||||||
|
|
||||||
### 1.6.0 - 2019-12-22
|
### 1.6.0 - 2019-12-22
|
||||||
|
11
auxbin/jpm
11
auxbin/jpm
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
(defn- rule-impl
|
(defn- rule-impl
|
||||||
[target deps thunk &opt phony]
|
[target deps thunk &opt phony]
|
||||||
(put (getrules) target @[(array/slice deps) thunk phony]))
|
(put (getrules) target @[(array/slice deps) @[thunk] phony]))
|
||||||
|
|
||||||
(defmacro rule
|
(defmacro rule
|
||||||
"Add a rule to the rule graph."
|
"Add a rule to the rule graph."
|
||||||
@ -53,8 +53,9 @@
|
|||||||
(defn- add-thunk
|
(defn- add-thunk
|
||||||
[target more]
|
[target more]
|
||||||
(def item (gettarget target))
|
(def item (gettarget target))
|
||||||
(def [_ thunk] item)
|
(def [_ thunks] item)
|
||||||
(put item 1 (fn [] (more) (thunk))))
|
(array/push thunks more)
|
||||||
|
item)
|
||||||
|
|
||||||
(defmacro add-body
|
(defmacro add-body
|
||||||
"Add recipe code to an existing rule. This makes existing rules do more but
|
"Add recipe code to an existing rule. This makes existing rules do more but
|
||||||
@ -83,10 +84,10 @@
|
|||||||
(if (os/stat target :mode)
|
(if (os/stat target :mode)
|
||||||
(break target)
|
(break target)
|
||||||
(error (string "No rule for file " target " found."))))
|
(error (string "No rule for file " target " found."))))
|
||||||
(def [deps thunk phony] item)
|
(def [deps thunks phony] item)
|
||||||
(def realdeps (seq [dep :in deps :let [x (do-rule dep)] :when x] x))
|
(def realdeps (seq [dep :in deps :let [x (do-rule dep)] :when x] x))
|
||||||
(when (or phony (needs-build-some target realdeps))
|
(when (or phony (needs-build-some target realdeps))
|
||||||
(thunk))
|
(each thunk thunks (thunk)))
|
||||||
(unless phony target))
|
(unless phony target))
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user