Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-26258

Move ICU initializer out of generated source file icu_init.cpp

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Query Execution
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      icu_init.cpp is generated by generate_icu_init_cpp.py. Unfortunately, this means any C++ source code in that Python script is not checked by lint, clang-format, nor by error_codes.py. In fact, we already have a duplicate fassert code in our codebase due to this fact.

      To fix this, we should move the static (unchanging) MONGO_INITIALIZER to a new static icu_init.cpp source file, and reserve the generated source file only to define an extern char array for the binary ICU data. We should create a header file as well to declare the extern'd symbol. This will avoid having duplicate fassert codes in the future.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: