[CDRIVER-601] libbson bundles YAJL library Created: 01/Apr/15  Updated: 03/May/17  Resolved: 01/Apr/15

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Petr Pisar Assignee: A. Jesse Jiryu Davis
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File 0001-Use-system-YAJL-library-if-possible.patch    
Issue Links:
Duplicate
duplicates CDRIVER-597 Support building without requiring ve... Closed

 Description   

It's good practise not to bundle foreign code. libbson-1.1.2 bundles YAJL library and uses it's internals not int the public YAJL API.

Attached patch introduces a configure-time check for system YAJL library. If it's available, it is used instead of the bundled one.

It would be good if libbson stopped using YAJL internals, or if you persuaded YAJL maintainers to publish API you need.



 Comments   
Comment by Petr Pisar [ 02/Apr/15 ]

I probably forgot to attach it. Here it is.

Comment by A. Jesse Jiryu Davis [ 01/Apr/15 ]

Thanks ppisar, I think this is a duplicate of CDRIVER-597 which we're already considering as a priority for us in the medium term.

YAJL needs to be more consistent about letting us configure its allocator (CDRIVER-595 – YAJL has a few places where it calls malloc, not its configurable YA_MALLOC macro). Also, we've modified it to support some error-recovery when transcoding a stream of JSON documents to BSON. We'll look into fixing these issues upstream so we can use the system YAJL when available.

Comment by Hannes Magnusson [ 01/Apr/15 ]

ppisar Did you forget to attach the patch?

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