Skip to content

Could load-namespaces be split off into a separate lib? #59

Description

@WhittlesJr

I've found the strategy employed by your load-namespaces function to be generically useful for similar architectures that rely on multimethods and namespaced keywords.

I'm currently pulling integrant into a project that doesn't do any state management, just to get the functions called by load-namespaces. I had to make a more generic copypasta version for my own use:

(defn load-namespaces [kws]
  (doall (->> kws
              (filter keyword?)
              (mapcat #(conj (ancestors %) %))
              (mapcat #'ig/key->namespaces)
              (distinct)
              (keep #'ig/try-require))))

This works perfectly for me. What do you think about spinning this stuff off into a separate lib (or maybe adding it to medley?)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions