reveal

Docs: https://vlaaad.github.io/reveal/ Source: https://github.com/vlaaad/reveal
onetom 2020-07-27T09:06:50.114600Z

I'm trying to conveniently contribute to reveal, in the context of my project which depends on it. I've added the following to my ~/.clojure/deps.edn:

{
 :aliases
 {:reveal-dev
            {:classpath-overrides {vlaaad/reveal "/Users/onetom/gini/reveal/"}}
...
where /Users/onetom/gini/reveal/ is a clone of reveal. my project specifies it as a dependency in an alias like this:
:reveal {:extra-deps {vlaaad/reveal {:mvn/version "0.1.0-ea24"}}
           :jvm-opts ["-Dclojure.server.repl={:port,5555,:accept,clojure.core.server/repl}"]}
when i try to start a repl with clj -A:reveal-dev:reveal -m vlaaad.reveal.repl, i get this error:
Execution error (FileNotFoundException) at clojure.main/main (main.java:40).
Could not locate vlaaad/reveal/repl__init.class, vlaaad/reveal/repl.clj or vlaaad/reveal/repl.cljc on classpath.

Full report at:
/var/folders/2y/8p3dxqr946v837dq1bp3t3t40000gn/T/clojure-15100010745472405699.edn
if i remove the :jvm-opts it makes no difference. clj -A:reveal -m vlaaad.reveal.repl works as expected, tho im getting this warning since the upgrade to 0.1.0-ea24:
Reflection warning, clj_diff/optimizations.clj:21:16 - call to method indexOf on java.lang.Object can't be resolved (no such method).
i've even explicitly added :paths ["src"] to /Users/onetom/gini/reveal/deps.edn, just in case... it seemed to make a difference to cursive the other day... any idea what the issue can be?

onetom 2020-07-27T09:08:03.114700Z

➜ clj -A:reveal-dev:reveal -Sforce -Spath | tr : \\n | rg reveal
/Users/onetom/gini/reveal/
the classpath seems to be correctly overriden.

onetom 2020-07-27T09:08:28.114900Z

this is my env: ➜ clj -Sdescribe {:version "1.10.1.561" :config-files ["/nix/store/lfjrwnd681pirgpw9fx7klz4cr9w4m8d-clojure-1.10.1.561/deps.edn" "/Users/onetom/.clojure/deps.edn" "deps.edn" ] :config-user "/Users/onetom/.clojure/deps.edn" :config-project "deps.edn" :install-dir "/nix/store/lfjrwnd681pirgpw9fx7klz4cr9w4m8d-clojure-1.10.1.561" :config-dir "/Users/onetom/.clojure" :cache-dir ".cpcache" :force false :repro false :resolve-aliases "" :classpath-aliases "" :jvm-aliases "" :main-aliases "" :all-aliases ""}

onetom 2020-07-27T09:13:51.115100Z

i've quickly upgraded to cli version 1.10.1.590, but it makes no difference from the error's perspective. for the record, i do get a bunch of deprecation warnings like this:

DEPRECATED: Libs must be qualified, change deps-ancient => deps-ancient/deps-ancient (/Users/onetom/.clojure/deps.edn)
DEPRECATED: Libs must be qualified, change compliment => compliment/compliment (/Users/onetom/.clojure/deps.edn)
DEPRECATED: Libs must be qualified, change reply => reply/reply (/Users/onetom/.clojure/deps.edn)
DEPRECATED: Libs must be qualified, change criterium => criterium/criterium (deps.edn)
DEPRECATED: Libs must be qualified, change criterium => criterium/criterium (deps.edn)
DEPRECATED: Libs must be qualified, change clojure.java-time => clojure.java-time/clojure.java-time (deps.edn)
DEPRECATED: Libs must be qualified, change camel-snake-kebab => camel-snake-kebab/camel-snake-kebab (deps.edn)
DEPRECATED: Libs must be qualified, change fipp => fipp/fipp (deps.edn)
DEPRECATED: Libs must be qualified, change aero => aero/aero (deps.edn)
DEPRECATED: Libs must be qualified, change google-apps-clj => google-apps-clj/google-apps-clj (deps.edn)
DEPRECATED: Libs must be qualified, change clansi => clansi/clansi (deps.edn)
DEPRECATED: Libs must be qualified, change hiccup => hiccup/hiccup (deps.edn)
DEPRECATED: Libs must be qualified, change semantic-csv => semantic-csv/semantic-csv (deps.edn)
DEPRECATED: Libs must be qualified, change clojure-csv => clojure-csv/clojure-csv (deps.edn)
DEPRECATED: Libs must be qualified, change honeysql => honeysql/honeysql (deps.edn)
which is an indication that the upgrade has happened indeed 🙂

onetom 2020-07-27T09:15:28.115300Z

also, the trailing slash makes no difference either:

{:classpath-overrides {vlaaad/reveal "/Users/onetom/gini/reveal/"}}
or
{:classpath-overrides {vlaaad/reveal "/Users/onetom/gini/reveal"}}

vlaaad 2020-07-27T09:15:37.115500Z

shouldn’t it be something like /Users/onetom/gini/reveal/src ?

vlaaad 2020-07-27T09:16:02.115700Z

or perhaps you should use :local/root dependency on reveal?

onetom 2020-07-27T09:16:47.115900Z

no, classpath override needs one string only, which is the path to whatever is in the root of the original .jar

onetom 2020-07-27T09:17:38.116100Z

it's overriding this:

➜ clj -A:reveal -Sforce -Spath | tr : \\n | rg reveal 
/Users/onetom/.m2/repository/vlaaad/reveal/0.1.0-ea24/reveal-0.1.0-ea24.jar

vlaaad 2020-07-27T09:18:59.116300Z

have you noticed the src suffix?

onetom 2020-07-27T09:19:25.116600Z

yeah, trying it now

👍 1
onetom 2020-07-27T09:20:30.116900Z

and it works indeed... makes sense

vlaaad 2020-07-27T09:20:38.117100Z

cool!

onetom 2020-07-27T09:20:56.117300Z

well, works from the command line, but let's see how cursive deals with it

onetom 2020-07-27T09:21:46.117500Z

how are you developing reveal? just in its own intellij project and your applications depending on it are referencing it via :local/root?

onetom 2020-07-27T09:22:01.117700Z

or :override-deps?

vlaaad 2020-07-27T09:29:37.117900Z

in its own intellij project

onetom 2020-07-27T09:34:12.118100Z

i have it opened as its own intellij project too, but when that reveal code is running within my project, i can only evaluate changes to reveal if i switch over to reveal, open a remote repl connecting to my project and evaluate reveal source there. weirdly, this way the background color change in style.clj doesn't take effect immediately when i cmd-shift-l the file, like it did when reveal was just a subdir within my app...

vlaaad 2020-07-27T09:47:14.118400Z

it was happening immediately by luck

onetom 2020-07-27T09:50:36.118600Z

ah, okay, it helps to know 🙂

onetom 2020-07-27T09:51:15.118800Z

is there an easy way to force a redraw?

onetom 2020-07-27T09:52:14.119Z

looks like if i just cmd-tab over to the reveal windows, thats enough, but it's also a bit annoying if i have to keep doing that 🙂

vlaaad 2020-07-27T09:57:56.119200Z

I’d say this is the easiest way 🙂

👍 1
vlaaad 2020-07-27T11:42:39.119500Z

by the way, what are you planning to contribute to reveal?

onetom 2020-07-27T11:53:01.119700Z

im not sure yet, but we want to be able to hack into it during the following days as we are test-driving it more actively. if it's troublesome to hack on it, we might just choose to live with the current feature-set for now.

onetom 2020-07-27T11:54:46.119900Z

we would like to write a regex-rule management system, but writing it as a webapp is a bit beyond the scope of the next few weeks. i was thinking that we can use tweaks to reveal first as a pre-study for designing the upcoming webapp.

onetom 2020-07-27T11:55:54.120100Z

it's also very attractive that it has builtin web browser, so we might be able to use reveal first to develop vega-lite visualizations, before we insert them into our webapp...

onetom 2020-07-27T11:58:02.120300Z

specifically for myself, i have changed the default font and background color and assigned the hjkl keys to cursor movement, but neither of those changes worth including upstream yet.

onetom 2020-07-27T17:07:06.121700Z

I came up with a workaround by using :override-deps and reassigning Cmd-Shift-L to a custom REPL command, defined as (load-file "~file-path"): https://github.com/cursive-ide/cursive/issues/1641#issuecomment-664513197

onetom 2020-07-27T18:01:54.122Z

this is a related issue, which i've already given a thumbs up the other day, but already forgot about it, because i haven't understood the problem well enough at that time... https://github.com/cursive-ide/cursive/issues/2204