[SERVER-11637] Make libraries composable Created: 08/Nov/13  Updated: 06/May/15  Resolved: 06/May/15

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Shaun Verch Assignee: Unassigned
Resolution: Duplicate Votes: 2
Labels: build-needs-definition, build-planning
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-10307 Break unlisted circular dependency be... Closed
Duplicate
duplicates SERVER-9666 Reorganize relationship between sourc... Closed
Related
related to SERVER-13863 JS engines shouldn't be linked in to ... Closed
related to SERVER-11538 libserver_options.a does not depend o... Closed
related to SERVER-9704 break out socket "library" and use it... Closed
Participants:

 Description   

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.



 Comments   
Comment by Andrew Morrow (Inactive) [ 06/May/15 ]

Yes, more or less. Can you link them, then close this a as a duplicate.

Comment by Ernie Hershey [ 06/May/15 ]

acm do you know if SERVER-9666 will cover this?

Comment by auto [ 09/Nov/13 ]

Author:

{u'username': u'Zarkantho', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}

Message: SERVER-11637: Consolidate unittest crutches into crutch.cpp
Branch: master
https://github.com/mongodb/mongo/commit/989fd71aa5931a61f2028e51b3ffc2b144cd9cfa

Comment by auto [ 09/Nov/13 ]

Author:

{u'username': u'Zarkantho', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}

Message: SERVER-11637: Removed NO_CRUTCH from a bunch of tests
Branch: master
https://github.com/mongodb/mongo/commit/151237b24af3a2f5a2a2076b651f4e5745cc45f9

Comment by auto [ 09/Nov/13 ]

Author:

{u'username': u'Zarkantho', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}

Message: SERVER-11637: Move lasterror.cpp into its own library and add comment about dependency triangle
Branch: master
https://github.com/mongodb/mongo/commit/3d28d63ec6fb6f285d279b529f945f43ec3b2b48

Comment by auto [ 09/Nov/13 ]

Author:

{u'username': u'Zarkantho', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}

Message: SERVER-11637: Move some base files that libfoundation.a needs to link into libfoundation.a
Branch: master
https://github.com/mongodb/mongo/commit/fcd5d158870368b6957fa0f2db9f58a5559a14be

Generated at Thu Feb 08 03:26:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.