Skip to content

Commit 2848ddd

Browse files
authored
Instructions for pointing libmongoc submodule to a fork
1 parent 0aadc0e commit 2848ddd

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

CONTRIBUTING.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,23 @@ reflect the new sources and/or package version.
131131

132132
### Updating libmongoc and libbson
133133

134-
#### Update libmongoc to the latest version
134+
#### Update libmongoc submodule
135135

136136
```
137137
$ cd src/libmongoc
138138
$ git fetch
139139
$ git checkout 1.15.0
140140
```
141141

142+
During development, it may be necessary to temporarily point the libmongoc
143+
submodule to a commit on the developer's fork of libmongoc. For instance, the
144+
developer may be working on a PHP driver feature that depends on an unmerged
145+
pull request to libmongoc. In this case, `git remote add` can be used to add
146+
the fork before fetching and checking out the target commit. Additionally, the
147+
submodule path in
148+
[`.gitmodules`](https://github.com/mongodb/mongo-php-driver/blob/master/.gitmodules)
149+
must also be updated to refer to the fork.
150+
142151
#### Ensure libmongoc version information is correct
143152

144153
The build process for Autotools and Windows rely on
@@ -152,6 +161,12 @@ $ make libmongoc-version-current
152161
Alternatively, the `build/calc_release_version.py` script in libmongoc can be
153162
executed directly.
154163

164+
Note: If the libmongoc submodule points to a non-release, non-master branch, the
165+
script may fail to correctly detect the version. This issue is being tracked in
166+
[CDRIVER-3315](https://jira.mongodb.org/browse/CDRIVER-3315) and can be safely
167+
ignored since this should only happen during development (any PHP driver release
168+
should point to a tagged libmongoc release).
169+
155170
#### Update sources in build configurations
156171

157172
The Autotools and Windows build configurations (`config.m4` and `config.w32`,
@@ -181,12 +196,13 @@ if $PKG_CONFIG libmongoc-1.0 --atleast-version 1.15.0; then
181196
AC_MSG_ERROR(system libmongoc must be upgraded to version >= 1.15.0)
182197
```
183198

184-
#### Update tested versions in evergreen configuration
199+
#### Update tested versions in Evergreen configuration
185200

186201
Evergreen tests against multiple versions of libmongoc. When updating to a newer
187202
libmongoc version, make sure to update the `libmongoc-version` build axis in
188203
`.evergreen/config.yml`. In general, we test against two additional versions of
189204
libmongoc:
205+
190206
- The upcoming patch release of the current libmongoc minor version (e.g. the
191207
`r1.x` branch)
192208
- The upcoming minor release of libmongoc (e.g. the `master` branch)

0 commit comments

Comments
 (0)