In the 6.x-1.7 release, the apachesolr module purposely introduced a .gitignore file that excludes all the project-required SolrPhpClient library files.

This creates many unexpected issues on projects that are deployed via Git (which an ever-increasing number are), as anytime the apachesolr module is enabled, it gives an error saying the SolrPhpClient is missing, despite being appearing on the development codebase to be installed correctly.

Rather than forcing Git-savvy developers to 'hack' the module to remove the .gitignore file, perhaps it can be deleted from the project and prevent further head-scratching from other devs? (Or, at the very least, explain the reasoning behind including this file?)

Comments

dstol’s picture

Component: SolrPHP Client » Code
Status: Active » Needs review
StatusFileSize
new333 bytes

Spent way too much time debugging this today.

dstol’s picture

Version: 6.x-1.x-dev » 6.x-3.x-dev
StatusFileSize
new333 bytes

Here's a 3.x patch too

nick_vh’s picture

This is actually only valid for the 6.x-1.x branch. I don't see any direct reason why you should remove this. When you download this module, is the gitignore included with the tar.gz/zip?

dstol’s picture

Version: 6.x-3.x-dev » 6.x-1.x-dev

The .gitignore is included in the tar.gz.

This is what ended up happening to me today:

  1. drush dl apachesolr-6.x-1.7
  2. drush make --no-core -y --contrib-destination=. apachesolr.make.example
  3. git add apachesolr
  4. git commit && git push
  5. Warning: require_once(SolrPhpClient/Apache/Solr/Service.php) [function.require-once]: failed to open stream: No such file or directory in require_once() (line 2 of sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
  6. Derp?

Spent about an hour or so scratching my head until I randomly did a git status --ignored, which brought me here.

nick_vh’s picture

That sounds more like a packaging failure of drupal.org, it should never include the .gitignore? can you check if there is already an issue for that on drupal.org?

nick_vh’s picture

That sounds more like a packaging failure of drupal.org, it should never include the .gitignore? can you check if there is already an issue for that on drupal.org?

dstol’s picture

I'm nearly 100% sure d.o packaging will always include a .gitignore that is in a repo. Core used to do ship with a .gitignore, which was reverted for similar reasons. #1170538: Rename core .gitignore file to example.gitignore and add explanatory comments

Another way to go about it (and I'm not 100% sure if this is supported) but you could add a .gitattributes that looks like:

.gitignore export-ignore

pwolanin’s picture

Status: Needs review » Fixed

I don't recall any reason for adding in the 1st place, so removing it for now.

dstol’s picture

Thanks Peter!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.