Skip to content

.classpath file removed from git#21

Open
amadaden wants to merge 1 commit into
markfguerra:masterfrom
amadaden:clean-classpath
Open

.classpath file removed from git#21
amadaden wants to merge 1 commit into
markfguerra:masterfrom
amadaden:clean-classpath

Conversation

@amadaden

@amadaden amadaden commented Feb 2, 2012

Copy link
Copy Markdown

Since .classpath is created by eclipse, it's contents are dependent on the
users configuration, and has no use for users who have not set up this
project in eclipse it is being removed.

.classpath files are also now ignored via .gitignore

WARNING: This change will not be a problem moving forward but will likely break the project in Eclipse. This is because this is a file that eclipse uses to track project data. Any one who pulls this and has an eclipse project will need to either add the project again or fix their build settings for this project

Since .classpath is created by eclipse, it's contents are dependent on the
users configuration, and has no use for users who have not set up this
project in eclipse it is being removed.

.classpath files are also now ignored via .gitignore
@fredgrott

Copy link
Copy Markdown

many projects best practices is refuse to remove.classpath ,PLUS adT PUTS ITS DATA IN THE .CLASSPATH FILE.. i SUGGEST STRONGLY A REVERSAL OF THIS PULL REQUEST

@amadaden

Copy link
Copy Markdown
Author

If it's a better plan to add it that's fine and easy to change but how do those projects deal with differences in .classpath file across different dev environments? I've seen nothing but problems from including .classpath files.

@fredgrott

Copy link
Copy Markdown

it does not contain any dev environment enries except for setting up the adt plugin..you are confusing .classpath with the .project file..here is what is in a typical android project .classpath file:

Show me what is in that file that breaks anything when you switch from say mac to windows and than to Linux?

@fredgrott

Copy link
Copy Markdown

Wait it did not go through typical .classpath file:

classpath
classpathentry kind="src" path="src"
classpathentry kind="src" path="gen"
classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"
classpathentry kind="output" path="bin"
classpath

@amadaden

Copy link
Copy Markdown
Author

As long as the user is using the defaults for everything you're right nothing is broken. However the user needs to add this as a project in eclipse anyway. During that process the default .classpath file will be created. While the .classpath file causes no harm when using the defaults it will be crated when the user adds the project to eclipse anyway.

In short there is no benefit I can see from including it (as it contains no special data), only downsides as the user may customize it and commit the changes. Is their a benefit I'm missing?

I would like to add that if you had this project, pulled, and had your .classpath deleted; I'm very sorry. This was a one time change to prevent any issues going forward.

@markfguerra

Copy link
Copy Markdown
Owner

I would agree that the .classpath file is inappropriate for inclusion in this repository.

The reason is that .classpath is eclipse-specific, and it often changes without developer intervention. This leads to merge conflicts and wasted time.

Now, removing it from the repository has the unfortunate side effect of deleting the file locally, which messes up eclipse. Instructions should be provided to restore the .classpath file after merging the delete commit fc747ea. The template for doing this is as follows

git show SHA1HASH:full/path/to/file.txt > output.txt

We should commit the latest automatic changes to .classpath before the merging fc747ea, so that when people restore their .classpath using git show, they restore the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants