Uglify modifies code in minified builds
Antranig Basman
antranig.basman at colorado.edu
Wed Nov 25 19:24:27 UTC 2015
This remark:
> "Minified builds aren't intended for development. They're designed
> for production, and we shouldn't be either surprised or terribly
> concerned by the idea that somehow magically the code changed in
> layout or structure as a result of minification. That's what it's for!"
i) reacts to a partial reading of my posting - the first paragraph of
which contains (part of) exactly the same point you are making here -
that we should not be surprised that the layout of code has changed due
to minification
ii) cuts against one of our core principles - that we should treat
different parts of our authorial lifecycle - development, maintenance,
production, or any other deployment context - as part of the same
process. We should expect to be able to debug or work with any kind of
deployment of Infusion on equal terms. Infusion is about equality of
authorial access.
If we can't effectively debug something in a production context, we
shouldn't deploy it that way.
The suggestion that we cease to offer builds is interesting - but I'm
not sure that it addresses the core issue. By leaving users on their
own, as well as doing them an unnecessary disservice, we also increase
the risk of incurring support problems that we're not equipped to handle.
Cheers,
A
On 25/11/2015 18:55, Colin Clark wrote:
> Hi Antranig,
>
>> On Nov 25, 2015, at 1:48 PM, Antranig Basman <antranig.basman at colorado.edu> wrote:
>>
>> If we don't have time for this, the 13K savings through disabling the extra optimisations seem neither here nor there - and having code without any whitespace appear in the debugger seems equivalently obstructive to having the optimised version you showed - even if Safari can deal with this, the other browsers can't. I would say that until we're prepared to deploy SOURCE MAPS, we should go with simple concatenation in our builds.
>
> I disagree quite significantly, but I find the discussion very interesting.
>
> Minified builds aren't intended for development. They're designed for production, and we shouldn't be either surprised or terribly concerned by the idea that somehow magically the code changed in layout or structure as a result of minification. That's what it's for!
>
> Shipping Infusion out of the box in a way that doesn't support production deployers is a poor idea, and the toolchain you propose as an alternative is entirely worthwhile but will take some time to get our heads around and use appropriately. We're already behind the times in this regard and there's a lot of catching up and learning to do. In the meantime, let's just stop expecting to be able debug viably within a minified build.
>
> Alternatively, I propose that we simply stop offering builds of Infusion at all, and be explicit about the fact that our users are entirely on their own in this regard. That doesn't sound like an appealing option to me, but hopefully you see my point.
>
> Colin
>
More information about the fluid-work
mailing list