Bug 7464 - build during
Summary: build during
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: 2.0 M2   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-10 18:58 EST by John Wiegand CLA
Modified: 2002-01-22 10:55 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Wiegand CLA 2002-01-10 18:58:32 EST
0109.

1. Start with a new workspace/turn autobuild off.
2. Use the plugin import tool:
import binary projects for all, except
import source projects for ui, swt.
3. build.
4. exit the workspace.
5. restart eclipse.
6. press the build button.
A dialog appears: Errors during build.

The following trace is in the log:

Log: Thu Jan 10 18:14:28 CST 2002
2 org.eclipse.core.resources 2 Problems occurred when invoking code from plug-
in: org.eclipse.core.resources.
org.eclipse.core.internal.runtime.AssertionFailedException: assertion failed: 
Invalid parameter to Path.uptoSegment
	at org.eclipse.core.internal.runtime.Assert.isTrue(Assert.java:95)
	at org.eclipse.core.runtime.Path.uptoSegment(Path.java:844)
	at 
org.eclipse.jdt.internal.core.newbuilder.IncrementalImageBuilder.addDependentsOf
(IncrementalImageBuilder.java:161)
	at 
org.eclipse.jdt.internal.core.newbuilder.IncrementalImageBuilder.findAffectedSou
rceFiles(IncrementalImageBuilder.java:212)
	at 
org.eclipse.jdt.internal.core.newbuilder.IncrementalImageBuilder.findAffectedSou
rceFiles(IncrementalImageBuilder.java:196)
	at 
org.eclipse.jdt.internal.core.newbuilder.IncrementalImageBuilder.build
(IncrementalImageBuilder.java:75)
	at org.eclipse.jdt.internal.core.newbuilder.JavaBuilder.buildDeltas
(JavaBuilder.java:121)
	at org.eclipse.jdt.internal.core.newbuilder.JavaBuilder.build
(JavaBuilder.java:76)
	at org.eclipse.core.internal.events.BuildManager$2.run
(BuildManager.java:356)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:821)
	at org.eclipse.core.runtime.Platform.run(Platform.java:395)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:114)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:179)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:189)
	at org.eclipse.core.internal.events.BuildManager$1.run
(BuildManager.java:138)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:821)
	at org.eclipse.core.runtime.Platform.run(Platform.java:395)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:152)
	at org.eclipse.core.internal.events.BuildManager.build
(BuildManager.java:214)
	at org.eclipse.core.internal.resources.Workspace.build
(Workspace.java:130)
	at org.eclipse.ui.internal.GlobalBuildAction.build
(GlobalBuildAction.java:57)
	at org.eclipse.ui.internal.GlobalBuildAction$1.run
(GlobalBuildAction.java:141)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:98)
Comment 1 Philipe Mulet CLA 2002-01-11 06:31:17 EST
This is the problem I mentionned over the phone to Kent. Surprisinly I had lost 
the log.
Comment 2 Kent Johnson CLA 2002-01-11 16:54:03 EST
This problem has been introduced since 1219...

Steps
1. Start with a new workspace/turn autobuild off.
2. Use the plugin import tool:
  select "Create projects for plugins in default location"
  then import binary projects for everything.

Look in the plugins directory & notice that each binary plugin does NOT have a 
bin folder even though its Java Build Path page says it should.

In 1219, the bin folder was created when the binary project was created. Now 
its not even though the plugin importer has not changed.

I tried 1219 AND 1219 with the latest jdt.core plugin jar... in both cases the 
bin folder is created when the binary project is created.

So continuing with the above steps:

2b. import source projects for ui, swt. (delete contents from previous step)
3. build.
4. exit the workspace.
5. restart eclipse.
6. press the build button. A dialog appears has described above.

The error is caused by the JavaBuilder being told that the output folder for 
each binary project is actually Added.

When the first build was done (in 0109 ONLY), the bin folders were created for 
each binary project since they did not already exist. But since this is in the 
context of a build, the bin folders should not show up as added during the next 
build, which they do not if that build is performed before the workspace is 
saved.

So something has changed b/w 1219 & 0109... the bin folder of a binary project 
is no longer being created when the project is... but it would appear not to be 
in jdt.core. This isn't necessarily a problem if the delta tree when saved & 
restored would not see each bin folder as 'Added'.

I'm going to change the incremental builder so it never looks in an Added 
src/output folder & JA will investigate why the delta tree does not restore 
itself properly.
Comment 3 Kent Johnson CLA 2002-01-11 17:32:14 EST
Verified that with the very latest jdt.core's IncremenatalJavaBuilder, a 0109 
drop no longer produces the walkback.

The bin folder still shows up in the delta as added but is ignored.
Comment 4 John Arthorne CLA 2002-01-22 10:54:40 EST
Fixed.  There was a problem on restore, where the builders were not receiving 
the correct deltas.  Essentially, it was an off-by-one error on reading the 
array of trees in WorkspaceTreeReader.  It used trees[++index], so trees[0] 
never got used.  Changed to trees[index++] to correct the behaviour.

After combing over the ElementTree serialization for a couple of days, I also 
realized there were some inefficiencies that dated from the time when each 
solution was stored as a separate tree.  I improved this so we no longer do tree 
linking on restore of the workspace (WorkspaceTreeReader#readTrees).  
ElementTreeReader was also coalescing deltas on restore 
(ElementTreeReaderImpl_1#readDelta), which I've removed.  The coalescing 
operation copies data down from the parent, preserving outward appearance 
but adding unnecessary bulk.  This should translate to a nice improvement in 
tree restore time for large workspaces.
Comment 5 John Arthorne CLA 2002-01-22 10:55:49 EST
Fixed and tested.  To be released in build 20020122.