Ticket #2528054 (closed task)
Reporter Robert Tsai |
Opened: 07/24/10 Last modified: 08/13/10 Status: closed Type: task Resolution: wontfix |
Owner Reid Burke |
Target Release: Priority: P3 (normal) |
|---|---|---|---|
| Summary: | [Pull Request] - Add a new --globals option to pre-declare global variables; e.g., "YUI" | ||
| Description: | The idea is for YUI Build Tool to invoke the compressor with "--globals YUI" to avoid all the extraneous "[WARNING] Found an undeclared symbol: YUI" messages. --robtsai@yahoo-inc.com |
||
| Type: | task | Observed in Version: | development master |
| Component: | YUICompressor | Severity: | S3 (normal) |
| Assigned To: | Reid Burke | Target Release: | |
| Location: | Priority: | P3 (normal) | |
| Tags: | pull request, github | Relates To: | |
| Browsers: | All | ||
| URL: | http://github.com/rtsai/yuicompressor/commit/a04c8d4239b69db2c3e1172f52f006e8c8f2cadf | ||
| Test Information: | |||
Change History
|
Posted: 07/24/10
|
|
Posted: 07/24/10
|
|
Posted: 07/24/10
Ticket moved from: http://yuilibrary.com/projects/yuicompressor/ticket/2528051 |
|
Posted: 08/10/10
|
|
Posted: 08/10/10
Ticket moved from: http://yuilibrary.com/projects/builder/ticket/21 |
|
Posted: 08/10/10
Signed off. |
|
Posted: 08/10/10
|
|
Posted: 08/10/10
Signed off. |
|
Posted: 08/10/10
I've already removed the warning, so this patch should not be necessary. From the latest github source: if (symbol.length() <= 3 && !builtin.contains(symbol)) { // I removed the warning since was only being done when |
|
Posted: 08/10/10
|
|
Posted: 08/10/10
|
|
Posted: 08/10/10
Adam: Okay. Shouldn't the appropriate fix be to always warn, regardless of symbol length, unless specified in --globals? |
|
Posted: 08/10/10
I don't think the globals option is necessary at all (this warning was removed some time ago -- before this patch). I think the warning was a red herring, possibly because at one time the compressor didn't handle the potential collision with short symbols (the compressor generates symbols for obfuscation up to 3 chars in length). It does handle this now, so there isn't really anything to warn about. |
|
Posted: 08/10/10
My suggestion is to revert the patch; the warning has already been removed. |
|
Posted: 08/10/10
Adam: Thanks for your explanation. I was testing this change with an older YUI Compressor we're using for our build system which doesn't have your patch. I'll revert it. |
|
Posted: 08/10/10
Reverted on yuisource. |
|
Posted: 08/13/10
Is there another yuicompressor branch somewhere that I should be using? Using http://github.com/yui/yuicompressor , I see the following in my build output: YuiSharedTargets.minify: |
|
Posted: 08/13/10
Sorry about that, I hadn't checked in one of the changes that gets rid of that. It is there now. |
Pull Request from rtsai2000
Commit: http://github.com/rtsai/yuicompressor/commit/a04c8d4239b69db2c3e1172f52f006e8c8f2cadf
Files modified: