[MIR] slimit

Bug #1415164 reported by Andres Rodriguez
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
slimit (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

1. Availability: all

2. Rationale:
slimit is a build-depends for Angular.JS framework.

3. Security: No CVEs

4. QA:
Ubuntu and Debian contain the same version. Ubuntu has a delta to drop unnecessary dependencies.
1 bug in Debian. 0 Bugs in Ubuntu.

5. UI standards: none

6. Dependencies:
All deps in Main.

7. Standards:
Lintian warnings:

W: slimit source: ancient-standards-version 3.9.3 (current is 3.9.5)
W: slimit: binary-without-manpage usr/bin/slimit

Package is packaged with debhelper. Source format is 3.0

8. Maintenance: easy

9. Background information:
slimit is a build-dep for Angular.JS

description: updated
Revision history for this message
Michael Terry (mterry) wrote :

We already have yui-compressor in main. Is there a reason that wouldn't work instead of slimit?

Changed in slimit (Ubuntu):
status: New → Incomplete
Revision history for this message
Andres Rodriguez (andreserl) wrote :

We have tried, yui-compressor does not work with angular.js, hence, we needed to add this new dependency.

Changed in slimit (Ubuntu):
status: Incomplete → New
Revision history for this message
Michael Terry (mterry) wrote :

It doesn't work? They both provide command lines that accept input files and spit out the minified javascript. How different can they be? Does angular.js rely on specific minimization techniques of slimit?

If you do require slimit, is there a chance you could port the following reverse-depends of yui-compressor to slimit?

* doxygen
* jquery-goodies
* raphael
* underscore

Revision history for this message
Michael Terry (mterry) wrote :

Oh, unless angular.js uses the actual python library provided by slimit?

Revision history for this message
Andres Rodriguez (andreserl) wrote : Re: [Bug 1415164] Re: [MIR] slimit

Hi Michael,

When using yui-compressor, the package FTBFS with the following:

http://pastebin.ubuntu.com/10041083/

We can definitely look at converting all the other packages to use slimit
instead.

Cheers.

On Tue, Feb 3, 2015 at 9:44 PM, Michael Terry <email address hidden>
wrote:

> Oh, unless angular.js uses the actual python library provided by slimit?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1415164
>
> Title:
> [MIR] slimit
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/slimit/+bug/1415164/+subscriptions
>

--
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer

Revision history for this message
Michael Terry (mterry) wrote :

That looks like https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682069

Apparently updating to 2.4.8 will fix it. But ultimately, that stacktrace apparently results from invalid javascript.

So here are some options:
1) Fix invalid javascript that is causing this problem (seems like a good idea anyway, but may be difficult)
2) Update yui-compressor to 2.4.8 and see if that fixes it
3) Port other packages to slimit
4) Allow both slimit and yui-compressor in main (would prefer not to do this, and it seems easily avoidable with above steps)

Revision history for this message
Blake Rouse (blake-rouse) wrote :
Download full text (3.9 KiB)

Using the latest release of yuicompressor fails.

blake@blake-ubnt-laptop:/tmp$ java -jar yuicompressor-2.4.8.jar angular.js -o angular.min.js
[ERROR] in angular.js
  237:11:identifier is a reserved word
[ERROR] in angular.js
  237:21:illegal character
[ERROR] in angular.js
  237:23:syntax error
[ERROR] in angular.js
  239:13:identifier is a reserved word
[ERROR] in angular.js
  239:24:illegal character
[ERROR] in angular.js
  239:26:syntax error
[ERROR] in angular.js
  239:34:illegal character
[ERROR] in angular.js
  239:34:syntax error
[ERROR] in angular.js
  419:13:missing ( before function parameters.
[ERROR] in angular.js
  419:13:missing } after function body
[ERROR] in angular.js
  421:1:syntax error
[ERROR] in angular.js
  424:33:missing ; before statement
[ERROR] in angular.js
  426:1:syntax error
[ERROR] in angular.js
  443:17:missing ; before statement
[ERROR] in angular.js
  444:6:syntax error
[ERROR] in angular.js
  8547:14:invalid property id
[ERROR] in angular.js
  8547:15:syntax error
[ERROR] in angular.js
  8548:18:syntax error
[ERROR] in angular.js
  8549:18:syntax error
[ERROR] in angular.js
  8550:20:syntax error
[ERROR] in angular.js
  8551:19:syntax error
[ERROR] in angular.js
  8552:20:syntax error
[ERROR] in angular.js
  8553:19:syntax error
[ERROR] in angular.js
  8554:8:syntax error
[ERROR] in angular.js
  8556:17:syntax error
[ERROR] in angular.js
  8557:24:missing ; before statement
[ERROR] in angular.js
  8562:5:syntax error
[ERROR] in angular.js
  8563:3:syntax error
[ERROR] in angular.js
  8564:1:syntax error
[ERROR] in angular.js
  8593:27:identifier is a reserved word
[ERROR] in angular.js
  13487:14:identifier is a reserved word
[ERROR] in angular.js
  13487:27:illegal character
[ERROR] in angular.js
  13487:29:syntax error
[ERROR] in angular.js
  13488:16:syntax error
[ERROR] in angular.js
  13489:19:syntax error
[ERROR] in angular.js
  13490:23:syntax error
[ERROR] in angular.js
  13491:21:syntax error
[ERROR] in angular.js
  13492:22:syntax error
[ERROR] in angular.js
  13493:20:syntax error
[ERROR] in angular.js
  13494:22:syntax error
[ERROR] in angular.js
  13495:21:syntax error
[ERROR] in angular.js
  14495:21:identifier is a reserved word
[ERROR] in angular.js
  14496:20:identifier is a reserved word
[ERROR] in angular.js
  14498:32:identifier is a reserved word
[ERROR] in angular.js
  14499:18:identifier is a reserved word
[ERROR] in angular.js
  14500:18:identifier is a reserved word
[ERROR] in angular.js
  14501:18:identifier is a reserved word
[ERROR] in angular.js
  14519:19:identifier is a reserved word
[ERROR] in angular.js
  14684:16:identifier is a reserved word
[ERROR] in angular.js
  16196:24:identifier is a reserved word
[ERROR] in angular.js
  16207:24:identifier is a reserved word
[ERROR] in angular.js
  20762:1:syntax error
[ERROR] in angular.js
  1:0:Compilation produced 52 syntax errors.
org.mozilla.javascript.EvaluatorException: Compilation produced 52 syntax errors.
 at com.yahoo.platform.yui.compressor.YUICompressor$1.runtimeError(YUICompressor.java:172)
 at org.mozilla.javascript.Parser.parse(Parser.java:396)
 at org.mozilla.javascript.Parser.parse(Parser.java:340)
 at com.yahoo.p...

Read more...

Revision history for this message
Michael Terry (mterry) wrote :

:( OK. I'm curious how hard it would be to port the other packages to slimit.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

We can look into that for sure, but that being said, this would unblock us as the new release in Vivid is coming soon.

Revision history for this message
Michael Terry (mterry) wrote :

Those parse errors are https://github.com/yui/yuicompressor/issues/47, fixed by updating to a newer embedded version of rhino. Which yuicompressor doesn't support yet. Plus, embedded copies of rhino don't excite me anyway.

So I'm warming to slimit, even though I'm nervous that it hasn't had a release in two years. Looking at the package, it has some tests that aren't being run.

Could you enable those? A simple 'nosetests' gives errors about "test_func" being treated as a test when it shouldn't be. Probably a clever argument you can give to nosetests to avoid that.

Revision history for this message
Matthias Klose (doko) wrote :
Revision history for this message
Adam Conrad (adconrad) wrote :

Based on mterry's comments, and lamont's latest upload enabling the testsuite, I've promoted slimit to main now.

Changed in slimit (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.