Welcome! Please see the About page for a little more info on how this works.

+1 vote
ago in tools.build by

It is not possible to tell tools.build to copy files without substitution for a custom set of file extensions because the copy function does not actually use its parameter (non-replaced-exts) - it always uses default-non-replaced-exts:

(defn copy
  [{:keys [target-dir src-dirs include replace ignores non-replaced-exts]
    :or {include "**", ignores default-ignores, non-replaced-exts default-non-replaced-exts}
    :as _params}]
  (let [to-path (.toPath (file/ensure-dir (api/resolve-path target-dir)))
        ignore-regexes (map re-pattern ignores)
        non-replaced (map #(str "." %) default-non-replaced-exts)]
  ...)

The binding non-replaced-exts exists and defaults to default-non-replaced-exts but the function body never uses non-replaced-exts: it has default-non-replaced-exts hardcoded.

A new feature in the next version of deps-new depends on this working correctly.

Please log in or register to answer this question.

...