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 165538 - Error when build a project created on different OS
Summary: Error when build a project created on different OS
Status: RESOLVED 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
Depends on:
Blocks:
 
Reported: 2009-05-19 20:51 UTC by Alexander Pepin
Modified: 2009-05-21 18:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (117.42 KB, text/plain)
2009-05-19 20:52 UTC, Alexander Pepin
Details
sorry it was wrong MIME type (117.42 KB, image/jpeg)
2009-05-19 20:53 UTC, Alexander Pepin
Details
platformerror (106.76 KB, text/plain)
2009-05-20 05:37 UTC, Thomas Preisler
Details
screenshot (84.69 KB, image/jpeg)
2009-05-20 22:06 UTC, Thomas Preisler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2009-05-19 20:51:32 UTC
Steps to reproduce:
- open on Solaris a project created on Linux machine (e.g. sample from issue #165478)
- try to build it
Result: Error window appears (see attached screenshot). It's unclear what user can change in Project properties and why
it can not be done automatically. Such messages can only confuse a user.
Comment 1 Alexander Pepin 2009-05-19 20:52:12 UTC
Created attachment 82422 [details]
screenshot
Comment 2 Alexander Pepin 2009-05-19 20:53:53 UTC
Created attachment 82423 [details]
sorry it was wrong MIME type
Comment 3 Thomas Preisler 2009-05-19 21:07:07 UTC
Hmm, not sure what you are asking for. The project cannot automatically be changed to work on new platform due to difference in compiler and linker flags 
and difference in libraries etc. It's easy to do for hello-world projects but (almost) impossible to do for real projects that is just slightly more complex. So, do 
you suggest a different wording? What? we are past GUI freeze so not sure what we can do here.
Comment 4 Thomas Preisler 2009-05-20 05:35:02 UTC
Susan propose the text in attached screenshot.
Comment 5 Thomas Preisler 2009-05-20 05:37:31 UTC
Created attachment 82445 [details]
platformerror
Comment 6 Alexander Pepin 2009-05-20 13:41:45 UTC
It's definitely not an error. Any errors will be found only by compiler. I don't understand why the project can not be
changed automatically as only action that I need to do to fix that problem is just to open and close project properties
window without any changes. Why then it can not be done automatically?
Of course user should be informed that project was configured for different OS but it should be a "Warning" and not an
"Error" window. 
Comment 7 Leonid Lenyashin 2009-05-20 13:45:11 UTC
I tend to agree with Alexander's suggestion. Warning seems more appropriate.
Comment 8 Vladimir Voskresensky 2009-05-20 13:52:46 UTC
I have faced this problem and after all explanations "what to change" in project properties. I still do not understand
what to change when I have only "localhost" host.

=> I propose to to change dialog:
- simplify message about problem
- propose "Ok" "Cancel" choice where "Ok" will regenerate all what I had to change in project properties automatically

If project has dependent projects => you can add additional text to warning, but at least it will be rare case
+ I don't know if problem exists for "non-managed" projects at all, so why show anything at all if we do
generate/regenerate nothing

Comment 9 Leonid Lenyashin 2009-05-20 21:23:42 UTC
Thomas, you've created attachment with wrong MIME type.
Comment 10 Thomas Preisler 2009-05-20 22:06:08 UTC
Should be fixed now. I changed the behavior to the following:

For managed projects it checks whether build platform matches current host platform. If not, it will display a warning dialog explaining the situation (text in 
attached screenshot). If user selects Cancel, nothing happens. If user selects OK, build platform is overridden with current host platform and build/run/debug 
action continues. In many cases project will just get rebuilt and should work afterwards. If the project is slightly more complex with libraries or subprojects or 
customized compiler/link options, it may not built or run correctly.

For unmanaged projects, it will just override build platform with current host and continue. No dialog.
Comment 11 Thomas Preisler 2009-05-20 22:06:58 UTC
Created attachment 82514 [details]
screenshot
Comment 12 Quality Engineering 2009-05-21 18:43:11 UTC
Integrated into 'main-golden', will be available in build *200905211401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/8f1649ffb0cb
User: Thomas Preisler <thp@netbeans.org>
Log: #165538 Error when build a project created on different OS