Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327902 - Dependent projects are not refreshed during headless build
Summary: Dependent projects are not refreshed during headless build
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 309769
  Show dependency tree
 
Reported: 2010-10-15 10:57 EDT by Dmitry Kozlov CLA
Modified: 2020-09-04 15:22 EDT (History)
4 users (show)

See Also:


Attachments
Projects to reproduce problem. (74.13 KB, application/x-zip-compressed)
2010-10-15 10:58 EDT, Dmitry Kozlov CLA
no flags Details
Proposed patch (4.19 KB, patch)
2010-10-15 11:17 EDT, Dmitry Kozlov CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Kozlov CLA 2010-10-15 10:57:40 EDT
Build Identifier: 20100618-0524

When the command-line builder goes to build application which depends on others it finds that there are dependent projects, it then tries to build dependent projects but fails to refresh the projects before building. This results in a failed build.


Reproducible: Always

Steps to Reproduce:
1. Start IDE
2. Select a new and clean workspace.
3. Import the attached 3 projects into the workspace.
4. The workspace should automatically build the Debug build configuration (active configuration) for all projects. Given the project dependencies the build order is (a) the two static projects followed by (b) the application.
4. Exit the IDE
5. Start a terminal and change directories to the workspace directory.
6. Delete the build configuration directories, they contain data that should be recreated. e.g. rm -rf application/Debug static1/Debug static2/Debug
7. Build the application from the command line

Build fails.
Comment 1 Dmitry Kozlov CLA 2010-10-15 10:58:58 EDT
Created attachment 180964 [details]
Projects to reproduce problem.
Comment 2 James Blackburn CLA 2010-10-15 11:03:11 EDT
We've completely re-written the way dependent projects are built for 8.0. They'll be built by the platform, not implicitly as part of the top-level build.

There are a whole slew of bugs like this that will just disappear once this work has been committed back.
Comment 3 Dmitry Kozlov CLA 2010-10-15 11:17:02 EDT
Created attachment 180970 [details]
Proposed patch

I suggest to use new option -refresh which forces workspace to refresh before build.
Comment 4 James Blackburn CLA 2010-10-15 11:27:54 EDT
Actually I've got a patch very similar in our HeadlessBuilder, except it's non optional. Things go wrong - such as environment etc. from .settings if the WS isn't in sync. 

=> I think refresh before headless build should be the default.
Comment 5 Sylvain Boily CLA 2012-04-03 09:30:23 EDT
I have opened 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=375882
Which isn't 100% similar but might be related.

All the dependencies are getting build, but the order defined under 

'Project Settings->c/c++ General->Paths and Symbols->References'

isn't taken into consideration.

Here's a detailed explanation

http://www.eclipse.org/forums/index.php/mv/msg/313603/825548/