Bug 33075 - 1.0 to 2.1 upgrade issue involving .project
Summary: 1.0 to 2.1 upgrade issue involving .project
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords: readme
: 33077 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-02-25 13:54 EST by Michael Valenta CLA
Modified: 2004-05-17 16:21 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Valenta CLA 2003-02-25 13:54:54 EST
When a workspace is migrated from 1.0 to 2.1, the .project file for projects is 
not written until the 2.1 Eclipse is shutdown. Any operations that change the 
contents of the .project (e.g. add project reference) will result in an error 
(.project out of sync with file system).
Comment 1 John Arthorne CLA 2003-03-05 12:00:48 EST
Could not reproduce.

I suspect this is a duplicate of bug 33489.

Before that bug was fixed, the following would cause an error:

- Create a project using eclipse 1.0
- Open same workspace with 2.1 RC1
- shutdown, restart
- try to add a project reference

I'll close this as a duplicate.  If you find a reproducible case, please reopen.

*** This bug has been marked as a duplicate of 33489 ***
Comment 2 Rafael Chaves CLA 2003-03-06 11:57:07 EST
To reproduce it with i20030227:

1 - Using Eclipse 1.0, create a project AAA
2 - Close Eclipse 1.0
3 - Using i20030227, open the same workspace (AAA won't have a .project file)
4 - Create another project BBB (this will have a .project file)
5 - Try to add a reference from AAA to BBB (Properties for AAA -> Project 
References) - bug happens

Also, if after getting this error, you try to add a linked resource to the 
project, it will fail saying: "Resource already exists on disk: /AAA/.project."

I also get this error with the current code from HEAD.
Comment 3 John Arthorne CLA 2003-03-06 12:07:01 EST
Reopening
Comment 4 John Arthorne CLA 2003-03-07 14:10:58 EST
Here's the scoop:

- Open a 1.0 workspace in 2.1
- Do something that triggers a snapshot (In Rafael's steps, he created a new
project)
- Our snapshot code says, "Wait, there's not .project file!  I better add one,
just in case..."
- Snapshot code puts a .project on disk, but it can't change the tree at that point
- Then if you call IProject.setDescription with force=false, it fails, because
it really is out of sync.

The workaround is to refreshLocal on the project and then it will work.  The out
of sync failure is legitimate.

Questions are: how do we fix it?  And, is it important enough to fix for RC3? 
There is no corruption, or lost work, it just leaves you out of sync.  Upgrade
from 1.0->2.1 also isn't a very common scenario.
Comment 5 Michael Valenta CLA 2003-03-07 14:17:01 EST
*** Bug 33077 has been marked as a duplicate of this bug. ***
Comment 6 DJ Houghton CLA 2003-03-11 15:29:29 EST
README for 2.1.
Comment 7 John Arthorne CLA 2004-05-17 16:21:08 EDT
Not worth fixing. Upgrading from 1.0 is rare, and the only downside is that the
.project is out of sync until the first shutdown.