Closed ghost closed 4 years ago
Hi @viebel, what is the status of this PR?
2->1->3
On Fri, Jul 24, 2020, 8:29 PM Yehonathan Sharvit notifications@github.com wrote:
@viebel commented on this pull request.
In src/klipse/plugin.cljs https://github.com/viebel/klipse/pull/372#discussion_r460107617:
- (if (seq elements)
- (let [element (first elements)]
- (let [eval-fn (<! (klipsify-no-eval element general-settings (modes element) #(go
- (>! event-chan curr-idx))))]
- (recur (rest elements) (conj eval-fns eval-fn) (inc curr-idx))))
- eval-fns))]
- (println eval-fns)
- ; sub process that reloads other editors
- (go
- ; We reevaluate all the other snippets in the order they appear on page
- ; code once a snippet is edited
- (loop [idx (<! event-chan)]
- ; evaluate edited snippet
- ((eval-fns idx))
- (if (general-settings :re_evaluate_all_snippets_on_change)
What is the order of evaluation now? Let's say we have 3 snippets on a page and snippet #2 https://github.com/viebel/klipse/pull/2 is edited?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/viebel/klipse/pull/372#pullrequestreview-454958761, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN5NKLZAMVLBD4GCIHUHBTLR5GOWVANCNFSM4OXPSJMQ .
@fctorial The ball is in your camp. Waiting for you to address the two remaining comments:
The reload order is now 2->1->2->3. An example mixing clojure and javascript has been added.
@fctorial Thank you for addressing the test page comment. One last comment is remaining: https://github.com/viebel/klipse/pull/372#discussion_r460116526
@viebel I've addressed that comment here: https://github.com/viebel/klipse/pull/372#issuecomment-667416466
I've tested that editors work as expected when the reload property is either true or false.
@fctorial Can you modify the code in src/klipse/plugin.cljs
so that the code that handles the default case (:re_evaluate_all_snippets_on_change false) is not modified. I don't want to take any risk that it might cause regression.
I don't mind if some code is duplicated.
Thank you for your contribution @fctorial
Fixes #361