Skip to content

make #ref from parent work inside #include file #92

@nha

Description

@nha

At the moment #include works by reading the config on the file:

(read-config

This breaks #ref that are in another file "higher" up in the include hierarchy, ex:

(aero.core/read-config (clojure.java.io/resource "config_test.edn"))
;; =>
{:a "AAA"
 :b "AAA"
 :c {:d nil} ;; nil here - should be "AAA"
 }
;; config_test.edn
{:a "AAA"
 :b #ref [:a] ;; OK
 :c #include "config_include.edn"
 }
;;config_include.edn 
{:d #ref [:a]} ;; this is not resolved

Without knowing too much about aero's internals, it seems a possible solution would be to include .edn files without resolving the tags at the 'include level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions