Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using namespace qualified tagged literals #44

Open
RickMoynihan opened this issue Mar 1, 2017 · 5 comments
Open

Consider using namespace qualified tagged literals #44

RickMoynihan opened this issue Mar 1, 2017 · 5 comments

Comments

@RickMoynihan
Copy link

RickMoynihan commented Mar 1, 2017

I appreciate the succinct nature of the namespace free reader tags e.g. #ref but ideally these tags would be namespaced #juxt.aero/ref or perhaps just #aero/ref. clojure.org has this to say:

Reader tags without namespace qualifiers are reserved for Clojure.

And the edn-format spec re-echoes the same sentiment:

Tag symbols without a prefix are reserved by edn for built-ins defined using the tag system.

There may already be a collision here too, as integrant also defines #ref. How would one use both aero and integrant together?

@RickMoynihan
Copy link
Author

See also similar bug on integrant: weavejester/integrant#12

@malcolmsparks
Copy link
Contributor

I agree and would vote for #aero/ref.

We could provide a reader option that will run in 'deprecated mode' that will match on unnamespaced keywords, giving people a compatibility option.

@RickMoynihan
Copy link
Author

👍 to the compatibility option and agree that ^:deprecated flags would make sense on the old functions too.

@puredanger
Copy link

I second this issue!

@dantheobserver
Copy link

I found that this is a temporary solution to using integrant ref with the aero ref

  (binding [*data-readers* {'ig/ref ig/ref}]
    (aero/read-config (clojure.java.io/resource "config.edn")
                      {:profile profile})))

This way, I can use ig/ref in my config and it will resolve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants