Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main

2020-08-10 Thread Alan Thompson
Hi.  Just helped a colleague debug a vexing problem on a CLJS project using
Figwheel.Main.

If we do *`brew install clojure/tools/clojure`*, it works:

~/work/tmp810/xanadu > clj --help
Version: *1.10.1.561*

Usage: clojure [dep-opt*] [--] [init-opt*] [main-opt] [arg*]
   clj [dep-opt*] [--] [init-opt*] [main-opt] [arg*]

The clojure script is a runner for Clojure. clj is a wrapper
for interactive repl use. These scripts ultimately construct and



Note that local ./resources etc are at the beginning of the classpath

~/work/tmp810/xanadu > clj -Spath
*resources:target:src/clj:src/cljc:src/cljs:test/cljs:test-figwheel-main*
:/Users/alanthompson/.m2/repository/com/cognitect/transit-java/0.8.332/transit-java-0.8.332.jar:/Users/alanthompson/.m2/repository/com/google/elemental2/elemental2-core/1.0.0-RC1/elemental2-core-1.0.0-RC1.jar:/Users/alanthompson/.m2/repository/org/clojure/data.json/0.2.6/data.json-0.2.6.jar:/Users/alanthompson/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar:/Users/alanthompson/.m2/repository/day8/re-frame/test/0.1.5/test-0.1.5.jar:/Users/alanthompson/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/Users/alanthompson/.m2/repository/cljsjs/material-ui-currency-textfield/0.8.6-0/material-ui-currency-textfield-0.8.6-0.jar:/Users/alanthompson/.m2/repository/org/clojure/tools.analyzer/1.0.0/tools.analyzer-1.0.0.jar:/Users/alanthompson/.m2/repository/com/bhauman/cljs-test-display/0.1.1/cljs-test-display-0.1.1.jar:/Users/alanthompson/.m2/repository/org/eclipse/jetty/jetty-xml/9.4.28.v20200408/jetty-xml-9.4.28.v20200408.jar:/Users/alanthompson/.m2/repository/com/bhauman/figwheel-repl/0.2.11/figwheel-repl-0.2.11.jar:/Users/alanthompson/.m2/repository/org/eclipse/jetty/jetty-servlet/9.4.28.v20200408/jetty-servlet-9.4.28.v20200408.jar:/Users/alanthompson/.m2/repository/ring/ring-devel/1.8.1/ring-devel-1.8.1.jar:/Users/alanthompson/.m2/repository/com/google/errorprone/error_prone_annotations/2.3.1/error_prone_annotations-2.3.1.jar:/Users/alanthompson/.m2/repository/org/clojure/tools.logging/0.3.1/tools.logging-0.3.1.jar:/Users/alanthompson/.m2/repository/org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar:/Users/alanthompson/.m2/repository/co/deps/ring-etag-middleware/0.2.0/ring-etag-middleware-0.2.0.jar:/Users/alanthompson/.m2/repository/expound/expound/0.7.2/expound-0.7.2.jar:/Users/alanthompson/.m2/repository/org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar:/Users/alanthompson/.m2/repository/com/cemerick/url/0.1.1/url-0.1.1.jar:

..


However, my colleague had accidentally typed *`brew install clojure`.  *This
caused a mysterious failure:

---
~/work/tmp810/xanadu > clojure --help
Version: *1.10.1.645*

You use the Clojure tools ('clj' or 'clojure') to run Clojure programs
on the JVM, e.g. to start a REPL or invoke a specific function with data.


and the classpath

-
~/work/tmp810/xanadu > clj -Spath
DEPRECATED: Libs must be qualified, change deps-ancient =>
deps-ancient/deps-ancient (deps.edn)
DEPRECATED: Libs must be qualified, change reagent => reagent/reagent
(deps.edn)
DEPRECATED: Libs must be qualified, change ns-tracker =>
ns-tracker/ns-tracker (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 bidi => bidi/bidi (deps.edn)
DEPRECATED: Libs must be qualified, change orchestra => orchestra/orchestra
(deps.edn)
DEPRECATED: Libs must be qualified, change cljs-ajax => cljs-ajax/cljs-ajax
(deps.edn)
DEPRECATED: Libs must be qualified, change expound => expound/expound
(deps.edn)
DEPRECATED: Libs must be qualified, change re-frame => re-frame/re-frame
(deps.edn)
DEPRECATED: Libs must be qualified, change re-frame-utils =>
re-frame-utils/re-frame-utils (deps.edn)
DEPRECATED: Libs must be qualified, change cljs-bean => cljs-bean/cljs-bean
(deps.edn)
/Users/alanthompson/.m2/repository/alandipert/storage-atom/1.2.4/storage-atom-1.2.4.jar:/Users/alanthompson/.m2/repository/com/google/errorprone/error_prone_annotations/2.3.1/error_prone_annotations-2.3.1.jar:/Users/alanthompson/.m2/repository/org/clojure/core.cache/1.0.207/core.cache-1.0.207.jar:/Users/alanthompson/.m2/repository/com/google/jsinterop/jsinterop-annotations/1.0.2/jsinterop-annotations-1.0.2.jar:/Users/alanthompson/.m2/repository/compliment/compliment/0.3.6/compliment-0.3.6.jar:/Users/alanthompson/.m2/repository/ring/ring-headers/0.3.0/ring-headers-0.3.0.jar:/Users/alanthompson/.m2/repository/cljs-bean/cljs-bean/1.4.0/cljs-bean-1.4.0.jar:/Users/alanthompson/.m2/repository/hawk/hawk/0.2.11/hawk-0.2.11.jar:/Users/alanthompson/.m2/repository/binaryage/devtools/1.0.0/devtools-1.0.0.jar:/Users/alanthompson/.m2/repository/org/eclipse/jetty/websocket/websocket-api/9.4.28.v20200408/websocket-api-9.4.28.v20200408.jar:/Users/alanthompson/.m2/repository/org/apache/httpcomponents/httpasyncclient/4.1.3/httpasyncclient-4.1.3.jar:/U

Re: Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main

2020-08-10 Thread Alan Thompson
P.S.  There seems to be no *`clojure --version`* flag.  Should this be
added to the command line tool?


On Mon, Aug 10, 2020 at 4:58 PM Alan Thompson  wrote:

> Hi.  Just helped a colleague debug a vexing problem on a CLJS project
> using Figwheel.Main.
>
> If we do *`brew install clojure/tools/clojure`*, it works:
>
> ~/work/tmp810/xanadu > clj --help
> Version: *1.10.1.561*
>
> Usage: clojure [dep-opt*] [--] [init-opt*] [main-opt] [arg*]
>clj [dep-opt*] [--] [init-opt*] [main-opt] [arg*]
>
> The clojure script is a runner for Clojure. clj is a wrapper
> for interactive repl use. These scripts ultimately construct and
> 
>
>
> Note that local ./resources etc are at the beginning of the classpath
>
> ~/work/tmp810/xanadu > clj -Spath
> *resources:target:src/clj:src/cljc:src/cljs:test/cljs:test-figwheel-main*
> :/Users/alanthompson/.m2/repository/com/cognitect/transit-java/0.8.332/transit-java-0.8.332.jar:/Users/alanthompson/.m2/repository/com/google/elemental2/elemental2-core/1.0.0-RC1/elemental2-core-1.0.0-RC1.jar:/Users/alanthompson/.m2/repository/org/clojure/data.json/0.2.6/data.json-0.2.6.jar:/Users/alanthompson/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar:/Users/alanthompson/.m2/repository/day8/re-frame/test/0.1.5/test-0.1.5.jar:/Users/alanthompson/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/Users/alanthompson/.m2/repository/cljsjs/material-ui-currency-textfield/0.8.6-0/material-ui-currency-textfield-0.8.6-0.jar:/Users/alanthompson/.m2/repository/org/clojure/tools.analyzer/1.0.0/tools.analyzer-1.0.0.jar:/Users/alanthompson/.m2/repository/com/bhauman/cljs-test-display/0.1.1/cljs-test-display-0.1.1.jar:/Users/alanthompson/.m2/repository/org/eclipse/jetty/jetty-xml/9.4.28.v20200408/jetty-xml-9.4.28.v20200408.jar:/Users/alanthompson/.m2/repository/com/bhauman/figwheel-repl/0.2.11/figwheel-repl-0.2.11.jar:/Users/alanthompson/.m2/repository/org/eclipse/jetty/jetty-servlet/9.4.28.v20200408/jetty-servlet-9.4.28.v20200408.jar:/Users/alanthompson/.m2/repository/ring/ring-devel/1.8.1/ring-devel-1.8.1.jar:/Users/alanthompson/.m2/repository/com/google/errorprone/error_prone_annotations/2.3.1/error_prone_annotations-2.3.1.jar:/Users/alanthompson/.m2/repository/org/clojure/tools.logging/0.3.1/tools.logging-0.3.1.jar:/Users/alanthompson/.m2/repository/org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar:/Users/alanthompson/.m2/repository/co/deps/ring-etag-middleware/0.2.0/ring-etag-middleware-0.2.0.jar:/Users/alanthompson/.m2/repository/expound/expound/0.7.2/expound-0.7.2.jar:/Users/alanthompson/.m2/repository/org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar:/Users/alanthompson/.m2/repository/com/cemerick/url/0.1.1/url-0.1.1.jar:
>
> ..
>
>
> However, my colleague had accidentally typed *`brew install clojure`.  *This
> caused a mysterious failure:
>
> ---
> ~/work/tmp810/xanadu > clojure --help
> Version: *1.10.1.645*
>
> You use the Clojure tools ('clj' or 'clojure') to run Clojure programs
> on the JVM, e.g. to start a REPL or invoke a specific function with data.
> 
>
> and the classpath
>
> -
> ~/work/tmp810/xanadu > clj -Spath
> DEPRECATED: Libs must be qualified, change deps-ancient =>
> deps-ancient/deps-ancient (deps.edn)
> DEPRECATED: Libs must be qualified, change reagent => reagent/reagent
> (deps.edn)
> DEPRECATED: Libs must be qualified, change ns-tracker =>
> ns-tracker/ns-tracker (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 bidi => bidi/bidi (deps.edn)
> DEPRECATED: Libs must be qualified, change orchestra =>
> orchestra/orchestra (deps.edn)
> DEPRECATED: Libs must be qualified, change cljs-ajax =>
> cljs-ajax/cljs-ajax (deps.edn)
> DEPRECATED: Libs must be qualified, change expound => expound/expound
> (deps.edn)
> DEPRECATED: Libs must be qualified, change re-frame => re-frame/re-frame
> (deps.edn)
> DEPRECATED: Libs must be qualified, change re-frame-utils =>
> re-frame-utils/re-frame-utils (deps.edn)
> DEPRECATED: Libs must be qualified, change cljs-bean =>
> cljs-bean/cljs-bean (deps.edn)
>
> /Users/alanthompson/.m2/repository/alandipert/storage-atom/1.2.4/storage-atom-1.2.4.jar:/Users/alanthompson/.m2/repository/com/google/errorprone/error_prone_annotations/2.3.1/error_prone_annotations-2.3.1.jar:/Users/alanthompson/.m2/repository/org/clojure/core.cache/1.0.207/core.cache-1.0.207.jar:/Users/alanthompson/.m2/repository/com/google/jsinterop/jsinterop-annotations/1.0.2/jsinterop-annotations-1.0.2.jar:/Users/alanthompson/.m2/repository/compliment/compliment/0.3.6/compliment-0.3.6.jar:/Users/alanthompson/.m2/repository/ring/ring-headers/0.3.0/ring-headers-0.3.0.jar:/Users/alanthompson/.m2/repository/cljs-bean/cljs-bean/1.4.0/cljs-bean-1.4.0.jar:/Users/alanthompson/.m2/repository/hawk/hawk/0.2.11/hawk-0.2.11.jar:/Users/alanthompson/.m2/repository/binaryage/de

Re: Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main

2020-08-10 Thread 'Alex Miller' via Clojure
Bunch of things here...

Clojure maintains its own brew tap and a "stable" release that you can 
obtain with `brew install clojure/tools/clojure` (the brew conventions 
automatically find the prior repo based on that). That tap also includes 
prerelease unstable versions that can be obtained with "@version" - more on 
that is doc'ed in the readme for that repo. The current stable version is 
1.10.1.561.

Homebrew core is what you are pulling from if you just do `brew install 
clojure`. The formula there is no longer maintained by the Clojure team as 
anyone can update it (and have, with changes we did not agree with). There 
is no "ownership" model in homebrew-core. I would happily remove it from 
there but they said they would not accept that PR. Recently, the 
homebrew-core formula has been updated by members of the homebrew team to 
newer prerelease (not yet stable) versions of clj. There is not really 
anything we can do about this.

The classpath difference is interesting. The classpath is a set of path 
roots and in general the files in these paths should be mutually exclusive. 
If the roots are mutually exclusive, then the classpath order is 
unimportant (as the JVM will always find the same class/clj/resource file 
regardless). Roots that include the same file are nearly always trouble and 
the source of "jar hell" style problems. clj and deps.edn provide features 
to cover most of the scenarios where users are typically tempted to use 
ordering for replacement (:override-deps, :classpath-overrides, etc).

Based on this, we did knowingly make a change since the last stable release 
that effectively made the classpath unordered (all the roots go through 
keys of a map at one point). To date, I had not seen any issues with that, 
so this is a useful data point we can take into consideration. I assume 
you're getting an index.html out of some library that's either unimportant 
or accidentally included. For now, I'd recommend that you continue using 
the latest stable version from the official Clojure homebrew tap.

Re the version - you can see the version with either `clj -h` (first line) 
or `clj -Sdescribe`. 

Relevant links:

* Clojure homebrew tap - https://github.com/clojure/homebrew-tools
* Official clj stable formula - 
https://github.com/clojure/homebrew-tools/blob/master/Formula/clojure.rb 
(what you get with `brew install clojure/tools/clojure`)
* Getting started/install doc - https://clojure.org/guides/getting_started
* Homebrew core - https://github.com/Homebrew/homebrew-core
* clj reference - https://clojure.org/reference/deps_and_cli (or see `clj 
-h` or `man clj`)


On Monday, August 10, 2020 at 7:04:40 PM UTC-5 cloo...@gmail.com wrote:

> P.S.  There seems to be no *`clojure --version`* flag.  Should this be 
> added to the command line tool?
>
>
> On Mon, Aug 10, 2020 at 4:58 PM Alan Thompson  wrote:
>
>> Hi.  Just helped a colleague debug a vexing problem on a CLJS project 
>> using Figwheel.Main.
>>
>> If we do *`brew install clojure/tools/clojure`*, it works:
>>
>> ~/work/tmp810/xanadu > clj --help
>> Version: *1.10.1.561*
>>
>> Usage: clojure [dep-opt*] [--] [init-opt*] [main-opt] [arg*]
>>clj [dep-opt*] [--] [init-opt*] [main-opt] [arg*]
>>
>> The clojure script is a runner for Clojure. clj is a wrapper
>> for interactive repl use. These scripts ultimately construct and
>> 
>>
>>
>> Note that local ./resources etc are at the beginning of the classpath
>>
>> ~/work/tmp810/xanadu > clj -Spath
>> *resources:target:src/clj:src/cljc:src/cljs:test/cljs:test-figwheel-main*
>> :/Users/alanthompson/.m2/repository/com/cognitect/transit-java/0.8.332/transit-java-0.8.332.jar:/Users/alanthompson/.m2/repository/com/google/elemental2/elemental2-core/1.0.0-RC1/elemental2-core-1.0.0-RC1.jar:/Users/alanthompson/.m2/repository/org/clojure/data.json/0.2.6/data.json-0.2.6.jar:/Users/alanthompson/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar:/Users/alanthompson/.m2/repository/day8/re-frame/test/0.1.5/test-0.1.5.jar:/Users/alanthompson/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/Users/alanthompson/.m2/repository/cljsjs/material-ui-currency-textfield/0.8.6-0/material-ui-currency-textfield-0.8.6-0.jar:/Users/alanthompson/.m2/repository/org/clojure/tools.analyzer/1.0.0/tools.analyzer-1.0.0.jar:/Users/alanthompson/.m2/repository/com/bhauman/cljs-test-display/0.1.1/cljs-test-display-0.1.1.jar:/Users/alanthompson/.m2/repository/org/eclipse/jetty/jetty-xml/9.4.28.v20200408/jetty-xml-9.4.28.v20200408.jar:/Users/alanthompson/.m2/repository/com/bhauman/figwheel-repl/0.2.11/figwheel-repl-0.2.11.jar:/Users/alanthompson/.m2/repository/org/eclipse/jetty/jetty-servlet/9.4.28.v20200408/jetty-servlet-9.4.28.v20200408.jar:/Users/alanthompson/.m2/repository/ring/ring-devel/1.8.1/ring-devel-1.8.1.jar:/Users/alanthompson/.m2/repository/com/google/errorprone/error_prone_annotations/2.3.1/error_prone_annotations-2.3.1.jar:/Users/alanthompson/.m2/repository/org/clojur

Rationale: cljctools.mult - hypothetical clojure(script) extension for vscode. Should mult be made? Critique, comments ?

2020-08-10 Thread Sergei Udris
# mult: hypothetical clojure(script) extension for vscode

https://github.com/cljctools/mult

## rationale

- clojure(script) IDE experience is no minor issue - it's the thing between
you and programs

- the editor and the extension
  - should be long-term satisfactory, enjoyable and even inspiring
  - should be open source
  - should be written in clojure, or at least the extension should be
written in clojure(script)
- for simplicity
- for asynchrony done via processes
- the extension should
  - support multiple repl connections from one editor window
  - have a file configuration (for user and projects), where
connections and repls can be specified (to not depend on key-combo
connection sequences)
  - be simpler, code-wise and feature-wise
- making an editor in clojure is, no doubt, a goal, but the extension
for an existing editor is a logical first step
  - the work of making an extension is trasferrable even into an
editor written in clojure, so the work won't be lost
- existing editor + extension combos
  - Emacs + Cider
- perfect, if you're into it
  - IntelliJ + Cursive
- both closed source, Cursive comes with conditions
  - VSCode + Calva
- can be considered the current best option
- VSCode is the undeniable best open source editor
- Calva works perfectly, but is written in typescript
- nodejs runtime is undesirable, but not a problem


Should mult be made ? Critique, comments are appreciated.


Rationale can also be found here(same):

https://github.com/cljctools/mult/blob/master/docs/design.md#rationale

Same post can be found on a separate mailing list:

https://groups.google.com/g/cljctools/c/Qyz0qCxVC-Y

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CA%2Bq3MLzN-X9GNyGqwPT9aHg0YNJHC_YrUR098ukhbqwWdSFcgg%40mail.gmail.com.