Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Runtime option for disabling --use_strict #28

Closed
wildermuthn opened this issue Nov 16, 2016 · 3 comments
Closed

Runtime option for disabling --use_strict #28

wildermuthn opened this issue Nov 16, 2016 · 3 comments

Comments

@wildermuthn
Copy link

Some node modules use octal literals, causing errors when node runs in strict mode. Although these node libraries could be patched, it might be useful to include a runtime flag to disable strict mode. Maybe, maybe not. Adding this per Slack request.

@anmonteiro
Copy link
Owner

anmonteiro commented Nov 16, 2016

fixed 1cde81a

Stopped compiling the Lumo binary with a static, compile time --use-strict option. To note: --use-strict is still the default that Lumo ships with, but it is now overridable at runtime via Node's own API:

Lumo 1.0.0
ClojureScript 1.9.293
 Exit: Control+D or :cljs/quit or exit
cljs.user=> (js* "066")
SyntaxError: Octal literals are not allowed in strict mode.
cljs.user=> (def v8 (js/require "v8"))
#'cljs.user/v8
cljs.user=> (.setFlagsFromString v8 "--no-use_strict")
nil
cljs.user=> (js* "066")
54
cljs.user=>

@iku000888
Copy link

@anmonteiro

I know this is a closed topic, but is there a place where these kind of thing get documented?
Seems like a subtle but important feature that deserves more visibility.

Thanks!

@anmonteiro
Copy link
Owner

See #225

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants