[CDRIVER-2450] Altering BSON_STATIC_ASSERT_JOIN2 macro is an API break Created: 04/Jan/18  Updated: 28/Oct/23  Resolved: 12/Jan/18

Status: Closed
Project: C Driver
Component/s: libbson
Affects Version/s: 1.9.0
Fix Version/s: 1.9.1

Type: Bug Priority: Major - P3
Reporter: Jeremy Mikola Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-2460 BSON_STATIC_ASSERT() definition is br... Closed
is related to CDRIVER-2271 BSON_STATIC_ASSERT can trigger "error... Closed

 Description   

4e27abb changed the BSON_STATIC_ASSERT_JOIN2 macro, which is defined in a public header file. This is considered an API break for Fedora.

Instead, we should revert BSON_STATIC_ASSERT2 to its original definition and introduce BSON_STATIC_ASSERT3 to fix the original issue in CDRIVER-2271.



 Comments   
Comment by Githook User [ 10/Jan/18 ]

Author:

{'email': 'ppisar@redhat.com', 'name': 'Petr Písař', 'username': 'ppisar'}

Message: CDRIVER-2460 fix BSON_STATIC_ASSERT definition

The macro definition was mistakenly changed in 1.9.0 (CDRIVER-2271) and partly
reverted (CDRIVER-2450). This change completely reverts the macro to its 1.8.0
definition.

Signed-off-by: Petr Písař <ppisar@redhat.com>
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/35b0a890a50714b74d7793073d4d9e6693f70ad8

Comment by Githook User [ 09/Jan/18 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2450 preserve API compatibility in macros

BSON_STATIC_ASSERT and related macros must not change signatures.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/ce7b6d46ffdb8564bbe4f29a0f5cc3467cf7cc9e

Comment by Remi Collet [ 05/Jan/18 ]

> I'm curious, how did you discover this problem?

We used to run various checks:

1/ abi compliance checker

See: https://rpms.remirepo.net/compat_reports/libbson/
But strangely this tool didn't catched this change

2/ rpmdiff

3/ diff on installed tree

4/ build of dependent packages

So, mongo-c-driver and php-pecl-mongodb, which was failing

Comment by A. Jesse Jiryu Davis [ 05/Jan/18 ]

This was reported by remi. Remi, I'm curious, how did you discover this problem?

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