This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 120845 - Project compiler collection property is changed after adding/changing compiler collection in Tools->Options
Summary: Project compiler collection property is changed after adding/changing compile...
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords: USABILITY
: 121676 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-01 16:47 UTC by Alexander Pepin
Modified: 2008-03-14 13:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2007-11-01 16:47:10 UTC
I guess it happens on all platforms but first was discovered  on Windows.
Steps to reproduce:
- open IDE
- create any project (e.g. Welcome)
- open Project Properties and check that in General tab the Compiler Collection property is set to "GNU Compiler
Collection from Cygwin"
- open Tools->Options->C/C++
- add a path to MinGW/bin to Current Path, check that chosen Compiler Collection is still the same ("GNU Compiler
Collection from Cygwin")
- open the Project Properties and switch to General tab
Result: Now Compiler Collection project property is set to "GNU Compiler Collection from MinGW".
Comment 1 Sergey Grinev 2007-11-02 16:43:55 UTC
It's not a common use case and impact is very small. I'm not sure about safe fix because origins of bug are in Build
Tools code. I suggest to downgrade it to P3.
Comment 2 Alexander Pepin 2007-11-13 16:33:01 UTC
Upgraded to P2

------- Additional comments from dustin_mccartney Sun Nov 11 22:30:18 +0000 2007 -------
Description:
Adding a new "Compiler Collection" by adding a new path to "Options->C/C++->Build Tools" results in all C/C++ projects
having all their build targets set to use the newly added "Compiler Collection".  This wipes out any previously selected
"Compiler Collection" choices in projects and build targets.

Steps to Reproduce:
1) Open the "Options->C/C++->Build Tools" and add a path that contains a compiler collection.
2) Open "Compiler Collections" drop-down to see which "Compiler Collection" was added and remember this.
3) Open any C/C++ project...  any build target...  and see that the selected "Compiler Collection" is now the most
recently added compiler collection.


Yes, this bug appears to be the general case that is described in bug 120845
(http://www.netbeans.org/issues/show_bug.cgi?id=120845).

However, I humbly disagree with sergius' assertion in bug 120845 that the use-case and impact are very small.

1) If adding/removing Compiler Collections causes all projects and build targets to have their user choosen Compiler
Collection to change without warning, it can cause:
  a) Confusion on the part of the user when they go to build a project/target and all of a sudden their compilation
changes (target version number, platform target; ie: Linux_x86 project is now building MacOSX_PPC) and/or fails because
the project is using a different Compiler Collection.
  b) Frustration on the part of the user because now EVERY project and EVERY build target now needs to be fixed.  In my
case, I have 6 projects, each with 8 build targets.  That is currently 48 changes I need to make every time I add/or
remove a "Compiler Collection", which is unacceptable.  I will be adding more projects, so this problem will only get worse.
  c) Reasons 'a' and 'b' render the usage of "Compiler Collections" unworkable in a professional environment and force
the user to look elsewhere to get the job done.  
2) I suspect that this bug is related to bug 121675 (http://www.netbeans.org/issues/show_bug.cgi?id=121675).  I am not
familiar with the code, but I wouldn't be surprised if (in bug 121675) the Compiler Collection is indeed saved with the
project settings but is then getting reset when Netbeans loads up and registers it's "Compiler Collections" (vis a vis,
this bug or similar).

Comment 3 Alexander Pepin 2007-11-13 16:33:46 UTC
*** Issue 121676 has been marked as a duplicate of this issue. ***
Comment 4 Alexander Simon 2007-11-15 15:26:55 UTC
I think that it a very serious bug (P1)
because project system change project properties without any warning for user.
Project system can destroy project with required projects.
Because after closing IDE part of required projects have a right compiler set other have wrong compiler set.
I have this annoying trouble some times when I prepared Open Solaris projects.
Comment 5 Alexander Pepin 2007-11-15 17:09:22 UTC
I vote for this issue is to be fixed in 6.0 because of the following scenario (discovered while testing SXDE):
- open IDE
- make sure that in Tools->Options->C/C++ SunStudio compiler collection is selected
- create a new project or sample
- set in the ProjectProperties->General GNU compiler collection
- open ProjectProperties->General and check that GNU compiler collection is selected
- open Tools->Options->C/C++ and set GNU compiler collection
- open ProjectProperties->General
Result: SunStudio compiler collection is selected
Comment 6 Alexander Pepin 2007-11-21 17:37:24 UTC
Project properties should be persistent and should be allowed to be changed only via Properties window.
Comment 7 Thomas Preisler 2008-02-24 22:46:12 UTC
Fixed:
changeset 6310b1a14a34 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=6310b1a14a34
changeset 04c7c2b77fa6 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=04c7c2b77fa6
changeset ae7307b62857 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=ae7307b62857
changeset 222456ac997a in main
details: http://hg.netbeans.org/main?cmd=changeset;node=222456ac997a
changeset 29ac90b548ea in main
details: http://hg.netbeans.org/main?cmd=changeset;node=29ac90b548ea
Comment 8 Thomas Preisler 2008-02-24 22:49:08 UTC
changeset 55748d7a4c96 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=55748d7a4c96
Comment 9 alexandrov 2008-03-14 13:31:37 UTC
verified in build 20080314