status-react/nix/deps/clojure
Icaro Motta 615ad2f02b
dx(debug)_: Add FlowStorm, a tracing debugger for Clojure(Script) (#20054)
Adds FlowStorm https://github.com/flow-storm/flow-storm-debugger v3.7.5, a well
known (tracing) debugger for Clojure(Script).

With FlowStorm, you can debug almost any cljs function in status-mobile. And
although it is not as capable as on the JVM, its main features work well enough.

How do I use it? Please, check the markdown diff in this PR: doc/debugging.md.

When would you use FlowStorm in status-mobile? You can use it all the time if
you want, but FlowStorm can be a powerful tool to understand complex pieces of
code. Consider those large subscriptions or event handlers. Or all those
components with lots of bindings and calculations. Understanding some of these
things is no easy task, even with a REPL. It is not a replacement for re-frisk,
those are very different tools and each have their place.

Resources:

- Repository: https://github.com/flow-storm/flow-storm-debugger
- Documentation: https://flow-storm.github.io/flow-storm-debugger
- Features: https://github.com/flow-storm/flow-storm-debugger#features
- YouTube demos: https://github.com/flow-storm/flow-storm-debugger#some-demo-videos-newers-at-the-top
2024-06-03 19:47:10 -03:00
..
README.md nix: stop downloading POMs for Clojure dependencies 2023-10-13 15:23:41 +02:00
default.nix nix: stop downloading POMs for Clojure dependencies 2023-10-13 15:23:41 +02:00
deps.json dx(debug)_: Add FlowStorm, a tracing debugger for Clojure(Script) (#20054) 2024-06-03 19:47:10 -03:00
deps.list dx(debug)_: Add FlowStorm, a tracing debugger for Clojure(Script) (#20054) 2024-06-03 19:47:10 -03:00
generate.sh nix: stop downloading POMs for Clojure dependencies 2023-10-13 15:23:41 +02:00

README.md

Description

This folder contains the scripts and Nix derivations necessary to generate Clojure dependencies for this project.

Usage

Running generate.sh in a shell that has available shadow-cljs and clojure should update the deps.list and deps.json files.

Details

By using the following command:

shadow-cljs classpath --force-spawn

We download the necessary JARs into ~/.m2 folder, but also get the classpath printed into standard output. We skip POM files since they are not necessary, and add edge cases we don't want to handle.

We then use the classpath in combination with contents of ~/.m2 folder to generate the following files:

  • deps.list - List of JARs relative to the ~/.m2 cache folder.
  • deps.json - Full list of JARs including their SHAs.

The deps.list file is just intermediate and for debugging purposes. The deps.json is loaded by the derivation in default.nix and used to produce a derivation that contains all the necessary dependencies:

 > grep cljfmt nix/deps/clojure/deps.list
cljfmt/cljfmt/0.6.7/cljfmt-0.6.7.jar

 > nix-build --no-out-link -A pkgs.deps.clojure
/nix/store/d7p8r9vhq6z2jmxwakxpcb262wgkc86s-status-mobile-clojure-deps

 > DEPS=$(nix-build --no-out-link -A pkgs.deps.clojure)                              

 > find $DEPS -iname 'cljfmt-0.6.7.*'
/nix/store/d7p...86s-status-mobile-clojure-deps/cljfmt/cljfmt/0.6.7/cljfmt-0.6.7.pom.sha1
/nix/store/d7p...86s-status-mobile-clojure-deps/cljfmt/cljfmt/0.6.7/cljfmt-0.6.7.pom
/nix/store/d7p...86s-status-mobile-clojure-deps/cljfmt/cljfmt/0.6.7/cljfmt-0.6.7.jar.sha1
/nix/store/d7p...86s-status-mobile-clojure-deps/cljfmt/cljfmt/0.6.7/cljfmt-0.6.7.jar