solr icon indicating copy to clipboard operation
solr copied to clipboard

Add the .gradletasknamecache file to .gitignore

Open janhoy opened this issue 3 years ago • 1 comments

This file has recently started popping up as changed. I think it should be ignored, as it causes e.g. gradlew check -x tests to fail with "not clean checkout"

janhoy avatar May 10 '22 19:05 janhoy

This file has recently started popping up as changed. ...

Interesting. My local repo does not (yet) have the file at all but instead there's some other Eclipse files which could be .gitignore-ed like this:

**/.project
**/.classpath
**/.settings/

cpoerschke avatar May 27 '22 17:05 cpoerschke

Digging some more, appears that it is my gradle plugin to oh-my-zsh for Mac'sZSH that actually produces this file, probably when you type gradle<space><space>, to avoid querying task list every time, see https://github.com/ChrisCummins/oh-my-zsh/blob/master/plugins/gradle/gradle.plugin.zsh

Mac + ZSH + oh-my-zsh may be common enough for us to ignore the file, wdyt? Another option would be to check in the file, since the list of gradle tasks won't update unless build.gradle is newer than .gradletasknamecache...

Wdyt?

janhoy avatar Aug 19 '22 11:08 janhoy

Actually the logic for when to re-generate the cache file is not sufficient to detect changes to Solr's build, since we rely on including files, so there may be a new gradle task added without the top-level build.gradle having changed. Thus users may need to nuke the cache file if it gets very old. I still think I vote for the ignore path here.

janhoy avatar Aug 19 '22 12:08 janhoy