This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-15
Channels
- # announcements (10)
- # asami (5)
- # babashka (49)
- # babashka-sci-dev (8)
- # beginners (25)
- # calva (98)
- # cider (2)
- # clj-kondo (22)
- # clojure (32)
- # clojure-dev (12)
- # clojure-europe (32)
- # clojure-nl (3)
- # clojure-spec (3)
- # clojure-uk (10)
- # clojurescript (12)
- # community-development (1)
- # conjure (71)
- # cursive (7)
- # datalog (6)
- # events (2)
- # figwheel-main (2)
- # fulcro (4)
- # jobs (2)
- # kaocha (3)
- # lsp (43)
- # membrane (12)
- # missionary (9)
- # off-topic (61)
- # pathom (7)
- # polylith (2)
- # reagent (38)
- # remote-jobs (4)
- # shadow-cljs (17)
- # specter (1)
- # tools-deps (38)
- # vim (51)
- # web-security (5)
Given a [foo :as-alias f]
libspec, is tools.reader known to work with it?
I'm getting a Invalid keyword: ::f/bar
even though reader/*alias-map*
is correctly bound (that is, to {f #namespace[foo]}
)
tools.reader has not yet been updated
are you using 1.11.0-rc1 with this?
I'm try to work out what if anything would need to be updated. by default it relies on ns-aliases
and that should be right if you are using 1.11.0-rc1
% clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.11.0-rc1"} org.clojure/tools.reader {:mvn/version "1.3.6"}}}'
Clojure 1.11.0-rc1
user=> (ns ex (:require [foo :as-alias f]))
nil
ex=> (require '[clojure.tools.reader :as r])
nil
ex=> (r/read-string "::f/bar")
:foo/bar
ex=> (binding [r/*alias-map* {'g (create-ns 'goo)}] (r/read-string "::g/bar"))
:goo/bar
seems like it works to me
The codebase that exhibits this bug has a reading pattern more complex than that, will see if I can repro isolatedly
the big thing here is that nothing has changed with reading
so I would focus on what is happening with the require