Skip to content
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

WARNING: :preloads should only be specified with :none optimizations #163

Closed
sumbach opened this issue Feb 14, 2018 · 0 comments
Closed
Milestone

Comments

@sumbach
Copy link

sumbach commented Feb 14, 2018

In ClojureScript 1.9.854 and above, this warning is produced during lein doo clojurescript compilation for whitespace/simple/advanced optimizations:

WARNING: :preloads should only be specified with :none optimizations
  1. This warning was added to ClojureScript 1.9.293; see CLJS-1821
  2. ClojureScript 1.9.854 began adding a process.env preload by default; see CLJS-2280
  3. The process.env preload is added twice because add-implicit-options is called twice:

I'm not familiar enough with doo or cljs internals to propose a solution, but here are a couple off-the-cuff ideas:

  • Maybe keep a binding to the original compiler value in leiningen.doo/doo and pass this value to the cljs functions, while passing the result of add-implicit-options to doo.core functions as necessary.
  • Or perhaps the add-implicit-options call could be moved to doo.core/assert-compiler-opts, assuming implicit options are not needed by doo.core/install! and doo.core/run-script.

Also, thank you, @bensu, for an amazing tool! lein doo is an incredible enabler for automated cljs testing 😀

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

No branches or pull requests

2 participants