This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-05
Channels
- # announcements (5)
- # beginners (49)
- # boot (9)
- # calva (34)
- # cider (9)
- # clara (18)
- # clj-kondo (1)
- # cljsrn (7)
- # clojure (196)
- # clojure-dev (4)
- # clojure-europe (11)
- # clojure-france (3)
- # clojure-nl (13)
- # clojure-norway (2)
- # clojure-spec (8)
- # clojure-uk (85)
- # clojurescript (87)
- # clojurex (202)
- # core-logic (6)
- # data-science (6)
- # datomic (9)
- # dirac (1)
- # duct (93)
- # emacs (9)
- # events (1)
- # fulcro (22)
- # hoplon (30)
- # jackdaw (10)
- # keechma (1)
- # leiningen (5)
- # malli (17)
- # off-topic (9)
- # other-languages (3)
- # pedestal (7)
- # re-frame (3)
- # reagent (5)
- # reitit (9)
- # remote-jobs (6)
- # rewrite-clj (80)
- # ring (2)
- # shadow-cljs (191)
- # tools-deps (54)
- # vim (14)
- # xtdb (7)
if anyone has clj on windows and can check https://ask.clojure.org/index.php/8820/why-does-not-merge-deps-across-multiple-aliases-in-tools-deps, that would be cool. I tried it with this deps.edn on mac and couldn't repro:
{:aliases
{:a {:extra-deps {org.clojure/data.xml {:mvn/version "0.2.0-alpha6"}}}
:b {:extra-deps {org.clojure/data.json {:mvn/version "0.2.6"}}}}}
Taking a look...
There's definitely something odd going on:
PS C:\var\www\async.http\sketch> clojure -R:a -R:b -Spath
src;C:\Users\seanc\.m2\repository\org\clojure\clojure\1.10.1\clojure-1.10.1.jar;C:\Users\seanc\.m2\repository\org\clojure\data.xml\0.2.0-alpha6\data.xml-0.2.0-alpha6.jar;C:\Users\seanc\.m2\repository\org\clojure\data.json\0.2.6\data.json-0.2.6.jar;C:\Users\seanc\.m2\repository\org\clojure\spec.alpha\0.2.176\spec.alpha-0.2.176.jar;C:\Users\seanc\.m2\repository\org\clojure\core.specs.alpha\0.2.44\core.specs.alpha-0.2.44.jar;C:\Users\seanc\.m2\repository\org\clojure\data.codec\0.1.0\data.codec-0.1.0.jar
PS C:\var\www\async.http\sketch> clojure -A:a -A:b -Spath
src;C:\Users\seanc\.m2\repository\org\clojure\clojure\1.10.1\clojure-1.10.1.jar;C:\Users\seanc\.m2\repository\org\clojure\data.xml\0.2.0-alpha6\data.xml-0.2.0-alpha6.jar;C:\Users\seanc\.m2\repository\org\clojure\data.json\0.2.6\data.json-0.2.6.jar;C:\Users\seanc\.m2\repository\org\clojure\spec.alpha\0.2.176\spec.alpha-0.2.176.jar;C:\Users\seanc\.m2\repository\org\clojure\core.specs.alpha\0.2.44\core.specs.alpha-0.2.44.jar;C:\Users\seanc\.m2\repository\org\clojure\data.codec\0.1.0\data.codec-0.1.0.jar
PS C:\var\www\async.http\sketch> clojure -Sforce -A:a -A:b -Spath
WARNING: Specified aliases are undeclared: [:a ]
src;C:\Users\seanc\.m2\repository\org\clojure\clojure\1.10.1\clojure-1.10.1.jar;C:\Users\seanc\.m2\repository\org\clojure\data.json\0.2.6\data.json-0.2.6.jar;C:\Users\seanc\.m2\repository\org\clojure\spec.alpha\0.2.176\spec.alpha-0.2.176.jar;C:\Users\seanc\.m2\repository\org\clojure\core.specs.alpha\0.2.44\core.specs.alpha-0.2.44.jar
PS C:\var\www\async.http\sketch> clojure -Sforce -R:a -R:b -Spath
WARNING: Specified aliases are undeclared: [:a ]
src;C:\Users\seanc\.m2\repository\org\clojure\clojure\1.10.1\clojure-1.10.1.jar;C:\Users\seanc\.m2\repository\org\clojure\data.json\0.2.6\data.json-0.2.6.jar;C:\Users\seanc\.m2\repository\org\clojure\spec.alpha\0.2.176\spec.alpha-0.2.176.jar;C:\Users\seanc\.m2\repository\org\clojure\core.specs.alpha\0.2.44\core.specs.alpha-0.2.44.jar
PS C:\var\www\async.http\sketch>
I got the same results from -R
and -A
tho' in all cases (including -A:a:b
and -R:a:b
, not shown) but with -Sforce
, the first alias is somehow not found...
After running that -Sforce
variant, running the command without -Sforce
is now behaving as if :a
was not included.
that extra space in [:a ] is probably important - I presume that's causing the alias not to be found there
PS C:\var\www\async.http\sketch> clojure -R:a:b -Spath
src;C:\Users\seanc\.m2\repository\org\clojure\clojure\1.10.1\clojure-1.10.1.jar;C:\Users\seanc\.m2\repository\org\clojure\data.json\0.2.6\data.json-0.2.6.jar;C:\Users\seanc\.m2\repository\org\clojure\spec.alpha\0.2.176\spec.alpha-0.2.176.jar;C:\Users\seanc\.m2\repository\org\clojure\core.specs.alpha\0.2.44\core.specs.alpha-0.2.44.jar
PS C:\var\www\async.http\sketch> clojure -R:b:a -Spath
src;C:\Users\seanc\.m2\repository\org\clojure\clojure\1.10.1\clojure-1.10.1.jar;C:\Users\seanc\.m2\repository\org\clojure\data.json\0.2.6\data.json-0.2.6.jar;C:\Users\seanc\.m2\repository\org\clojure\data.xml\0.2.0-alpha6\data.xml-0.2.0-alpha6.jar;C:\Users\seanc\.m2\repository\org\clojure\spec.alpha\0.2.176\spec.alpha-0.2.176.jar;C:\Users\seanc\.m2\repository\org\clojure\core.specs.alpha\0.2.44\core.specs.alpha-0.2.44.jar;C:\Users\seanc\.m2\repository\org\clojure\data.codec\0.1.0\data.codec-0.1.0.jar
Note that swapping the aliases produces the correct result (since it's treated as a new invocation)Then I ran it with -Sforce -R:a:b
and got the correct behavior back. So I'm suspecting a problem with parsing options if -Sforce
is used?
Yeah, almost certainly something about -Sforce
messing up alias parsing or combining somehow based on further experiments.
That's with PS 1.10.1.469 BTW.
And it's peculiar to the PS script. The exact same sequences of commands on Linux just work.
(how did he get .483 on Windows? I tried scoop update clojure
and it thinks .469 is the latest... maybe the wiki page has not been updated?)
I updated the wiki page
assuming you mean https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows
I don't anything about the scoop thing though
Yeah, the scoop
script is supposed to use that link in that page to pick up a newer version...
I wouldn't expect these to differ in this though
so it's likely same in 483
Fair enough. Now I'm still puzzled about the scoop update
process 🙂 I'll open an issue...
I assume these are bugs in the ps script
Interesting. Now I've managed to get this in a clean folder without using -Sforce
:
PS C:\var\www\async.http\sketch> clojure -A:a -A:b
WARNING: Specified aliases are undeclared: [:a ]
Clojure 1.10.1
user=>
That makes a bit more sense given the report on ask...
[:a ]
has an extra space which I assume is the problem
I think all of these need to be wrapped in $(,,, -join '')
https://github.com/clojure/brew-install/blob/1.10.1/src/main/resources/ClojureTools.psm1#L259-L273
In the same way as is done here https://github.com/clojure/brew-install/blob/1.10.1/src/main/resources/ClojureTools.psm1#L224
I suspect the default conversion for multi-element collections is to have spaces between the elements.
the tools.deps code splits on colons, so could easily end up with keywords with spaces in them
So
$ToolsArgs += "-R$($ResolveAliases -join '')"
etcboth $ there?
Yup, that's the fix. I just updated my .psm1
script to have that and it works as expected now.
All of those $ToolsArgs +=
lines need that...
https://github.com/clojure/brew-install/commit/cc4fba82aee7e8a83269eed666dcfd1180e5069a ?
Looks good!
ok, there's a windows build out there at .486 now
Wiki page updated?
I tried installing Homebrew then brew install clojure
on a couple of Ubuntu Linux VMs with different versions, and they both installed version 1.10.1.478 still. brew update clojure
on my Mac upgraded to 1.10.1.483, so perhaps Homebrew Linux is taking longer to update package info somewhere?
@U0CMVHBL2 FWIW, I installed brew
on Ubuntu (actually WSL on Windows 10), and then brew install clojure
installed 1.10.1.483.
Cool. I will check on an Ubuntu Linux system again soon and report back, to see if it gets the latest version now.
Strangely enough, though, brew install clojure
worked fine on those Linux machines, with no problem finding a working version of ruby executable to do what it needed to install the clojure thingy (replace "thingy" with correct Homebrew term, whatever that is)
Maybe Linux brew is downstream somehow
Another Windows glitch? Can someone else on Windows PowerShell confirm/deny this for me?
PS C:\Users\sean> clojure -Sdescribe
{:version "1.10.1.486"
:config-files ["C:\Users\sean\scoop\modules\ClojureTools\deps.edn" "C:\Users\sean\.clojure\deps.edn" "deps.edn"]
:config-user "C:\Users\sean\.clojure\deps.edn"
:config-project "deps.edn"
when run in a folder that does not have deps.edn
it still reports it in describe and as the :config-project
path. The macOS/Linux version displays it as :config-project
(which still seems wrong) but correctly omits it from the :config-files
path.The behavior in Mac is right - it’s telling you where it’s looking
config-files is not actually used now
The Clojure code will do the right thing if it’s missing
OK, so a small glitch in the PS script but not an important one.
macOS
(! 720)-> clojure -Sdescribe
{:version "1.10.1.483"
:config-files ["/usr/local/Cellar/clojure/1.10.1.483/deps.edn" "/Users/sean/.clojure/deps.edn" ]
:config-user "/Users/sean/.clojure/deps.edn"
:config-project "deps.edn"
Seems ok to me
Given that tooling should no longer be running clojure -Sdescribe
via (clojure-env)
, and such tooling was broken on Windows anyway(!), I agree that nothing really needs to be done. It's just slightly odd to look at.