Skip to content

add Eclipse .settings/ to .gitignore #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

markusicu
Copy link
Member

After importing the new Maven project into Eclipse, git status reported that there was a new folder unicodetools-testutils/.settings/. AFAIU we don't want to check in IDE-specific settings.

@srl295
Copy link
Member

srl295 commented Apr 6, 2022

Could you move this .gitignore just under unicodetools-testutils? We already have .settings files checked in elsewhere.

@markusicu markusicu requested a review from macchiati April 6, 2022 16:41
@markusicu
Copy link
Member Author

Could you move this .gitignore just under unicodetools-testutils? We already have .settings files checked in elsewhere.

Should I check in the new .settings/ instead of ignoring it?

Elango made the point that VS Code etc. settings are ignored, so he thinks we should treat Eclipse the same.
I am not sure what the ramifications are...

@srl295
Copy link
Member

srl295 commented Apr 12, 2022

Could you move this .gitignore just under unicodetools-testutils? We already have .settings files checked in elsewhere.

Should I check in the new .settings/ instead of ignoring it?

Elango made the point that VS Code etc. settings are ignored, so he thinks we should treat Eclipse the same. I am not sure what the ramifications are...

There are already .settings files checked in elsewhere. Some of them has formatting settings. I would propose either:

  1. just ignore unicodetools-testutils/.settings

or

  1. if we add the .settings gitignore to the top level, also remove the .settings files.

@markusicu
Copy link
Member Author

FYI: PR #225 just added three files into unicodetools-testutils/.settings/

@macchiati
Copy link
Member

macchiati commented Apr 25, 2022 via email

@srl295
Copy link
Member

srl295 commented Apr 25, 2022

I find it very annoying that it seems like every other time I want to make a pull request in CLDR, etc., there are some new eclipse .files that are created. I don't know what changed and shouldn't have to. So either we should 1. always check them in, OR 2. never check them in (eg mark as ignored, except for specific instances like where we all agree on new settings).

The problem is it's not always clear when something is a new setting (such as java 8 vs 11) and when it is just noise. @nedley and others ran into issues where Eclipse isn't always able to create files from scratch, and gets stuck.

As I noted in https://unicode-org.atlassian.net/browse/CLDR-15048?focusedCommentId=162936 what I have been doing myself is to use the --skip-worktree feature of git to just ignore files locally for the time being. If they actually change, i have to 'unskip' them, update, and then skip again. It's not perfect, but it seems to improve the situation.

@echeran
Copy link
Contributor

echeran commented Apr 25, 2022

It sounds like we've hit a point where we're working okay with Maven, and even fixes to Eclipse builds are really Maven fixes (ex: #225). Eclipse's integration with Maven is good enough that we're not benefiting from keeping the Eclipse dot files around.

I think we should go with Option 2 and stop dealing with Eclipse settings dot files. The first thing would be to go ahead with this PR to add .settings/ to .gitignore.

If that's ok, then we can follow up later with removing those files from the repo, to be done in conjunction with running Steven's command locally before we update from usptream:

$ find . -name ".settings"
./unicodetools/.settings
./UnicodeJsps/.settings
./unicodetools-testutils/.settings
./.settings

=>

git update-index --skip-worktree ./unicodetools/.settings ./UnicodeJsps/.settings ./unicodetools-testutils/.settings ./.settings

@srl295
Copy link
Member

srl295 commented Apr 26, 2022 via email

@markusicu
Copy link
Member Author

In ICU, we have common, light-touch settings for things like order of imports, cleanup of generic-type decls, and removing trailing spaces. Is there a reasonable way to achieve these kinds of things across IDEs? Or would such things be a reasonable reason for keeping the .settings?

@srl295
Copy link
Member

srl295 commented Apr 26, 2022 via email

@markusicu
Copy link
Member Author

FYI as a data point. The ICU repo has lots of Eclipse .prefs files for a long time...

@macchiati
Copy link
Member

macchiati commented May 2, 2022 via email

@srl295
Copy link
Member

srl295 commented May 23, 2022

FYI, I'm tired of getting messages like the following when I pull From github.com:unicode-org/unicodetools * branch main -> FETCH_HEAD error: Your local changes to the following files would be overwritten by merge: UnicodeJsps/.settings/org.eclipse.core.resources.prefs UnicodeJsps/.settings/org.eclipse.jdt.core.prefs UnicodeJsps/.settings/org.eclipse.wst.common.component UnicodeJsps/.settings/org.eclipse.wst.common.project.facet.core.xml unicodetools/.project unicodetools/.settings/org.eclipse.jdt.core.prefs Please commit your changes or stash them before you merge. error: The following untracked working tree files would be overwritten by merge: unicodetools/.settings/org.eclipse.wst.common.component unicodetools/.settings/org.eclipse.wst.common.project.facet.core.xml unicodetools/.settings/org.eclipse.wst.validation.prefs Please move or remove them before you merge. Aborting

These are the files upon which i use the git skip method above.

@markusicu
Copy link
Member Author

Obsolete after PR #254.

@markusicu markusicu closed this Aug 5, 2022
@markusicu markusicu deleted the gitignore-eclipse-settings branch August 5, 2022 18:59
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.

4 participants