Skip to content

Commit

Permalink
Release 4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmonettas committed Feb 25, 2025
1 parent 84a4ff3 commit 64ab547
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 105 deletions.
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ You use it by swapping the official Clojure compiler by ClojureStorm at dev time
FlowStorm latest stable releases :

- The complete debugger (includes `flow-storm-inst`)
- `[com.github.flow-storm/flow-storm-dbg "4.1.2"]`
- `[com.github.flow-storm/flow-storm-dbg "4.2.0"]`
- A slimmer version with no GUI, to use it for Clojure or ClojureScript remote debugging
- `[com.github.flow-storm/flow-storm-inst "4.1.2"]`
- `[com.github.flow-storm/flow-storm-inst "4.2.0"]`

ClojureStorm latest stable releases :

Expand Down
2 changes: 1 addition & 1 deletion build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[clojure.spec.alpha :as s]))

(def version (or (System/getenv "VERSION")
"4.2.0-SNAPSHOT"))
"4.2.0"))

(def target-dir "target")
(def class-dir (str target-dir "/classes"))
Expand Down
67 changes: 25 additions & 42 deletions docs/user_guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ You can start a repl with FlowStorm with a single command like this :
[%nowrap,bash]
----
;; on Linux and OSX
clj -Sforce -Sdeps '{:deps {} :aliases {:dev {:classpath-overrides {org.clojure/clojure nil} :extra-deps {com.github.flow-storm/clojure {:mvn/version "RELEASE"} com.github.flow-storm/flow-storm-dbg {:mvn/version "RELEASE"}} :jvm-opts ["-Dclojure.storm.instrumentEnable=true"]}}}' -A:dev
clj -Sforce -Sdeps '{:deps {} :aliases {:dev {:classpath-overrides {org.clojure/clojure nil} :extra-deps {com.github.flow-storm/clojure {:mvn/version "1.12.0-4"} com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.0"}} :jvm-opts ["-Dclojure.storm.instrumentEnable=true"]}}}' -A:dev
;; on Windows
clj -Sforce -Sdeps '{:deps {} :aliases {:dev {:classpath-overrides {org.clojure/clojure nil} :extra-deps {com.github.flow-storm/clojure {:mvn/version """RELEASE"""} com.github.flow-storm/flow-storm-dbg {:mvn/version """RELEASE"""}} :jvm-opts ["""-Dclojure.storm.instrumentEnable=true"""]}}}' -A:dev
clj -Sforce -Sdeps '{:deps {} :aliases {:dev {:classpath-overrides {org.clojure/clojure nil} :extra-deps {com.github.flow-storm/clojure {:mvn/version """1.12.0-4"""} com.github.flow-storm/flow-storm-dbg {:mvn/version """4.2.0"""}} :jvm-opts ["""-Dclojure.storm.instrumentEnable=true"""]}}}' -A:dev
----

Pasting that command on your terminal will bring up a repl with _FlowStorm_ and the compiler swapped by _ClojureStorm_. When the repl comes up
Expand All @@ -76,7 +76,7 @@ If your project is using deps.edn, you should modify it to look like this :
:aliases {:dev {;; for disabling the official compiler
:classpath-overrides {org.clojure/clojure nil}
:extra-deps {com.github.flow-storm/clojure {:mvn/version "1.12.0-4"}
com.github.flow-storm/flow-storm-dbg {:mvn/version "4.1.2"}}
com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.0"}}
:jvm-opts ["-Dclojure.storm.instrumentEnable=true"
"-Dclojure.storm.instrumentOnlyPrefixes=YOUR_INSTRUMENTATION_STRING"]}}}
----
Expand Down Expand Up @@ -105,7 +105,7 @@ If your project uses lein, your project.clj file should look something like this
----
(defproject my.project "1.0.0"
:profiles {:dev {:dependencies [[com.github.flow-storm/clojure "1.12.0-4"]
[com.github.flow-storm/flow-storm-dbg "4.1.2"] ]
[com.github.flow-storm/flow-storm-dbg "4.2.0"] ]
;; for disabling the official compiler
:exclusions [org.clojure/clojure]
:jvm-opts ["-Dclojure.storm.instrumentEnable=true"
Expand Down Expand Up @@ -147,7 +147,7 @@ For example you can modify your ~/.clojure/deps.edn like this :
:1.12-storm
{:classpath-overrides {org.clojure/clojure nil}
:extra-deps {com.github.flow-storm/clojure {:mvn/version "1.12.0-4"}
com.github.flow-storm/flow-storm-dbg {:mvn/version "4.1.2"}}
com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.0"}}
:jvm-opts ["-Dflowstorm.startRecording=false"
"-Dclojure.storm.instrumentEnable=true"
"-Dclojure.storm.instrumentAutoPrefixes=true"
Expand All @@ -170,7 +170,7 @@ If you are using leiningen instead, you can modify your ~/.lein/profiles.clj lik
----
{:flowstorm
{:dependencies [[com.github.flow-storm/clojure "1.12.0-4"]
[com.github.flow-storm/flow-storm-dbg "4.1.2"]]
[com.github.flow-storm/flow-storm-dbg "4.2.0"]]
:exclusions [org.clojure/clojure]
:jvm-opts ["-Dflowstorm.startRecording=false"
"-Dclojure.storm.instrumentEnable=true"
Expand All @@ -197,20 +197,12 @@ If you use the https://clojure.org/guides/deps_and_cli[clojure cli] you can star
[,bash]
----
;; on Linux and OSX
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "RELEASE"}}}'
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.0"}}}'
;; on Windows
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version """RELEASE"""}}}'
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version """4.2.0"""}}}'
----

[IMPORTANT]
.On using maven RELEASE as version
====
Be careful when using RELEASE as maven versions, since the first time is going to fetch the latest one
but it will be cached unless you run with -Sforce.
It is much safer to just write the latest versions. Check out the https://github.com/flow-storm/flow-storm-debugger/[github page] for the latest stable releases.
====

If you are a https://leiningen.org/[lein] user add the dependency to your project.clj `:dependencies` and run `lein repl`.

Then require the api namespace and start the debugger :
Expand Down Expand Up @@ -310,9 +302,9 @@ Then, modify your `deps.edn` dev profile to look like this :
:extra-deps {thheller/shadow-cljs {:mvn/version "2.25.6" ;; >= 2.25.4
:exclusions [org.clojure/clojurescript]}
;; bring ClojureScriptStorm
com.github.flow-storm/clojurescript {:mvn/version "RELEASE"}
com.github.flow-storm/clojurescript {:mvn/version "1.11.132-8"}
;; add FlowStorm runtime dep
com.github.flow-storm/flow-storm-inst {:mvn/version "RELEASE"}}
com.github.flow-storm/flow-storm-inst {:mvn/version "4.2.0"}}
:jvm-opts ["-Dcljs.storm.instrumentOnlyPrefixes=your-app-base-ns"
"-Dcljs.storm.instrumentEnable=true"
"-Dflowstorm.startRecording=false"]}}}
Expand All @@ -334,7 +326,7 @@ Whenever your need the debugger, on a terminal run the ui with your shadow-cljs.

[,bash]
----
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "RELEASE"}}}' -X flow-storm.debugger.main/start-debugger :port 9000 :repl-type :shadow :build-id :my-app
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.0"}}}' -X flow-storm.debugger.main/start-debugger :port 9000 :repl-type :shadow :build-id :my-app
----

and then reload you page so it connects to it.
Expand All @@ -360,21 +352,21 @@ To compile instrumented files :

[%nowrap,bash]
----
clj -J-Dcljs.storm.instrumentOnlyPrefixes=org.foo -J-Dcljs.storm.instrumentEnable=true -Sdeps '{:paths ["src"] :deps {com.github.flow-storm/clojurescript {:mvn/version "RELEASE"} com.github.flow-storm/flow-storm-inst {:mvn/version "RELEASE"}}}' -M -m cljs.main -co '{:preloads [flow-storm.storm-preload] :main org.foo.core}' --compile
clj -J-Dcljs.storm.instrumentOnlyPrefixes=org.foo -J-Dcljs.storm.instrumentEnable=true -Sdeps '{:paths ["src"] :deps {com.github.flow-storm/clojurescript {:mvn/version "1.11.132-8"} com.github.flow-storm/flow-storm-inst {:mvn/version "4.2.0"}}}' -M -m cljs.main -co '{:preloads [flow-storm.storm-preload] :main org.foo.core}' --compile
----

To run a repl that instrument everything under org.foo :

[%nowrap,bash]
----
clj -J-Dcljs.storm.instrumentOnlyPrefixes=org.foo -J-Dcljs.storm.instrumentEnable=true -Sdeps '{:paths ["src"] :deps {com.github.flow-storm/clojurescript {:mvn/version "RELEASE"} com.github.flow-storm/flow-storm-inst {:mvn/version "RELEASE"}}}' -M -m cljs.main -co '{:preloads [flow-storm.storm-preload] :main org.foo.core}' --repl
clj -J-Dcljs.storm.instrumentOnlyPrefixes=org.foo -J-Dcljs.storm.instrumentEnable=true -Sdeps '{:paths ["src"] :deps {com.github.flow-storm/clojurescript {:mvn/version "1.11.132-8"} com.github.flow-storm/flow-storm-inst {:mvn/version "4.2.0"}}}' -M -m cljs.main -co '{:preloads [flow-storm.storm-preload] :main org.foo.core}' --repl
----

Then run the _FlowStorm_ UI :

[%nowrap,bash]
----
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "RELEASE"}}}' -X flow-storm.debugger.main/start-debugger
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.0"}}}' -X flow-storm.debugger.main/start-debugger
----

And now refresh your browser page so your browser app connects to the UI.
Expand All @@ -390,23 +382,14 @@ First you need to add _FlowStorm_ dependency to your project dependencies, like
$ cat shadow-cljs.edn
{...
:dependencies [... [com.github.flow-storm/flow-storm-inst "RELEASE"]]
:dependencies [... [com.github.flow-storm/flow-storm-inst "4.2.0"]]
;; the next two lines aren't needed but pretty convenient
:nrepl {:port 9000}
:my-build-id {:devtools {:preloads [flow-storm.preload]}}
...}
----

[IMPORTANT]
.On using maven RELEASE as version
====
Be careful when using RELEASE as maven versions, since the first time is going to fetch the latest one
but it will be cached unless you run with -Sforce.
It is much safer to just write the latest versions. Check out the https://github.com/flow-storm/flow-storm-debugger/[github page] for the latest stable releases.
====


Then let's say you start your repl like :

[,bash]
Expand All @@ -430,10 +413,10 @@ so to start the debugger and connect to it you run :
[,bash]
----
;; on linux and mac-os
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "RELEASE"}}}' -X flow-storm.debugger.main/start-debugger :port 9000 :repl-type :shadow :build-id :my-build-id
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.0"}}}' -X flow-storm.debugger.main/start-debugger :port 9000 :repl-type :shadow :build-id :my-build-id
;; on windows
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version """RELEASE"""}}}' -X flow-storm.debugger.main/start-debugger :port 9000 :repl-type :shadow :build-id :my-build-id
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version """4.2.0"""}}}' -X flow-storm.debugger.main/start-debugger :port 9000 :repl-type :shadow :build-id :my-build-id
----

And that is all you need, the debugger GUI will pop up and everything will be ready.
Expand Down Expand Up @@ -466,7 +449,7 @@ For this you can start the debugger like before but without any parameters, like

[,bash]
----
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "RELEASE"}}}' -X flow-storm.debugger.main/start-debugger
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.0"}}}' -X flow-storm.debugger.main/start-debugger
----

And then go to your app code and call `(flow-storm.runtime.debuggers-api/remote-connect)` maybe on your main, so every time your program starts
Expand Down Expand Up @@ -519,10 +502,10 @@ So let's say you want to run two debuggers, one for your page and one for a webw
[,bash]
----
# on one terminal start your app debugger instance
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "RELEASE"}}}' -X flow-storm.debugger.main/start-debugger :port 9000 :repl-type :shadow :build-id :my-app :ws-port 7722
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.0"}}}' -X flow-storm.debugger.main/start-debugger :port 9000 :repl-type :shadow :build-id :my-app :ws-port 7722
# on a second terminal start your webworker debugger instance
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "RELEASE"}}}' -X flow-storm.debugger.main/start-debugger :port 9000 :repl-type :shadow :build-id :my-web-worker :ws-port 7733
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.0"}}}' -X flow-storm.debugger.main/start-debugger :port 9000 :repl-type :shadow :build-id :my-web-worker :ws-port 7733
----

Now you also need to configure your builds to tell them what port they should connect to.
Expand Down Expand Up @@ -596,8 +579,8 @@ Then modify the resulting deps.edn to add the FlowStorm alias like this :
----
{...
:aliases {:dev {:classpath-overrides {org.clojure/clojure nil} ;; for disabling the official compiler
:extra-deps {com.github.flow-storm/clojure {:mvn/version "RELEASE"}
com.github.flow-storm/flow-storm-dbg {:mvn/version "RELEASE"}}
:extra-deps {com.github.flow-storm/clojure {:mvn/version "1.12.0-4"}
com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.0"}}
:jvm-opts ["-Dclojure.storm.instrumentEnable=true"
"-Dclojure.storm.instrumentOnlyPrefixes=user"]}}}
----
Expand Down Expand Up @@ -1721,7 +1704,7 @@ After the tunnel is established, you can run you debugger UI like this :

[,bash]
----
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "RELEASE"}}}' -X flow-storm.debugger.main/start-debugger :port 9000
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.0"}}}' -X flow-storm.debugger.main/start-debugger :port 9000
----

and that is it.
Expand All @@ -1730,7 +1713,7 @@ If you need to connect the debugger to a remote process without a ssh tunnel or

[,bash]
----
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "RELEASE"}}}' -X flow-storm.debugger.main/start-debugger :port NREPL-PORT :runtime-host '"YOUR-APP-BOX-IP-ADDRESS"' :debugger-host '"YOUR-BOX-IP-ADDRESS"' :ws-port WS-SERVER-PORT
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.0"}}}' -X flow-storm.debugger.main/start-debugger :port NREPL-PORT :runtime-host '"YOUR-APP-BOX-IP-ADDRESS"' :debugger-host '"YOUR-BOX-IP-ADDRESS"' :ws-port WS-SERVER-PORT
----

== Docker
Expand Down Expand Up @@ -2199,7 +2182,7 @@ can start a debugger and connect to it by running :

[,bash]
----
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "RELEASE"}}}' -X flow-storm.debugger.main/start-debugger :port 9000 :repl-type :shadow :build-id :your-app-build-id :debugger-host '"YOUR_DEV_MACHINE_IP"'
clj -Sforce -Sdeps '{:deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "4.2.0"}}}' -X flow-storm.debugger.main/start-debugger :port 9000 :repl-type :shadow :build-id :your-app-build-id :debugger-host '"YOUR_DEV_MACHINE_IP"'
----

You also need to make it possible for the device to connect back to the debugger on port 7722. You can accomplish this by running :
Expand Down
Loading

0 comments on commit 64ab547

Please sign in to comment.