-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use deep merge for :compiler-options
#135
Comments
I'm somewhat conflicted about using deep-merge here, it can potentially make it harder to undefine some options for production, which are set as default for development. We can probably prevent this with some log messages. I wonder if we should manually define the merge strategy per option?
Leiningen allows using |
Leiningen-like hints like |
A small problem is that the metadata can't be provided when using command line options. But I guess that doesn't matter, if user needs to use metadata, one can add the options to build.boot. |
Agreed. |
The change to option precedence already broke backwards compatibility so I don't think it would be too bad to use merge as default for maps. I think replace would be better default for sequence like types, but I guess it would be good to check leiningen. |
@micha and I had a conversation about this last month. See https://clojurians-log.clojureverse.org/boot/2016-08-04.html. The conclusion we drew was:
|
@kennyjwilli So I will provide a counter-example for your conclusion, based on my current need. It is something like you've described in discussion, but connected to I'd like to do something like |
From what I understand (correct me if I'm wrong), merging maps in boot-cljs is not as simple as it sounds because it wraps each property passed to the compiler. I believe it could be done but it would take a significant amount of work. Anyway, your use case is almost identical to the one I have and I still believe the update-file option would work for you. I should have also mentioned how we wanted to make this easier for boot users going forward by adding this ability to the built in task The task I wrote as a starting place is located here. |
Merging maps shouldn't be tricky: I think it's just a matter of replacing Thank you for the |
@kennyjwilli It seems to be working, however I needed to add |
Thanks. This will be added to to the |
Using deep merge for
:compiler-options
would allow to merge:closure-defines
from task definition and.cljs.edn
files instead of replacing one by another.It'd be especially usefull for
:parallel-build
.The text was updated successfully, but these errors were encountered: