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

#ref pointing to #ref sometimes works and sometimes it doesn't #112

Open
zetafish opened this issue Apr 5, 2024 · 0 comments
Open

#ref pointing to #ref sometimes works and sometimes it doesn't #112

zetafish opened this issue Apr 5, 2024 · 0 comments

Comments

@zetafish
Copy link

zetafish commented Apr 5, 2024

#ref pointing to other #ref sometimes work and sometimes not

Consider this config.edn

;; config.edn
{:x #or [#ref [:none] "default"] 
 :b #ref [:x]
 :c #ref [:x]
 :d #ref [:x]}

Reading this with aero:

(aero/read-config "config.edn")

I expect that this would return a map like

{:b "default" :c "default" :d "default" :x "defaul"}

but instead I get a map

{:b nil, :d nil, :x default, :c default}

and aero emits warnigns:

WARNING: Unable to resolve "#ref [:x]" at [:b]
WARNING: Unable to resolve "#ref [:x]" at [:d]
WARNING: Unable to resolve "#ref [:none]" at [:x :form 0]

Apparently aero resolves the #ref things in an unspecified order and than you can get lucky or not. Is #ref pointing to #ref something that aero should support?

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

1 participant