-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Go Drivers
-
Not Needed
-
The deprecation part of GODRIVER-3142.
Context
Currently it's possible to change the behavior of BSON encoding and decoding by modifying bson.DefaultRegistry. That behavior is extremely difficult to test and is easy to break unexpectedly. There are already APIs for setting registries, both for BSON encoders/decoders and for a mongo.Client. We should direct all users to modify BSON registries using those official configurations to prevent unintended behavior regressions when modifying how BSON registries are configured.
Definition of done
- Deprecate bson.DefaultRegistry in the next 1.x release. Add a deprecation notice that directs users to use SetRegistry on a bson.Encoder, bson.Decoder, or options.ClientOptions.
Pitfalls
- Some people use bson.DefaultRegistry to either access the default registry behavior or to globally modify the default registry. Those users will be impacted by this change and will need to configure their registry using another mechanism.
- is related to
-
GODRIVER-3142 Remove "bson.DefaultRegistry"
- Closed