#foswiki 2013-10-22,Tue

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
gac410MichaelDaum_: I'll check the logs tomorrow. But if you get a chance... Your changset 16726 changed from yuicompressor to uglify ?? I just ran a test build of 1.1.9, and the build scripts appear to still use yuicompressor
Is there something else I need to do. Could you look over Development/BuildingARelease and change it if I need to do something differently?
[01:58]
.............. (idle for 1h5mn)
***ChanServ sets mode: +o SvenDowideit [03:04]
.......... (idle for 45mn)
gac410 has left [03:49]
............................ (idle for 2h17mn)
MichaelDaumgac410, will have a look.
the reason to use ugify instead of yuicompressor is that the latest jQuery versions can't be compiled with yuicompressor anymore
^ugify^uglifyjs
btw yuicompressor uses java, whereas uglifyjs uses nodejs
both isn't optimal
as far as I know BuildContrib should not be affected.
uglifyjs is only used in the Makefile system of JQueryPlugin ... which BuildContrib doesn't use
technically, uglifyjs does a much better job than yuicompress in terms of compression, runtime performance and execution performance....that's at least what I took from those comparisons on the net
[06:06]
........... (idle for 52mn)
***ChanServ sets mode: +o CDot [07:02]
..... (idle for 21mn)
jastmy main issue with yuicompressor is that, for some reason, it breaks extended characters for me (e.g. in jquery's wikiword plugin) -- turns them into '?" [07:23]
MichaelDaumjast, you've forgotten --charset utf-8 while calling it
see http://trac.foswiki.org/browser/trunk/JQueryPlugin/pub/System/JQueryPlugin/Makefile.include
so the issue is more: it does not _default_ to utf8
[07:28]
jastyeah [07:30]
MichaelDaumwhich is agreably stupid [07:30]
jastjust noticed that our build script for JQueryPlugin doesn't use the Makefile at all
... neither does the one in trunk
but thanks for the hint, that makes it much easier to fix this than I thought it would be :)
[07:30]
MichaelDaumnote: yuicompressor is pretty outdated and unmaintained
it can't compile the later jqueries anymore
better use uglifyjs ... which is utf8-safe ootb
[07:36]
jastyeah, definitely planning on doing that, but a quick fix to bridge the gap until then is good, too [07:40]
BuildContrib uses yuicompressor if present... we might want to tell it to use this option [07:45]
CDotI originally used the compression libs from CPAN, which had other issues, so someone (!) told me to change to yuicompressor.
what are people using these days instead?
[07:46]
jastuglifyjs, apparently
(which requires nodejs instead of java)
[07:49]
pharveyI think the grunt thingy we use, uses uglify
grunt is a nodejs thing :/
[07:49]
jastmy thinking is... at least it's not java ;) [07:50]
MichaelDaumsee http://foswiki.org/Tasks/Item12474 [07:51]
jastthis is tagged as 1.1.9. is it actually supposed to go there?
(I wouldn't mind, I think... it's for developers only, anyway. developers just have to put up with stuff, right? :))
[07:56]
CDotright. [08:00]
........ (idle for 35mn)
TerjeAndersen.kaffe += 2
woops, wrong channel :-)
[08:35]
jastgood news! uglifyjs doesn't work in current node.js because of a bug in the JS engine
jast tries official stable version
right, works in nodejs stable
[08:44]
............. (idle for 1h3mn)
***ChanServ sets mode: +o Lynnwood [09:49]
....................................... (idle for 3h12mn)
ChanServ sets mode: +o gac410 [13:01]
gac410MichaelDaum: I'm still not sure if I understand the impact of yuicompressor -> uglify. I'll have to re-run the build to capture the logs to know for sure, but I saw large numbers of java -class yuicontrib messages from building 1.1.9 [13:09]
MichaelDaumgac410, hi
yes that's right. CDot has added yuicompressor to BuildContrib.
[13:09]
gac410okay, so BuildContrib will use yui, not uglify ... even when it builds jquery? [13:10]
MichaelDaumsadly, yuicompressor is deprecated and unmaintained as far as I get from http://www.yuiblog.com/blog/2012/10/16/state-of-yui-compressor/
here's the relevant task item for us: http://foswiki.org/Tasks/Item12474
in addition yuicompressor fails to compile jquery-2.x onwards
[13:11]
gac410Right, but it's marked for 1.1.9, with trunk checkins.
Although did your "sync JQuery" pick that up into 1.1.9?
[13:12]
MichaelDaumyes. trunk & branch JQueryPlugins are identical
for now the only place where uglifyjs is used is in Makefile.include used during development
there are two ways to resolve our situation
(1) add uglifyjs to BuildContrib
(2) check in minified js
[13:12]
gac410Also need it in pseudo-install? [13:14]
MichaelDaumno [13:14]
gac410I don't think it's good to use one compressor during development and another for the production build. [13:14]
MichaelDaumpseudo-install just creates links [13:14]
gac410CDot also escalated http://foswiki.org/Tasks/Item12084 as a blocker :( But I was never able to find a fix, So someone needs to fix it or I drop it as a 1.1.9 blocker :(
BTW ... are you happier with trunk configure now?
[13:16]
MichaelDaumdefinitely yes!
any signs of Timothe?
[13:17]
gac410great. Please be sure to open new tasks if you see more issues. I've closed out most of timothes old tasks, they were getting much too big. [13:18]
MichaelDaumya [13:18]
gac410No. Though I have not sent him any email yet. [13:18]
MichaelDaumhow about I try to ping him [13:19]
gac410Sure, fine with me. My ping (months ago) was not Foswiki related... Just being friendly, with no response. [13:20]
MichaelDaumMichaelDaum looking for his email addr ... [13:20]
........... (idle for 53mn)
gac410So anyway, back to BuildContrib ... is it's use of yuicompressor a problem? Do we need to change to uglify prior to building 1.1.9? [14:13]
jastI wouldn't call it a problem, but yuicompressor is apparently dead... and (optional, just like before) support for uglifyjs would probably be nice :) [14:18]
gac410Well, it's not really optional for building the release, BuildContrib compresses everything with yui AFAIK anyway. So if it will cause issues, we need to replace it. [14:19]
jastit only uses yui if it's there (which it is, because BuildContrib ships it)
one could make it use uglifyjs instead if it happens to be installed on the system
actually that's a lie. BuildContrib doesn't ship yuicompressor.jar... JQueryPlugin does
so, BuildContrib behaves differently before vs. after JQueryPlugin is installed ;)
iff java is installed on the machine, of course
[14:20]
gac410All the plugins have to be installed before running the build, so it's consistent then.
Looks like we ship JQuery 2.0 by default now, even though it's not selected by default. So yuicompressor will choke on it during the build. I'll have to re-run the build and capture the logs to check.
[14:22]
MichaelDaumdefault is still the same
which is 1.8.3
[14:25]
gac410right, but we ship the module, which yui will attempt to compress [14:25]
MichaelDaum... and fail [14:25]
gac410exactly, so the build will have a problem, [14:26]
MichaelDaumyea :( [14:26]
gac410hence my dilemma [14:26]
MichaelDaumthat's why I noted the two possible ways out an hour before [14:28]
gac410hm. Well checking in minified js into svn is probably not a good idea. It introduces complexity, and devs are sure to get it wrong.
Although jquery.org does distribute the .min files, so maybe that's not so bad.
[14:29]
MichaelDaumwe need the sources to be able to hotfix issues.
as well as for debugging
minified code is like checking in binaries
[14:31]
gac410ya. I understand. We'd need both, and would need to distribute both [14:32]
MichaelDaumI wonder how hard it was to add uglifyjs to BuildContrib. [14:32]
gac410It would also mean that if we hotfix, then we have to compress rather than depend on the jquery .min files. [14:33]
MichaelDaumit should be of exactly the same "complexity" as the current yuicompressor support [14:33]
gac410It's probably not too bad, there is compress method IIRC,
./lib/Foswiki/Contrib/BuildContrib/Targets/compress.pm
[14:33]
jastthe compress method uses JavaScript::Minifier or yui [14:34]
gac410We'd need to add uglify - probably if installed, use it. And add a dependency on Node.js. I've never used that. [14:35]
jastnode.js requires compiling c++ code
so we really don't want to ship it :}
[14:35]
gac410No, certainly not with the release. But BuildContrib could use it if it's already installed [14:36]
jastsure
if someone has installed uglify via nodejs's npm, there's a "uglifyjs" in the PATH
[14:36]
gac410So BuildContrib needs Optional dep on Node.js, and we already have the uglify code as part of JQuery [14:36]
jastif we want to ship uglifyjs, that's fairly straightforward... including dependencies it's ~1.2 MB
so, only about 50% more than yuicompressor
[14:37]
gac410Looks like my distribution has net-libs/nodejs-0.10.17 available, [14:38]
jastthat's comparably recent
OTOH if someone has nodejs installed they can easily install uglifyjs themselves via npm, node's package manager
[14:38]
MichaelDaumon debianish distros this is: apt-get install node-uglify [14:39]
jastyeah, only debian doesn't have it in stable yet :) [14:39]
MichaelDaumubuntu 12.0.4-lts gives me 1.2.3-1
debian stable: packages my grandmom is still used to
[14:39]
gac410gentoo has 0.11.7 as the newest, but it's masked as unstable. 0.10.17 is marked stable. [14:40]
jast0.11 doesn't like uglify [14:41]
gac410Anyway, lets not confuse release vs. build. Only yui is in JQuery manifest, not uglify (if I'm spelling it correctly)
Actually on release11, it's not in the tree. Missing file?
So, do we need to ship either yui or uglify in the release code? Seems like that would be developer only stuff.
[14:42]
MichaelDaumnope. we don't ship uglifyjs. though yuicompressor is still part of the pkg
correct
[14:44]
gac410So it sounds like, we remove yuicompressor from the manifest, add optional dependency on nodejs and uglifyjs (mandatory for the RM) And update BuildContrib to prefer uglify if it's available. [14:45]
MichaelDaumok [14:48]
gac410Is there any risk to prod sites by us changing to uglify for the distributed files? (exposing bugs, or compression breaking things?) [14:49]
MichaelDaumnope. uglifyjs and nodejs is well established among javascriptians
hope is we have somethign to stick to for the next 2 years or so
[14:50]
gac410okay. http://jsperf.com/testing-code-performance-by-compression-type seemed to like closure advanced, but since that breaks APIs that's a non-starter for us. [14:51]
MichaelDaumI tried the closure compiler but failed due to the sheer complexity
work required to make it run on 3rd party plugins does not outweigh any benefit
[14:52]
gac410yeah, and requirement to change APIs doesn't sound good. [14:52]
MichaelDaumuglifyjs does a decent job and requires no overhead for any of the js code we have. so it wins hands down in my book. [14:56]
gac410I'll update Item12474 to add BuildContrib as a component, comment on removing yuicompressor from the manifest, and make it blocking :( [14:58]
......... (idle for 44mn)
I ran npm install uglifyjs ... no idea if it worked, got messages with unprintables in the log. uglify-js@2.4.0 node_modules/uglify-js ... âââ uglify-to-browserify@1.0.1 ... and some more
Is the âââ saying it worked? Failed? or I have a console problem on my laptop.
[15:42]
jastit probably displays better if your terminal is set up properly :)
but if you don't get an error, it should have worked
however, if you don't specify otherwise (-g), npm installs stuff "locally", i.e. in the current dir
[15:44]
gac410yeah I just noticed. Where does one normally put stuff that npm installs.
is that something stty needed to set up the terminal? I use konsole under kde. Never have run in to issues before.
[15:45]
jastno idea
it *should* display graph-drawing characters
[15:46]
gac410Okay ... anyway I just reran with -g, lots of errors, then with "sudo" back to the (not) graph characters. So I guess it worked - and is installed. [15:48]
jasthttp://gbimg.org/p.php?q=a5ARB [15:48]
gac410Now to fiddle with BuildContrib
Cool thanks. That's exactly what I got except for the bad characters, so must be a characterset issue ... :P
[15:48]
jastyeah
it probably uses utf-8
if utf-8 works fine for you in konsole, I don't know what else could be wrong
[15:49]
gac410no idea, on this side of the pond I suspect I don't encounter utf-8 much [15:50]
jasttry this: curl http://jk.gs/utf8 [15:51]
gac410Yeah I get Test ? ? ? Fiddling with Konsole setup now. [15:52]
Fixed it. Thanks jast, had to change my default characterset to utf-8 in konsole [15:57]
jastright [15:57]
..... (idle for 24mn)
MichaelDaumoha [16:21]
gac410I've got buildcontrib using uglify. building a test 119 now. see if it all works.
It tries uglify, falls back to yui-compressor cli, falls back to yui-compressor java -jar, falls back to perl
[16:22]
jastwe could even make it fall back to cp if all else fails [16:24]
gac410well, for production builds, I should probably make it crash if the "correct' minifier is not found. I think it does fall back to cp, not sure but not worth the time to figure it out :)
nope... warn "Cannot squish $to: no minifier found\n"; It doesn't fall to cp, but that's not bad.
[16:25]
okay. BuildContrib is updated, trunk & release11, defaults to uglify [16:32]
...... (idle for 27mn)
Hm. http://www.yuiblog.com/blog/2012/10/16/state-of-yui-compressor/ seems to recommend yuglify wrapper, plus CSSMin
yuglify takes the same arguments as yuicompressor (-type css|js) and handles both types of files.
I'm thinking that BuildContrib probably should move to that instead to get the css coverage rather than still use yuicompressor for css.
[16:59]
jastyeah, looks convenient [17:14]
......... (idle for 41mn)
gac410bleh... not compatible. yuglify doesn't allow "-o outputfile" if not using terminal input. It ALWAYS writes to <input-file>_min.js for the minified output. [17:55]
Does the same thing with css - outputing to _min, where as we want to write to the base file.
So much for yuglify ...
[18:06]
........ (idle for 36mn)
jastshame :( [18:42]
............... (idle for 1h14mn)
VickiBrownSvenDowideit: hello.
I am looking at the cached copy of your Foswiki "home" page dated Oct 12
cannot connect to foswiki.org
now it's up.
ANyway, there seems to be a typo in your email address? missing w?
[19:56]
nope. sorry. I goofed my whois lookup. Not a typo. (although you might want to edit your page to add "[sic]" [20:04]
***VickiBrown has left [20:05]
............................................... (idle for 3h53mn)
gac410Got a 1.1.9 alpha built with new compressors. Seeing a bit of strangeness in the generated HTML for ex: <!--JQUERYPLUGIN::THEME: requires= missing ids: JQUERYPLUGIN::UI-->
><!--JQUERYPLUGIN::FOSWIKI: requires= missing ids: JQUERYPLUGIN::MIGRATE-->
[23:58]

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)