<< Back to previous view

[CLJS-506] Flag to disable minification in advanced mode Created: 19/May/13  Updated: 02/Dec/14  Resolved: 02/Dec/14

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: Herwig Hochleitner Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Attachments: Text File 0001-CLJS-506-Add-a-debug-flag-to-the-compiler-options.patch    


Some code has different semantics when compiled in advanced mode.
Clojurescript tries to minimize those cases, but examples are usage of aget or forgotten externs files.
There exits closure compiler options to generate names based on original expressions, even with advanced optimizations.
However, there exists no clojurescript compiler option for that.

Add a :debug compiler option to clojurescript, which can be set to true to turn the following closure compiler options on:

  • generatePseudoNames true
  • anonymousFunctionNaming AnonymousFunctionNamingPolicy/UNMAPPED

Attached patch implements this, as a result the compiled test suite is indeed quite readable.

Comment by Herwig Hochleitner [ 19/May/13 10:11 AM ]

Patch 0001 depends on patches 0001 and 0002 from CLJS-480 because of changes to the test script.

Comment by David Nolen [ 29/Jul/13 10:32 PM ]

Dependencies between tickets is highly undesirable as there's no guarantee when a particular patch will get reviewed and applied.

Comment by David Nolen [ 02/Dec/14 6:17 AM ]

I'd rather see a patch that supplies :anon-fn-naming-policy as a compiler option. Thanks.

Comment by David Nolen [ 02/Dec/14 8:18 AM ]

fixed https://github.com/clojure/clojurescript/commit/318068f176daeb80e8d7dc7680c7cab05fc48069

Generated at Sun Jan 21 04:49:50 CST 2018 using JIRA 4.4#649-r158309.