Skip to content

Commit f177ab1

Browse files
committed
SERVER-14533 Break the foundation-lasterror-network circular dependence in build system.
The dependence was most glaringly reflected in the unittest library's dependence list, and removing it from there required adding some missing library dependences to a few other C++ unittests.
1 parent 1d2bba9 commit f177ab1

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/mongo/db/repl/SConscript

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ env.Library(
1212

1313
env.Library('replication_executor',
1414
'replication_executor.cpp',
15-
LIBDEPS=['$BUILD_DIR/mongo/foundation'])
15+
LIBDEPS=['$BUILD_DIR/mongo/foundation',
16+
'$BUILD_DIR/mongo/hostandport'])
1617

1718
env.CppUnitTest('replication_executor_test',
1819
'replication_executor_test.cpp',
@@ -24,15 +25,20 @@ env.Library('repl_coordinator_impl',
2425
LIBDEPS=['$BUILD_DIR/mongo/db/common',
2526
'$BUILD_DIR/mongo/foundation',
2627
'$BUILD_DIR/mongo/server_options_core',
27-
'replication_executor'])
28+
'repl_coordinator_interface',
29+
'replication_executor',
30+
])
2831

2932
env.CppUnitTest('repl_coordinator_impl_test',
3033
'repl_coordinator_impl_test.cpp',
3134
LIBDEPS=['repl_coordinator_impl',
3235
'replmocks'])
3336

3437
env.Library('repl_coordinator_interface',
35-
'repl_coordinator.cpp')
38+
['repl_coordinator.cpp',],
39+
LIBDEPS=[
40+
'$BUILD_DIR/mongo/hostandport',
41+
])
3642

3743
env.Library('repl_coordinator_global',
3844
'repl_coordinator_global.cpp',
@@ -54,6 +60,7 @@ env.Library('replica_set_config',
5460
],
5561
LIBDEPS=[
5662
'$BUILD_DIR/mongo/bson',
63+
'$BUILD_DIR/mongo/hostandport',
5764
])
5865

5966
env.CppUnitTest('replica_set_config_test',

src/mongo/unittest/SConscript

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@
22

33
Import("env")
44

5-
# TODO(sverch): 'lasterror' should not be required by 'foundation'. Even if it is it should be
6-
# depended on directly rather than here, but we currently have a triangle dependency between
7-
# 'network', 'foundation' and 'lasterror'. assert_util.cpp depends on lasterror.cpp which depends
8-
# on sock.cpp which depends on assert_util.cpp. Eventually we want to have an assertion library
9-
# that does not depend on internal server code, and then this can go away.
105
env.Library("unittest", ['unittest.cpp', 'temp_dir.cpp'],
116
LIBDEPS=['$BUILD_DIR/mongo/foundation',
12-
'$BUILD_DIR/mongo/lasterror',
137
'$BUILD_DIR/mongo/util/options_parser/options_parser',
148
])
159

0 commit comments

Comments
 (0)