-
Type:
Improvement
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: Needs Further Definition
-
Component/s: Internal Code
-
None
-
Service Arch
-
Dev Tools 2019-05-20, Dev Tools 2019-06-03, Dev Tools 2019-06-17, Dev Tools 2019-09-09
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
MONGO_INITIALIZER has some unnecessary API complexity.
We don't need:
MONGO_INITIALIZER_WITH_PREREQUISITES
MONGO_INITIALIZER_GENERAL.
`MONGO_INITIALIZER` can instead take a name and 2 optional parameters.
MONGO_INITIALIZER(name)
MONGO_INITIALIZER(name,prereqs)
MONGO_INITIALIZER(name,prereqs,dependents)
The preprocessor can handle this with a `_VA_ARGS_` arity selector idiom.
We do not need the make_string_vector.h,cpp files at all.
We can remove parens from prereqs and dependents preprocessor-tuples with the preprocessor, and rely on vector<string> to brace-init in place.
This would eliminate the need to have the primitive NULL-terminated va_arg list API.
We can just have the MONGO_INITIALIZER macro directly create `vector<string>` to give the registration API as temporaries and we can more gracefully handle empty lists as () instead of (NULL). At that point we don't need the MONGO_NO_PREREQUISITES or MONGO_NO_DEPENDENTS macros because the `()` is easier to remember than `(NULL)`.
- duplicates
-
SERVER-47778 have MONGO_INITIALIZERs throw to indicate failure
-
- Closed
-
- is duplicated by
-
SERVER-43077 problems with MONGO_MODULE_STARTUP_OPTIONS macros
-
- Closed
-
- split to
-
SERVER-47778 have MONGO_INITIALIZERs throw to indicate failure
-
- Closed
-