[GODRIVER-592] Reverse Dependencies of bson and bsoncodec Created: 08/Oct/18 Updated: 13/Oct/18 Resolved: 13/Oct/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | BSON |
| Affects Version/s: | 0.0.15 |
| Fix Version/s: | 0.0.17 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kristofer Brandow (Inactive) | Assignee: | Kristofer Brandow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
TheĀ bsoncodec package currently depends on the bson package. This means that the types within the bson package cannot marshal themselves. This causes problems for constructing *bson.Element's from an empty interface, but it also means that a ToExtJSON method cannot be part of a *bson.Document. Additionally, with functions like Marshal and Unmarshal being part of the bsoncodec package, users are required to import both packages for most of their BSON usage. This includes the Encoder and Decoder types. To fix these problems and prepare for further improvements to the BSON library, reverse the dependency between bson and bsoncodec to have the bson package depend on the bsoncodec package. Split the ValueReader and ValueWriter types into their own package called bsonrw and create a public test implementation in a package called bsonrwtest. |
| Comments |
| Comment by Kristofer Brandow (Inactive) [ 13/Oct/18 ] |
|
Code Review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/428114. |
| Comment by Githook User [ 13/Oct/18 ] |
|
Author: {'name': 'Kris Brandow', 'email': 'kris@mongodb.com', 'username': 'skriptble'}Message: Reverse dependencies between bsoncodec and bson This commit reverses the dependency between the bson and bsoncodec The bsoncodec package was split into the bsonrw and bsoncodec packages. The llbson package is renamed bsoncore and moved out of internal. This Change-Id: I1e2dabc83cae9705fc062a6b763e0d2b91cde3ef |