Details
-
Task
-
Resolution: Declined
-
Major - P3
-
None
-
None
-
None
-
None
-
Service Arch
Description
For example, I want to define the following:
types:
|
fcv_string:
|
bson_serialization_type: string
|
description: >-
|
Ensures that the version strings in featureCompatibilityVersion documents
|
serialize/deserialize to a fixed set of string values
|
cpp_type: "ServerGlobalParams::FeatureCompatibility::Version"
|
serializer: "::mongo::FeatureCompatibilityVersionParser::serializeVersion"
|
deserializer: "mongo::FeatureCompatibilityVersionParser::parseVersion"
|
ServerGlobalParams::FeatureCompatibility::Version is of type C++ enum, which has no default constructor/initialize value. Therefore, IDL ends up generating C++ code that will not compile:
build/opt/mongo/db/commands/set_feature_compatibility_version_gen.cpp:42:50: error: variable 'localCmdType' is uninitialized when used here [-Werror,-Wuninitialized]
|
SetFeatureCompatibilityVersionCommand object(localCmdType);
|
^~~~~~~~~~~~
|
build/opt/mongo/db/commands/set_feature_compatibility_version_gen.cpp:41:5: note: variable 'localCmdType' is declared here
|
ServerGlobalParams::FeatureCompatibility::Version localCmdType;
|
^
|
It would be nice for IDL to support C++ Enum types in this regard.
Attachments
Issue Links
- related to
-
SERVER-65412 Complete TODO listed in SERVER-50101
-
- Open
-
-
SERVER-62219 Complete TODO listed in SERVER-50101
-
- Backlog
-