This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-03-26
Channels
- # announcements (6)
- # beginners (51)
- # cider (3)
- # cljsrn (9)
- # clojure (4)
- # clojure-argentina (1)
- # clojure-houston (2)
- # clojure-italy (5)
- # clojure-nl (1)
- # clojure-spec (14)
- # clojurescript (17)
- # community-development (2)
- # cursive (53)
- # datomic (69)
- # fulcro (5)
- # graphql (15)
- # immutant (6)
- # jobs (2)
- # kaocha (1)
- # leiningen (15)
- # lumo (5)
- # midje (1)
- # nrepl (6)
- # off-topic (119)
- # pathom (11)
- # tools-deps (5)
ahh might be an old spec version…
Yeah I had an old spec; can confirm the issue is gone when using latest spec1 😌
when defining a fdef
spec for a function that is in different namespace, I can use fully qualified name. How can I alias fully-qualified part?
e.g:
- fn implementation of foo
is in core.common
- spec is in core.specs
- I can do (s/fdef core.common/foo bla-bla-bla)
I cannot require core.common in core.specs, to avoid circular reference since specs are used in core.common. But because I’m using qualified name of foo
- instrumentation still works.
But how can I use alias for core.common
, so I don’t have to repeatedly write it fully? clojure.core/alias
doesn’t work, because core.common
cannot be imported in this namespace
currently, you can't do this (other than by creating it as a namespace, which will then allow you to alias it).
it’s beginning to feel like we need something like alias
but that doesn’t require the namespace to be loaded
yeah… please have it… or I’m gonna… about to.. leave Clojure and do…. I dunno something else… woodworking or papier mache figurines to sell them on farmer’s market
yeah, this is something we've talked about for a while and there is a ticket placeholder for it
we would like to have a lighter-weight aliasing mechanism (lighter than "creating namespaces") and I expect that could be used in both clj and cljs
hoping to do some work on this in 1.11