[CDRIVER-2139] Please add generated files to .gitignore Created: 24/Apr/17  Updated: 28/Oct/23  Resolved: 28/Apr/17

Status: Closed
Project: C Driver
Component/s: Build
Affects Version/s: 1.5.5
Fix Version/s: 1.7.0

Type: Bug Priority: Major - P3
Reporter: Derick Rethans Assignee: Hannes Magnusson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible

 Description   

The libbson and libmongoc build processes create several files that are not recorded in .gitignore. Please add them, so that projects that use them as submodules don't see these files as "dirty" in the specific submodules.

For example:

	build/cmake/libbson-1.0-config-version.cmake
	build/cmake/libbson-1.0-config.cmake
	build/cmake/libbson-static-1.0-config-version.cmake
	build/cmake/libbson-static-1.0-config.cmake

In previous versions, libmongoc had similar issues, so please check that too.



 Comments   
Comment by Hannes Magnusson [ 28/Apr/17 ]

I've added the root files to .gitignore but please do re-open the ticket if it isn't actually working for you correctly, in which case if you could state your git version and cat build/cmake/.gitignore, I think that would be helpful

Comment by Githook User [ 28/Apr/17 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-2139 Please add generated files to .gitignore
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/d7c8105bab38806b455ab431675d3cb205636485

Comment by Hannes Magnusson [ 27/Apr/17 ]

Can you confirm, after updating libbson master, that you are no longer seeing this with libbson?
(I haven't merged the mongoc one yet).
If not, can you cat build/cmake/.gitignore ?

My only guess is that your git version may not be reading the .gitignore file in the sub directory, which would be weird.

Comment by Derick Rethans [ 27/Apr/17 ]

Curiously, I don't even use cmake to configure libbson and libmongoc: https://github.com/mongodb/mongo-hhvm-driver/blob/master/scripts/configure-libs.sh

This script is called through Cmake though, as part of "config.cmake"'s rule for "configlib": https://github.com/mongodb/mongo-hhvm-driver/blob/master/config.cmake#L112

Comment by Githook User [ 25/Apr/17 ]

Author:

{'name': 'Hannes Magnusson', 'username': 'bjori', 'email': 'bjori@php.net'}

Message: CDRIVER-2139 Please add generated files to .gitignore
Branch: master
https://github.com/mongodb/libbson/commit/9a946a0b5eba82c1c7ea68482124dc16b2e9c8ab

Comment by Hannes Magnusson [ 24/Apr/17 ]

I just noticed you are seeing the files in build/cmake/ as dirty.. there is a .gitignore in that directory which lists those files.
Is that ignore not working for you?

I managed to reproduce this though using cmake . which created the files in the top-level directory, but I'm never seeing the files in build/cmake show up.

Generated at Wed Feb 07 21:14:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.