[GODRIVER-2715] Deprecate "bsoncodec.RegistryBuilder" Created: 23/Dec/22  Updated: 28/Oct/23  Resolved: 10/Apr/23

Status: Closed
Project: Go Driver
Component/s: BSON
Affects Version/s: None
Fix Version/s: 1.12.0

Type: Improvement Priority: Unknown
Reporter: Matt Dale Assignee: Matt Dale
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
Epic Link: Go Driver 2.0 Prep
Quarter: FY24Q1
Documentation Changes: Needed
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
The "bsoncodec.RegistryBuilder" type is deprecated (starting with Go Driver v1.12). Users should use the existing "bson.Registry" type instead, which now offers the same functionality with slightly different names.

There is documentation and some examples of the BSON "Registry" system in the MongoDB Go Driver bsoncodec package that the Working with BSON Go driver fundamentals page links to. However, that information will be out of date as of Go Driver v1.12, so the link should be updated (new documentation link TBD).

2. Would you like the user to see examples of the syntax and/or executable code and its output?
Link to the new pkg.go.dev documentation and examples (new documentation link TBD).

3. Which versions of the driver/connector does this apply to?
Go Driver v1.12+


 Description   

The separation between the bsoncodec.RegistryBuilder type and the bsoncodec.Registry type is unnecessary. Merge the RegistryBuilder API into the Registry API and deprecate the RegistryBuilder type and all functions on that type. Additionally, the "fluent" API currently supported by the RegistryBuilder type doesn't make as much sense on the Registry type, so remove the ability to call each function "fluently".

Definition of done:

  • Add all functions from bsoncodec.RegistryBuilder to bsoncodec.Registry, removing the *RegistryBuilder return type (i.e. remove the "fluent" API).
  • Deprecate the bsoncodec.RegistryBuilder type and all functions on that type. Recommend using the bsoncodec.Registry type instead.


 Comments   
Comment by Githook User [ 10/Apr/23 ]

Author:

{'name': 'Matt Dale', 'email': '9760375+matthewdale@users.noreply.github.com', 'username': 'matthewdale'}

Message: GODRIVER-2715 Deprecate RegistryBuilder and move all functionality to Registry. (#1189)

Co-authored-by: Preston Vasquez <prestonvasquez@icloud.com>
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/0ad3c046898d089627c1226c0b341838ed457ace

Comment by Matt Dale [ 23/Feb/23 ]

PR: https://github.com/mongodb/mongo-go-driver/pull/1189

Generated at Thu Feb 08 08:39:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.