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

0 votes
in ClojureScript by

There are a number of browser-env options that work only partially or not at all:

  • {{:optimizations}} - Only {{:whitespace}} and {{:simple}} appear to work for me
  • {{:host}} - Is never read. Instead, we always bind to {{0.0.0.0}}.
  • {{:serve-static}} - Is never read.
  • {{:preloaded-libs}} - Is never read.

These should either be properly documented, removed, or made to work.

9 Answers

0 votes
by

Comment made by: potetm

I think we should:

  • Properly document {{:optimizations}} and throw exception on an unsupported option
  • Make {{:host}} function properly
  • Remove {{:serve-static}} as an option
  • Remove {{:preloaded-libs}} as an option
0 votes
by

Comment made by: potetm

Note that, as it stands, this also addresses (link: https://dev.clojure.org/jira/browse/CLJS-1502 text: CLJS-1502).

0 votes
by

Comment made by: potetm

This does what I said in my initial comment.

Note that this commit is rather small if you exclude whitespace.

0 votes
by

Comment made by: potetm

After thinking about it some more, I'm not sure what the gain is for being able to specify {{:optimizations}} in the browser-env, and the cost is confusion on the part of the users. I do not think it's apparent that this is a compiler option for the child iframe JS and evaluated repl forms. This may be a case where we can just "do the right thing" and remove some burden from the user.

I'm thinking we either remove {{:optimizations}} entirely or we only use it for evaluated repl forms and use {{:simple}} for the initial payload. Considering the user can already override this in the arguments to {{cljs.repl/repl}}, I lean toward removing it altogether.

0 votes
by

Comment made by: dnolen

Related CLJS-1502

0 votes
by

Comment made by: dnolen

Let's remove the optimizations bit, it's only for the client JS.

0 votes
by

Comment made by: dnolen

I ended up doing the optimizations removal as well as making host work as part of exposing that functionality to cljs.main.

0 votes
by

Comment made by: mfikes

Patch no longer applies. Perhaps obsolete now given David's last comment?

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2168 (reported by potetm)
...