Closed TheSynthMaster closed 7 years ago
The following js code (from yahoo) fails to pass the latest precompile when uglifier is on
https://codepaste.net/t8to5p
It worked in previous version of uglifier... (don't know the exact one when it started to fail, the last one I tried where it works is 2.7.2
Any idea? the error message is:
C:\jrails4_update\applications\assetsolutions>rake assets:precompile --trace Invoke assets:precompile (first_time) Invoke assets:environment (first_time) Execute assets:environment Invoke environment (first_time) Execute environment Execute assets:precompile rake aborted! ExecJS::RuntimeError: undefined: SyntaxError: Unexpected token: name (el) C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:39:in exec' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:21:ineval' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:46:in call' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/uglifier-3.0.4/lib/uglifier.rb:184:inrun_uglifyjs' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/uglifier-3.0.4/lib/uglifier.rb:146:in compile' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:53:incall' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:28:in call' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:incall_processor' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in block in call_processors' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:inreverse_each' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in call_processors' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:inload_from_unloaded' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in block in load' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:infetch_asset_from_dependency_cache' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in load' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:inblock in initialize' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in []' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:inload' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in find_asset' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:infind_all_linked_assets' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:134:in block in find' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:133:ineach' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:133:in find' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:incompile' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:68:in block in define' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:inwith_logger' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:67:in block in define' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:240:inblock in execute' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:235:in each' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:235:inexecute' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:179:in block in invoke_with_call_chain' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/monitor.rb:214:inmon_synchronize' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:172:in invoke_with_call_chain' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:165:ininvoke' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:150:in invoke_task' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:106:inblock in top_level' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:106:in each' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:106:inblock in top_level' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:115:in run_with_threads' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:100:intop_level' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:78:in block in run' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:176:instandard_exception_handling' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:75:in run' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/rake-10.4.2/bin/rake:33:in' C:/jrails4_update/jruby-9.1.6.0/bin/rake:22:in load' C:/jrails4_update/jruby-9.1.6.0/bin/rake:22:in' Tasks: TOP => assets:precompile
exec' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:21:in
call' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/uglifier-3.0.4/lib/uglifier.rb:184:in
compile' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:53:in
call' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in
block in call_processors' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in
call_processors' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in
block in load' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in
load' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in
[]' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in
find_asset' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:in
block in find' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:133:in
find' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:in
block in define' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in
block in define' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:240:in
each' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:235:in
block in invoke_with_call_chain' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/monitor.rb:214:in
invoke_with_call_chain' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:165:in
invoke_task' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:106:in
each' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:106:in
run_with_threads' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:100:in
block in run' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:176:in
run' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/rake-10.4.2/bin/rake:33:in
load' C:/jrails4_update/jruby-9.1.6.0/bin/rake:22:in
The link does not work anymore :( There has been many patches to UglifyJS lately. If it's still broken in Uglifier 3.2.0, I'll look into this.
The following js code (from yahoo) fails to pass the latest precompile when uglifier is on
https://codepaste.net/t8to5p
It worked in previous version of uglifier... (don't know the exact one when it started to fail, the last one I tried where it works is 2.7.2
Any idea? the error message is:
C:\jrails4_update\applications\assetsolutions>rake assets:precompile --trace Invoke assets:precompile (first_time) Invoke assets:environment (first_time) Execute assets:environment Invoke environment (first_time) Execute environment Execute assets:precompile rake aborted! ExecJS::RuntimeError: undefined: SyntaxError: Unexpected token: name (el) C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:39:in'
C:/jrails4_update/jruby-9.1.6.0/bin/rake:22:in '
Tasks: TOP => assets:precompile
exec' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:21:in
eval' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:46:incall' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/uglifier-3.0.4/lib/uglifier.rb:184:in
run_uglifyjs' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/uglifier-3.0.4/lib/uglifier.rb:146:incompile' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:53:in
call' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:28:incall' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in
call_processor' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:inblock in call_processors' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in
reverse_each' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:incall_processors' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in
load_from_unloaded' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:inblock in load' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in
fetch_asset_from_dependency_cache' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:inload' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in
block in initialize' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in[]' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in
load' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:infind_asset' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:in
find_all_linked_assets' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:134:inblock in find' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:133:in
each' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:133:infind' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:in
compile' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:68:inblock in define' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in
with_logger' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:67:inblock in define' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:240:in
block in execute' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:235:ineach' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:235:in
execute' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:179:inblock in invoke_with_call_chain' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/monitor.rb:214:in
mon_synchronize' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:172:ininvoke_with_call_chain' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/task.rb:165:in
invoke' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:150:ininvoke_task' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:106:in
block in top_level' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:106:ineach' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:106:in
block in top_level' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:115:inrun_with_threads' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:100:in
top_level' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:78:inblock in run' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:176:in
standard_exception_handling' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/stdlib/rake/application.rb:75:inrun' C:/jrails4_update/jruby-9.1.6.0/lib/ruby/gems/shared/gems/rake-10.4.2/bin/rake:33:in
load' C:/jrails4_update/jruby-9.1.6.0/bin/rake:22:in