google / google/closure-compiler
Not removing or renaming unused portions of Closure Library
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
[This](https://closure-compiler.appspot.com/home#code%3D%252F%252F%2520%253D%253DClosureCompiler%253D%253D%250A%252F%252F%2520%2540compilation_level%2520ADVANCED_OPTIMIZATIONS%250A%252F%252F%2520%2540output_file_name%2520default.js%250A%252F%252F%2520%2540use_closure_library%2520true%250A%252F%252F%2520%2540formatting%2520pretty_print%250A%252F%252F%2520%2540language_out%2520ECMASCRIPT3%250A%252F%252F%2520%253D%253D%252FClosureCompiler%253D%253D%250A%250Agoog.require('goog.math.Coordinate')%253B%250Agoog.require('goog.math.Vec2')%253B%250A%250Avar%2520a%2520%253D%2520new%2520goog.math.Coordinate(4%252C%25207)%253B%250Avar%2520b%2520%253D%2520new%2520goog.math.Vec2(0%252C%2520-1)%253B%250Avar%2520c%2520%253D%2520goog.math.Coordinate.sum(a%252C%2520b)%253B%250Aalert(c)%253B%250A%250A) is a simple example.
```
goog.require('goog.math.Coordinate');
goog.require('goog.math.Vec2');
var a = new goog.math.Coordinate(4, 7);
var b = new goog.math.Vec2(0, -1);
var c = goog.math.Coordinate.sum(a, b);
alert(c);
```
Everything works fine with advanced optimization, except that unused functions, like `translate` and `scale` are not removed or even renamed.
Contributor guide
Assessment
This issue has not been assessed yet.