Skip to content

fix: overrides config with cli options on compiler#567

Closed
rafaeldelboni wants to merge 3 commits into
squint-cljs:mainfrom
rafaeldelboni:fix/override-config-with-cli-options-on-compiler
Closed

fix: overrides config with cli options on compiler#567
rafaeldelboni wants to merge 3 commits into
squint-cljs:mainfrom
rafaeldelboni:fix/override-config-with-cli-options-on-compiler

Conversation

@rafaeldelboni

@rafaeldelboni rafaeldelboni commented Oct 18, 2024

Copy link
Copy Markdown
Contributor

I missed this one on the last PR (#566)
The compiler internal function not overriding squint.edn configurations with command line options --paths.

Comment thread src/squint/compiler/node.cljs
Comment thread src/squint/compiler.cljc
#?(:cljs (:require-macros [squint.resource :refer [edn-resource]])))

(defn opts+cfg->paths [opts cfg]
(-> (into (:paths cfg []) (:paths opts []))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This merges the paths, rather than overriding paths. Why not just merge the opts with cfg, then take the paths and or that with ["." "src"]?

@borkdude

Copy link
Copy Markdown
Member

@rafaeldelboni Shouldn't this just fix it?

#568

@borkdude

Copy link
Copy Markdown
Member

released 0.8.122

@borkdude borkdude closed this Oct 19, 2024
@rafaeldelboni

Copy link
Copy Markdown
Contributor Author

Thanks! Sure makes sense I didn't understand the problem

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

Successfully merging this pull request may close these issues.

2 participants