This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-18
Channels
- # aleph (4)
- # beginners (70)
- # cider (66)
- # clara (16)
- # cljdoc (20)
- # cljs-dev (9)
- # cljsrn (2)
- # clojure (36)
- # clojure-ecuador (2)
- # clojure-italy (14)
- # clojure-japan (2)
- # clojure-nl (22)
- # clojure-uk (79)
- # clojurescript (133)
- # clojutre (2)
- # code-reviews (5)
- # cursive (5)
- # data-science (1)
- # datomic (47)
- # duct (2)
- # emacs (1)
- # figwheel-main (3)
- # fulcro (11)
- # funcool (1)
- # graphql (6)
- # hyperfiddle (4)
- # leiningen (4)
- # luminus (9)
- # lumo (8)
- # mount (4)
- # nrepl (2)
- # off-topic (19)
- # onyx (1)
- # re-frame (23)
- # reagent (91)
- # reitit (17)
- # ring-swagger (2)
- # shadow-cljs (43)
- # tools-deps (27)
- # vim (45)
In seesaw you create a textarea like: (def ta (text “Some Text”)) Then update it with: (config! ta :text “Other Script”) But when the user enters some text value can be extracted with: (text ta) “Other Script”
interop question: how do I force Clojure to call an overloaded method via the variant that expects a primitive int? I’m trying to call select(int index)
from this class https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/SingleSelectionModel.html
(int index)
should coerce to primitive int and then pick the right to call? https://clojure.org/reference/java_interop#_coercions (just guessing)
the problem is that…
> (type (int 10))
java.lang.Integer
it’s not an int!i think that (type (int 10))
is doing some boxing there as the doc and implementation suggests that is cast to int
and not Integer
- https://github.com/clojure/clojure/blob/clojure-1.9.0/src/clj/clojure/core.clj#L874-L879
https://github.com/clojure/clojure/blob/clojure-1.9.0/src/jvm/clojure/lang/RT.java#L1205-L1214
hello, I'm trying to use tools.deps and use some alias do override a dependency with a local version, but seems like the classpath is not using the alias I'm setting, in my project I have an alias :test
that has dependency A from maven, and I have on my user alias one that uses a local version and has it on :override-deps
, but seems like its never using that, I'm running with: clj -A:test:mydep-dev
, am I doing somethign wrong?
can you provide the deps.edn?
sure, this is the project deps:
{:paths
["src"]
:deps
{org.clojure/clojure {:mvn/version "1.9.0"}
org.clojure/clojurescript {:mvn/version "1.10.339"}
org.clojure/core.async {:mvn/version "0.4.474"}
org.clojure/data.json {:mvn/version "0.2.6"}
org.clojure/math.combinatorics {:mvn/version "0.1.4"}
org.clojure/test.check {:mvn/version "0.10.0-alpha3"}
spec-coerce {:mvn/version "1.0.0-alpha6"}
camel-snake-kebab {:mvn/version "0.4.0"}
fulcrologic/fulcro {:mvn/version "2.5.11"}}
:aliases
{:dev
{:extra-paths ["src-docs" "workspaces/src" "test"]
:extra-deps {fulcrologic/fulcro-inspect {:mvn/version "2.2.1"}
binaryage/devtools {:mvn/version "0.9.10"}
nubank/workspaces {:mvn/version "1.0.0-preview1"}}}
:http-drivers
{:extra-deps {clj-http {:mvn/version "3.8.0"}}}
:profile
{:extra-deps {criterium {:mvn/version "0.4.4"}}}
:test
{:extra-paths ["test"]
:extra-deps {com.cognitect/test-runner {:git/url ""
:sha "5fb4fc46ad0bf2e0ce45eba5b9117a2e89166479"}
nubank/workspaces {:mvn/version "1.0.0-preview1"}}
:main-opts ["-m" "cognitect.test-runner"]}}}
and this is my local deps (`~/.clojure/deps.edn`):
{:aliases
{:fulcro-dev
{:extra-deps
{fulcrologic/fulcro {:local/root "/Users/wilkerlucio/Development/third-part/fulcro"}}}
:fulcro-inspect-dev
{:override-deps
{fulcrologic/fulcro-inspect {:local/root "/Users/wilkerlucio/Development/third-part/fulcro-inspect"}}}
:pathom-dev
{:override-deps
{com.wsscode/pathom {:local/root "/Users/wilkerlucio/Development/pathom"}}}
:workspaces-dev
{:override-deps
{nubank/workspaces {:local/root "/Users/wilkerlucio/Development/nubank/workspaces"}}}
:depify
{:extra-deps
{org.clojure/clojure {:mvn/version "1.9.0"}
depify {:git/url ""
:sha "04329744872890711dbba8939a16e9987dd33bb3"}}
:main-opts
["-m" "depify.project"]}
:zprint
{:extra-deps
{org.clojure/clojure {:mvn/version "1.9.0"}
zprint {:mvn/version "0.4.9"}}
:main-opts
["-m" "zprint.main"]}} }
I'm trying to override the nubank/workspaces
dep
(so can I run my tests against the :local/root
version)
I don’t see :mydep-dev in either - did I miss that?
when I talked about I was just using made up names
the actual command is clj -A:test:workspaces-dev
there is a known issue with overriding deps with a different coordinate type (here, maven to local)
that’s most likely the problem
yeah, seems like that, ok, I think that's one of the coolest features of deps, been able to quickly replace a mvn dep with a local one, hope it can get fixed soon, thanks Alex
if you add a doc string it should show up via clojure.repl/doc or your favorite editor tooling which builds on that
never mind, specs work with doc, but spec/def doesn't take a doc string
and you can't attach metadata to a keyword, so how would you end up with a doc string?
One of the higher voted JIRA tickets for Clojure is to add doc string support for specs: https://dev.clojure.org/jira/browse/CLJ-2194 Feel free to vote it up more if you want that.
@andy.fingerhut Thanks for pointing that out. I should've looked there first
Hey @U7ESY38HJ I think I have or at least I have used the underlying migration library migratus (https://github.com/yogthos/migratus) for which create-migration
is wrapper. The create-migration
you are talking about is in env/dev/clj/user.clj
right?