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

Make libraries composable

      Currently, our libraries that we make as part of our build process are not composable. This is a result of three separate issues.

      1. Libraries don't always list libraries that they depend on as LIBDEPS
      2. Libraries can be "codependent" on another library (circular dependency)
      3. Libraries can depend on symbols at a higher level (multiple definitions of the same symbol)

      This prevents us from:
      a. Writing unittests that only pull in the dependencies they need
      b. Writing mongo tools that only pull in the dependencies they need
      c. Writing mongo tools that have a clear boundary between the tool code and the server code
      d. Clearly defining/unittesting the external interface to a library
      e. Replacing libraries independently
      f. Proving that changes to unrelated libraries will not affect each other (for example, changes to the C++ driver should not break journaling, and that should be clear from our library structure)
      g. Sharing the same unittested code effectively (currently the fact that we have to define "stubs" to make the build link means that code that appears to be properly shared calls code that is not shared. For example, "inShutdown" is defined in 14 different places, with different implementations. Some implementations are thread safe, and some implementations are static initialization safe, and it is unclear whether we are depending on that behavior)
      f. Enabling the compilation of a variety of different executables, with behavior and functionality based on what libraries and subsystems the executable is compiled with
      g. Making the libraries into shared libraries to reduce build times during development

      I think this ticket should be split into sub tasks, but this parent ticket can keep the problem description and any general comments on this task.

            Assignee:
            Unassigned Unassigned
            Reporter:
            sverch Shaun Verch
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: