Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 44231 - [CDT UI] Build and rebuild actions do not save modified files in referenced projects
Summary: [CDT UI] Build and rebuild actions do not save modified files in referenced p...
Status: RESOLVED DUPLICATE of bug 170590
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 1.2   Edit
Hardware: PC Windows 2000
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-06 11:30 EDT by Brent Nicolle CLA
Modified: 2010-03-22 13:50 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Nicolle CLA 2003-10-06 11:30:54 EDT
On 1.2 RC0, on Windows:

1. Create two Projects Proj1 and Proj2.
(tested with Managed C++ Exe/Library projects)
2. Add a project dependency Proj1 -> Proj2
3. Add NewClass1.h/.cpp to Proj1
4. Add NewClass2.h/.cpp to Proj2
5. Add to NewClass1.cpp:
#include "NewClass2.h"
6. Add the necessary inclusion path to Proj1.
7. Build Proj1.  All is well, Proj2 is also built.
8. Check that "Window > Preferences > Workbench >
"Save all modified resources prior to manual build"
is selected on.  (The auto-build preference is off.)
9. Make a change to NewClass2.cpp.  Manually save (Ctrl-S).
10. Proj1 > Build project.
All is well: Proj2 is again built.
11. Make a change to NewClass1.cpp.  DO NOT SAVE.
12. Proj1 > Build project.
All is well: NewClass1.cpp is saved, and both projects are built.
13. Make a change to NewClass2.cpp.  DO NOT SAVE.
14. Proj1 > Build project.
NewClass2 is not saved.  Nothing is built.

EXPECTED:  When the preference is set, all things in the workspace
may be included by the project being built, and so should be saved.

(Also, the unsaved file could have been not part of ANY project,
yet affect builds through include paths, eg. c:\myincludes\favourites.h)
Comment 1 Alain Magloire CLA 2003-10-07 14:37:30 EDT
For std Make project, the behaviour is different
For managed  the reporter seems to say it does not work correctly

Reassign to Sean(send back to me, it does not concern the Manage builder)
Comment 2 James Ciesielski CLA 2004-04-06 14:40:41 EDT
This issue still exists in CDT 2.0.0.200404011349 (M8 build)
Comment 3 Sean Evoy CLA 2004-04-06 15:29:25 EDT
Works fine in my version (from head / M8) in both the explorer and navigator.
Comment 4 Kleo Hapitas CLA 2004-07-07 16:33:47 EDT
PR was targeted to the 2.0 release but not resolved, moving target to 2.1
Comment 5 Sean Evoy CLA 2004-07-13 11:02:41 EDT
Could I get a verification on this bug? I think it is fixed in 2.0
Comment 6 Brent Nicolle CLA 2004-07-14 12:04:20 EDT
This is not fixed for Managed projects, nor Standard projects.
Part of the problem is the different-ways-to-build problem.

If I do Ctrl-B, then Eclipse seems to do a save all first.

If I do a Project > Build, it only saves files in the current
project, not the depended-upon (library) project.  This applies
to both Managed Make projects and Standard Make projects. 

For Standard Make, if I add then build a Make Target View for "make all"
in the depending project, then again no save is detected in the depended
project and so "make all" does nothing.

EXPECTED:  Behave like Java:
Build Project from the Navigator view on similarly dependent Java projects
results in a save of the depended project's files, and then both projects
are built.
Comment 7 Sean Evoy CLA 2004-07-15 09:59:26 EDT
Thanks for the clarification, Brent. I did not test the dependent project 
scenario.
Comment 8 Sean Evoy CLA 2004-11-01 14:54:26 EST
Targeting the 3.0 release
Comment 9 Sean Evoy CLA 2005-01-31 16:08:58 EST
This looks like a problem in the CView/BuildAction classes. Referenced 
projects are not searched for modified resources before the build gets kicked 
off.
Comment 10 David Daoust CLA 2005-05-13 13:19:16 EDT
As discussed in the weekly meeting -- all enhancements requests that had a
target milestone of 3.0 but were assigned to an inbox owner (which is an invalid
combination), have been moved to Target Milestone "--".
Comment 11 Matthew Herrmann CLA 2006-03-08 20:02:31 EST
I'm still seeing this issue on 3.0.2 with unmanaged builds. It's also not detecting changes to my files and hence preventing me from using Build Project (must use Rebuild).

Suspect both issues are related. I'd expect dependency tracking to detect changes to all files in the tree below the .cdtproject file in unmanaged builds.
Comment 12 Andrew Gvozdev CLA 2010-03-22 13:50:04 EDT
closing as duplicate

*** This bug has been marked as a duplicate of bug 170590 ***