Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368186

Summary: Minification broken in I20120108-2230
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: RelengAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: libingw, simon_kaegi
Version: 0.4   
Target Milestone: 0.4 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2012-01-09 13:21:11 EST
Our build-time page minification appears to be broken in this build. Page loads on orion.eclipse.org are very slow.
Comment 1 John Arthorne CLA 2012-01-10 09:25:47 EST
This looks like the culprit:

     [java] Tracing dependencies for: table
     [java] org.mozilla.javascript.WrappedException: Wrapped java.io.FileNotFoundException: /opt/public/eclipse/e4/orion/I201201092230/optimizat
ion/./navigate/./jsdiff/diff.js (No such file or directory)
     [java]     at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1773)
     [java]     at org.mozilla.javascript.MemberBox.newInstance(MemberBox.java:202)
     [java]     at org.mozilla.javascript.NativeJavaClass.constructSpecific(NativeJavaClass.java:281)
     [java]     at org.mozilla.javascript.NativeJavaClass.construct(NativeJavaClass.java:200)
     [java]     at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2327)
     [java]     at org.mozilla.javascript.gen.c13._c12(Unknown Source)
     [java]     at org.mozilla.javascript.gen.c13.call(Unknown Source)
     [java]     at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)
Comment 2 John Arthorne CLA 2012-01-10 09:37:34 EST
So this is the optimization for the navigate page ("table"). I'm wondering why this is pulling in jsdiff at all.
Comment 3 libing wang CLA 2012-01-10 11:55:42 EST
(In reply to comment #2)
> So this is the optimization for the navigate page ("table"). I'm wondering why
> this is pulling in jsdiff at all.

Here is the requireJS dependency chain:
table.js -> searchClient.js -> searchExplorer.js -> compare-container.js -> jsdiffAdapter.js -> jsdiff/diff.js

The reason is that the search replace preview requires the compare widget, which eventually requires jsdiff.
Comment 4 John Arthorne CLA 2012-01-10 13:18:22 EST
I'm not understanding why the module loader isn't finding the dependency. jsdiffAdapter.js has this:

define(['jsdiff/diff']

table.html has this:

		require({
		  baseUrl: '..',


So from this I would expect to find the script at:

navigate/../jsdiff/diff.js

This is where the script is located. However in the build log I see it is looking under:

navigate/./jsdiff/diff.js

Which is the wrong place.  I'll need to go over this with Simon.
Comment 5 John Arthorne CLA 2012-01-11 17:24:05 EST
Simon tracked this down and we are fixing it.
Comment 7 John Arthorne CLA 2012-01-12 09:50:50 EST
Not fixed.
Comment 8 John Arthorne CLA 2012-01-16 09:47:44 EST
This was fixed by Ken and Simon.