-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UglifyJS broken on node master #329
Comments
Aha, appears to be a V8 bug:
Function declarations should create globals, but apparently are not doing that. |
Wow, that's a pretty serious v8 bug. The test suite must include something as simple as that, no? |
Nope, this is not a V8 bug. It's a Node bug. The issue is that function declarations are not "set" operations, they're "configure" operations, and we're not catching those and handling them. |
Still, though, seriously... Uglify should be using regular modules and explicit exports, rather than this homegrown vm stuff. What percentage of users of uglify are not running it on the command line with Node? |
I'm not a big fan of CommonJS… Essentially, I'd like to have a way to split a module across multiple files, so that I can access stuff which is internal to my library unprefixed and without explicit exports/imports. Because there was no way to do that, I invented one that works for me. Since I did not use undocumented APIs, I'd expect things to continue to work in new versions of Node (and if such API is to be deprecated, I'd expect a warning and sufficient time to fix my stuff before the API is dropped completely). On the other hand, I'm glad it helped exposing such serious bug early. ;-) |
so where is the fix for this? |
@iolloyd in NodeJS, hopefully. |
Yes, it's been fixed in node master. |
Here's what I'm seeing:
It works fine on Node v0.10. I'd happily accept that this is a bug in Node (even if it's just "something internal/undocumented changed in a subtle way"), but I'm a bit confused by the UglifyJS source code, and can't seem to find where
UglifyJS.DefaultsError
is even being assigned.The text was updated successfully, but these errors were encountered: