[CDRIVER-1486] The library exports "TRACE" as an un-prefixed global symbol (define) Created: 23/Aug/16 Updated: 19/Oct/16 Resolved: 30/Aug/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | Build |
| Affects Version/s: | 1.4.0 |
| Fix Version/s: | 1.5.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Derick Rethans | Assignee: | Hannes Magnusson |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
The driver defines "TRACE", without prefixing it with a library specific prefix. This causes issues with HHVM (at least, 3.13.1), as it does the same. I am now getting the following compile errors:
The driver should prefix this with something, as to prevent symbol clashes. I also filed an issue for HHVM: https://github.com/facebook/hhvm/issues/7288 |
| Comments |
| Comment by Githook User [ 30/Aug/16 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: |
| Comment by Hannes Magnusson [ 29/Aug/16 ] |
|
maybe. I however don't want to be renaming them, that would defeat their purpose. I'd rather move tracing out of bleeding headers, but that would mean you would loose that functionality for your debugging, which isn't exactly a great outcome. |
| Comment by Jeremy Mikola [ 29/Aug/16 ] |
|
I realize this was only an issue for derick due to the HHVM conflict; however, the libmongoc PR only addresses TRACE() macro. Aren't ENTRY(), RETURN(), and the other trace macros also candidates for prefixing? |
| Comment by Hannes Magnusson [ 23/Aug/16 ] |
| Comment by Hannes Magnusson [ 23/Aug/16 ] |
|
We don't expect to be releasing 1.4.1. Since this is an unexported macro, I think we can get away with straight rename. Do note, jmikola that I will have to rename the define that includes that tracing functionality from MONGOC_TRACE to MONGOC_ENABLE_TRACE. |
| Comment by Derick Rethans [ 23/Aug/16 ] |
|
I managed to prevent the clash with "#undef TRACE" in lots of places, so not as important now any more: https://github.com/mongodb/mongo-hhvm-driver/pull/123/commits/ae057f5a125d35b82762436a32ccbcf92b235c8d |
| Comment by Derick Rethans [ 23/Aug/16 ] |
|
It currently "breaks" compilation (lots of warnings) for the HHVM driver, so I don't think it can wait until 1.5.0. I guess that's a BC break though, so perhaps it could be a flag? |
| Comment by Hannes Magnusson [ 23/Aug/16 ] |
|
Makes sense. It really should be MONGOC_TRACE(). |