Fork me on GitHub

I expected duct profiles provided to exec-config to be merged in the supplied order; however it appears no explicit order is set… is that correct?!


I think we ran into this and discovered empirically that it’s potentially alphabetical, perhaps as an incidental consequence of iterating over keys in a map (not that we’d rely on that ordering)


It looks like the order is arbitrary as determined by (keys config)


(defn profile-keys
  "Return a collection of keys for a configuration that excludes any profile
  not present in the supplied colleciton of profiles. Profiles may be specified
  as namespaced keywords, or as un-namespaced keywords, in which case only the
  name will matched (e.g. `:dev` will match `:duct.profile/dev`). If the :all
  keyword is supplied instead of a profile collection, all keys are returned."
  [config profiles]
  (cond->> (keys config)
    (not= profiles :all) (filter (partial keep-key? profiles))))


surely that’s not right


I would have expected right-to-left


left to right is what I would expect; in order of the keys in profile