Community
Participate
Working Groups
If I have projects that depend on a missing project, they don't get correctly recompiled after adding that required project. For example: 1) I load our test suite projects into the workspace 2) Since JUnit project is missing, there are thousands of build errors 3) I "Add to workspace" JUnit from the repository 4) The build errors are not fixed 5) Full build all projects -> errors get fixed. Incremental build should be able to handle this case...
I wonder if this is related to the change in builder behaviour in the new drop? At the end of a build, the java builder requests which projects it wants deltas for next time. If the java builder is not requesting projects on the build path that don't exist (in my example, JUnit project), then it won't be invoked when the JUnit project gets added. If this is what's happening, the fix is to request deltas for all projects on the build path, whether they exist or not.
From KJ: This is one of the cases I was talking about yesterday... if I remember a project's classpath without the missing prereq project then when its added I immediately do a full build. If I do not notice that a prereq project or an external jar doesn't exist, then I end up with the current behaviour. =========== The #resolve and #expanded classpath should filter out offending entries
From KJ I also need JavaProject to answer getRequiredProjects() & it MUST include the missing ones.
I do not think the builder should need to know about deltas in added previously missing projects. This should be discovered as a major classpath changes. Also, the existing infrastructure requires project prerequisites to be passed as a collection of IProject, which makes it hard to use for missing ones.
I'm trying to keep the builder behaviour as simple and consistent as possible. The rules about when a builder gets invoked are not set in stone (yet), but I want to avoid having special cases. Current behaviour is: a builder is only invoked if there is a change to a project that it has declared an interest in. I'm open to the idea of invoking builders for other situations (such as for all added and removed projects), but only if there is a compelling reason. In the case of the java builder, it knows what projects the user has specified on the source path, so it should be able to provide them to us, whether they exist or not. It seems easy to create instances of IProject for non-existent projects on the classpath, and return them from the build() method.
Should check with new builder
The new builder includes missing projects in its list of dependent projects.