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
I'm indeed using rc1 and the result from ns-aliases
% 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/barex=> (binding [r/*alias-map* {'g (create-ns 'goo)}] (r/read-string "::g/bar"))
:goo/barseems 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
Thanks! Yes it ended up being something internal. I should have known better since in another project (Eastwood) 1.11 as-alias is working perfectly with no tools.reader issues.