| Summary: | Build minification is broken | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> |
| Component: | Releng | Assignee: | Mark Macdonald <mamacdon> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ken_walker |
| Version: | 1.0 | ||
| Target Milestone: | 1.0 M2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Mark Macdonald
Correction, there were no trailing commas. It was Rhino-unfriendly words in our code. These fall into 2 categories: ES3 reserved words > abstract boolean byte char class double extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile ES5 reserved words > class enum export extends import super implements interface let package private protected public static yield Rhino (at least the version our build uses) won't allow any of these words. For safety's sake, I've modified JSLint to produce errors on any Rhino-unfriendly word. Prior to this, its treatment was inconsistent -- for example it wouldn't warn about 'class' when running in ES5 mode, and almost all the ES3 words would slip by unnoticed (like 'char', which has broken us many times). Now you will see errors on all of these while you code. Fix minification: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=4ab7902c0268d3ffd6229c515612e30627099386 Flag Rhino-unfriendly words as errors: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=271b3e69b75b8a246dee14e3d5180e4167c1f1e2 FWIW, I've posted a mass-linting script to GitHub [1]. If something bad sneaks into the build, run the lint script on the whole Orion client repo like this: > node megalint.js C:\code\orion\org.eclipse.orion.client > Lint c:/code/orion/org.eclipse.orion.client/bundles/org.eclipse.orion.client.core/web/orion/widgets/plugin/PluginEntry.js... > PluginEntry.js:94:41:Expected an identifier and instead saw 'class' (a reserved word). Grep the output for (reserved word|Extra comma) and you should see all the Rhino-busting errors. [1] https://github.com/mamacdon/megalint Awesome, thanks Mark |