Bug 136164

Summary: projectname.kdevelop file seems to randomly switch between both forms of XML empty elements
Product: [Applications] kdevelop Reporter: Ian Mackenzie <ian.e.mackenzie>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED WORKSFORME    
Severity: normal CC: esigra, kdeveloper.megan
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Project file after simply importing a new project from an empty directory and exiting
Project file after reopening project, browsing through all project options without making any changes, selecing 'OK' and then exiting
Project file after reopening project and exiting KDevelop

Description Ian Mackenzie 2006-10-23 06:05:41 UTC
Version:           3.3.5 (using KDE 3.5.5, Gentoo)
Compiler:          Target: x86_64-pc-linux-gnu
OS:                Linux (x86_64) release 2.6.18-gentoo

My KDevelop project file (in my case, libcaddis.kdevelop) seems to switch randomly between <element></element> and <element/> forms of empty elements.  For instance, <prefixGet></prefixGet> sometimes changes to <prefixGet/> and sometimes changes back.

This isn't really a big deal, as it doesn't affect any functionality, but I have the libcaddis.kdevelop file under version control, so every time these spurious changes are made I have to commit the file again, and make sure to update it on my other computer to avoid getting any conflicts.  It would be nice if KDevelop used only one form for empty elements, as it would mean I would only have to commit updates to the libcaddis.kdevelop file only when actual changes were made.

I haven't noticed a definite pattern as to when the file gets changed, and which elements do (usually it's several), but if necessary I could play around and see if I can reproduce it reliably.
Comment 1 Megan Webb 2006-11-03 20:24:52 UTC
What project type is this happening on?
Yep, if you can give reproduceable steps, fixing it is easier.
Comment 2 Megan Webb 2006-11-04 21:07:14 UTC
We do not currently have enough information to troubleshoot this bug. 
Please reopen if you can provide more info.
Comment 3 Matt Rogers 2006-11-05 16:35:40 UTC
I'm tempted to close it as WONTFIX since the .kdevelop files aren't designed to be stored in version control, but we'll just leave it open for now.
Comment 4 Ian Mackenzie 2006-11-05 18:26:43 UTC
Created attachment 18417 [details]
Project file after simply importing a new project from an empty directory and exiting
Comment 5 Ian Mackenzie 2006-11-05 18:27:26 UTC
Created attachment 18418 [details]
Project file after reopening project, browsing through all project options without making any changes, selecing 'OK' and then exiting
Comment 6 Ian Mackenzie 2006-11-05 18:28:14 UTC
Created attachment 18419 [details]
Project file after reopening project and exiting KDevelop
Comment 7 Ian Mackenzie 2006-11-05 18:33:54 UTC
The last three attachments show how I was able to reproduce the bug.  First, create a project by selecting 'Import Existing Project', selecting an empty directory, and then exiting KDevelop.  Start KDevelop again and browse through all of the Project Options (I just clicked on each category, and each tab within each category) without changing anything, click OK, and exit KDevelop; this seems to populate the project file.  Finally, start KDevelop again, reopen the same project, and exit KDevelop again; several of the options switch from (e.g.) <docurl></docurl> to <docurl/>.

By the way, this is a bit off-topic, but why aren't the .kdevelop files meant to be stored in version control?  I thought it would be a good way for multiple developers (or, in my case, one developer on multiple computers) to share project settings.
Comment 8 Matt Rogers 2006-11-09 01:22:56 UTC
Because they contain settings that are specific to the current user that last 
checked the file into source control, and practice has shown that it doesn't 
work.  KDevelop 4 will address this issue
Comment 9 Ian Mackenzie 2006-11-09 01:34:04 UTC
Oh, in that case then there's not much point fixing it for KDevelop 3 - I'll mark it as RESOLVED.