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 192730 - IDE should not use unneeded artifacts for unmanaged projects
Summary: IDE should not use unneeded artifacts for unmanaged projects
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Thomas Preisler
URL:
Keywords:
: 193865 (view as bug list)
Depends on:
Blocks: 197245
  Show dependency tree
 
Reported: 2010-12-01 09:40 UTC by Vladimir Voskresensky
Modified: 2012-03-26 07:32 UTC (History)
3 users (show)

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 Vladimir Voskresensky 2010-12-01 09:40:35 UTC
Now when we create project from existing source IDE creates own *.mk file in user's source tree and nbproject folder (btw, which affect VCS)
Then this file is used as intermediate step for clean/build actions and in case of remote has to be transferred as well.
We should directly use user's build sequence without any intermediate files.
Comment 1 Thomas Preisler 2010-12-06 22:12:36 UTC
You have mentioned two issues:

remote: why is it a problem dealing with these files? Remote already does it for managed projects?

source control: why is these files an issues for source control? If you choose to embed the metadata files in the original project (now default), it would need to keep some files like nbproject and project.xml there anyway. Why are the extra files a problem for source control? You can also choose to keep the project outside in which case no files are created in original project folder.

A bit of history: the first implementation of unmanaged projects (many years ago) were calling the makefile directly as you suggest. It worked OK as far as I remember but there were issues with consistency with managed projects in how you dealt with your project from command line and in other situations. I don't remember the details. We later decided the change it to the model we have today, again, I don't remember the exact reasons. The reasons may not be important today.

So, should we go back to the original model? What do we gain? What do we loose? Perhaps the answer is in the two questions above?
Comment 2 Thomas Preisler 2011-01-13 01:23:32 UTC
I made the change. Please test it.

It still generates all the makefiles as before so command line make still works. The generated makefiles are also used for packaging and it also is still working. New is the IDe will invoke the the users build/clean commands directly and via the generated makefiles. They are not used when running build/clean from IDE.

If this is working, we can discuss what to do with the generated makefiles. We can't remove them without loosing functionality.
Comment 3 Thomas Preisler 2011-01-13 01:25:36 UTC
changeset:   186277:f4a2885935a2
tag:         tip
user:        Thomas Preisler <thp@netbeans.org>
date:        Wed Jan 12 17:24:13 2011 -0800
summary:     #192730 - IDE should not use unneeded artifacts for unmanaged projects
Comment 4 Thomas Preisler 2011-01-13 01:30:14 UTC
Correction: New is the IDE will invoke the users build/clean commands directly and *not* via the generated makefiles.
Comment 5 Vladimir Voskresensky 2011-01-13 14:38:38 UTC
*** Bug 193865 has been marked as a duplicate of this bug. ***
Comment 6 Quality Engineering 2011-01-14 06:05:11 UTC
Integrated into 'main-golden', will be available in build *201101140000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f4a2885935a2
User: Thomas Preisler <thp@netbeans.org>
Log: #192730 - IDE should not use unneeded artifacts for unmanaged projects
Comment 7 Thomas Preisler 2011-01-14 17:20:02 UTC
Consider fixed. Will decide later what to do with the makefiles. They are currently needed for package generation. If we decide to not to support this for unmanaged projects, I think the makefiles are not needed.
Comment 8 Vladimir Voskresensky 2011-01-14 18:42:25 UTC
Thomas, let's remove generated makefiles in context of this issue.
Packaging is done through script and script is called from generated makefile.
So, call script directly and remove makefiles at all.
We will not loose any functionality
Comment 9 Thomas Preisler 2011-01-15 03:03:41 UTC
Done:

changeset:   186481:627bc58360cf
user:        Thomas Preisler <thp@netbeans.org>
date:        Fri Jan 14 18:43:10 2011 -0800
summary:     #192730 IDE should not use unneeded artifacts for unmanaged projects
Comment 10 Quality Engineering 2011-01-16 06:12:25 UTC
Integrated into 'main-golden', will be available in build *201101160000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/627bc58360cf
User: Thomas Preisler <thp@netbeans.org>
Log: #192730 IDE should not use unneeded artifacts for unmanaged projects
No longer generation the makefiles
Comment 11 Thomas Preisler 2011-01-25 02:39:26 UTC
Backed out the changes. It was causing serious regressions: 194596 - make commands containing && broken in 7.0.
Comment 12 Thomas Preisler 2011-01-26 03:49:03 UTC
Next attempt:

changeset:   187274:1d72052042a9
tag:         tip
user:        Thomas Preisler <thp@netbeans.org>
date:        Tue Jan 25 19:38:14 2011 -0800
summary:     #192730 - IDE should not use unneeded artifacts for unmanaged project

Build command is now sent directly to native executor. Shell commands can be expressed like this:
   sh -c "${MAKE} -f Makefile && cp ......"
as the build comamnd. Required projects are no longer being build as part of the build process and a warning is displayed in the upgrade dialog if a project with required projects are being upgraded to current project version. Existing projects will keep working as before as long as they are not upgraded.
Comment 13 Thomas Preisler 2011-01-26 20:15:03 UTC
will consider this one fixed. It is still an open issue wheter we should automatically wrap the build command with sh -c "......" but it is not as trivial as it looks and wemay want to wait and see if it is needed.
Comment 14 Quality Engineering 2011-01-27 08:37:48 UTC
Integrated into 'main-golden', will be available in build *201101270001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/1d72052042a9
User: Thomas Preisler <thp@netbeans.org>
Log: #192730 - IDE should not use unneeded artifacts for unmanaged project
Comment 15 Quality Engineering 2011-01-27 20:45:45 UTC
Integrated into 'main-golden', will be available in build *201101271430* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d77472b2b7c7
User: Thomas Preisler <thp@netbeans.org>
Log: #192730 - IDE should not use unneeded artifacts for unmanaged project