Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2715

Deprecate "bsoncodec.RegistryBuilder"

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.12.0
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • Needed
    • Hide

      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+

      Show
      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+

      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.

            Assignee:
            matt.dale@mongodb.com Matt Dale
            Reporter:
            matt.dale@mongodb.com Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: