-
Notifications
You must be signed in to change notification settings - Fork 36
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
Provide a closure-medium
obfuscation setting
#1504
Comments
I've done some work on this (see the new-closure-obfuscation-setting branch), but I've discovered that it's dependent on an upstream change to Google Closure as a pre-requisite, so won't be able to progress it further until/if I manage to get my pull-request accepted. |
Marking this as a |
@dchambers if this is needed ASAP we could build our own version of the closure compiler and host it at https://github.com/BladeRunnerJS/brjs-build-dependencies. Make sure to add a |
Okay, that's a really good back-up plan. I think we're nearing a conclusion on how this can be done in a way that would be acceptable to merge upstream, so will wait till I hear more before I do anything. |
So we don't loose track of the whole story google/closure-compiler#1087 is the (unmerged) PR for the Google closure project. |
This is now available in: |
#1524 is the PR for the BRJS changes required for this. |
Problem: There is widespread use of the following methods in presenter:
which aren't currently Closure Compatible since the Solution: We could solve this by changing the names of call-back methods (e.g. Or, alternatively, we could support an alternate call signature for these methods, so that in addition to this.amount.addChangeListener(this, '_amountChanged'); to be changed to this: this.amount.addChangeListener(this._amountChanged.bind(this)); where the second proposal has the advantage that far more of our code will end up being obfuscated. |
Another block I've discovered is the
If we don't want to permanently fork Closure Compiler, than it makes sense to use a deprecation-flag to allow the functionality within |
We need a custom minification level (say
closure-medium
) betweenclosure-simple
andclosure-advanced
, that causes private members (i.e. members starting with_
orm_
) to be obfuscated. Over time, we might enable more settings if we can determine that it's safe to do so.The text was updated successfully, but these errors were encountered: