Commit 7ebee67
committed
Add missing cmake dependencies to match BUCK build configuration
This commit adds missing dependencies to cmake targets that were present
in the corresponding BUCK targets but missing in cmake. These dependencies
were detected using the new `buck_cmake_dep_checker.py` tool.
This commit fixes all but 11 of the dependencies problems found by the
tool. The remaining 11 will be fixed in a subsequent change where a bit
of restructuring is needed in the cmake files to match the BUCK files
more closely.
## Fixes in cmake/Agent.cmake:
1. setup_thrift: Added thrift_method_rate_limit
fboss/agent/BUCK has `//fboss/lib:thrift_method_rate_limit` in exported_deps for setup_thrift
2. utils: Added hw_switch_fb303_stats
fboss/agent/BUCK has `//fboss/agent/hw:hw_switch_fb303_stats` in exported_deps for utils
3. stats: Added common_utils
fboss/agent/BUCK has `//fboss/lib:common_utils` in exported_deps for stats
4. ecmp_resource_manager: Added ref_map, stats, and utils
fboss/agent/BUCK has `//fboss/lib:ref_map`, `:stats`, and `:utils` in exported_deps
for ecmp_resource_manager
5. platform_base: Added utils, product_info, and fboss_event_base
fboss/agent/BUCK has `:utils`, `//fboss/lib/platforms:product-info`, and `:fboss_event_base`
in exported_deps for platform_base
6. hw_switch_handler: Added fboss_event_base
fboss/agent/BUCK has `:fboss_event_base` in exported_deps for hw_switch_handler
7. switchinfo_utils: Added fboss_error and load_agent_config
fboss/agent/BUCK has `:fboss-error` and `:load_agent_config` in exported_deps for switchinfo_utils
8. core: Added packet_factory to core_libs variable
fboss/agent/BUCK has `//fboss/agent/packet:packet_factory` in deps for core
9. fboss_event_base: Added agent_features
fboss/agent/BUCK has `:agent_features` in exported_deps for fboss_event_base
10. agent_netwhoami: Added common_file_utils
fboss/agent/BUCK has `//fboss/lib:common_file_utils` in exported_deps for agent_netwhoami
## Fixes in cmake/AgentHw.cmake:
11. hw_fb303_stats: Added error
fboss/agent/hw/BUCK has `//fboss/agent:fboss-error` in exported_deps for hw_fb303_stats
12. hw_port_fb303_stats: Added hw_fb303_stats and fboss_types
fboss/agent/hw/BUCK has `:hw_fb303_stats` and `//fboss/agent:fboss-types`
in exported_deps for hw_port_fb303_stats
## Fixes in cmake/AgentHwMock.cmake:
13. hw_mock: Added handler
fboss/agent/hw/mock/BUCK has `//fboss/agent:handler` in exported_deps for mock
## Fixes in cmake/AgentHwSaiHwTest.cmake:
14. agent_hw_test_thrift_handler: Added hw_switch
fboss/agent/hw/bcm/tests/BUCK has `//fboss/agent:hw_switch` in exported_deps
for agent_hw_test_thrift_handler
## Fixes in cmake/AgentHwSwitchAsics.cmake:
15. switch_asics: Added agent_features, error, and fboss_types
fboss/agent/hw/switch_asics/BUCK has `//fboss/agent:agent_features`,
`//fboss/agent:fboss-error`, and `//fboss/agent:fboss-types` in exported_deps for switch_asics
## Fixes in cmake/AgentHwTest.cmake:
16. config_factory: Added acl_test_utils, split_agent_thrift_syncer, multiswitch_test_server
fboss/agent/hw/test/BUCK has `//fboss/agent/test/utils:acl_test_utils`,
`//fboss/agent:split_agent_thrift_syncer`, and `//fboss/agent/test:multiswitch_test_server`
in exported_deps for config_factory
17. hw_packet_utils: Added agent_test_utils
fboss/agent/hw/test/BUCK has `//fboss/agent/test:utils` in exported_deps for hw_packet_utils
18. hw_copp_utils: Added copp_test_utils and hw_packet_utils
fboss/agent/hw/test/BUCK has `//fboss/agent/test/utils:copp_test_utils` and
`:hw_packet_utils` in exported_deps for hw_copp_utils
19. hw_link_state_toggler: Added test_ensemble_if
fboss/agent/test/BUCK has `:test_ensemble_if` in exported_deps for linkstate_toggler
20. load_balancer_utils: Added load_balancer_test_utils
fboss/agent/hw/test/BUCK has `//fboss/agent/test/utils:load_balancer_test_utils`
in exported_deps for load_balancer_utils
## Fixes in cmake/AgentLldp.cmake:
21. lldp: Added agent_features and cow_storage
fboss/agent/lldp/BUCK has `//fboss/agent:agent_features` and
`//fboss/thrift_cow/storage:cow_storage` in exported_deps for lldp
## Fixes in cmake/AgentPacket.cmake:
22. packet_factory: Added hw_switch
fboss/agent/packet/BUCK has `//fboss/agent:hw_switch` in deps for packet_factory
## Fixes in cmake/AgentPlatformsCommon.cmake:
23. platform_mapping_utils: Added platform_mode
fboss/agent/platforms/common/BUCK has `//fboss/lib/platforms:platform_mode`
in exported_deps for platform_mapping_utils
## Fixes in cmake/AgentPlatformsCommonGalaxy.cmake:
24. galaxy_platform_mapping: Added utils
fboss/agent/platforms/common/galaxy/BUCK has `//fboss/agent:utils`
in exported_deps for galaxy_platform_mapping
## Fixes in cmake/AgentPlatformsCommonMinipack.cmake:
25. minipack_platform_mapping: Added platform_mode
fboss/agent/platforms/common/minipack/BUCK has `//fboss/lib/platforms:platform_mode`
in exported_deps for minipack_platform_mapping
## Fixes in cmake/AgentPlatformsCommonUtils.cmake:
26. wedge_led_utils: Added wedge_transceiver
fboss/agent/platforms/common/utils/BUCK has `//fboss/qsfp_service/platforms/wedge:wedge-transceiver`
in exported_deps for wedge-led-utils
## Fixes in cmake/AgentRib.cmake:
27. standalone_rib: Added fboss_event_base and utils
fboss/agent/rib/BUCK has `//fboss/agent:fboss_event_base` and `//fboss/agent:utils`
in exported_deps for standalone_rib
28. network_to_route_map: Added state
fboss/agent/rib/BUCK has `//fboss/agent/state:state` in exported_deps
for network_to_route_map
## Fixes in cmake/AgentState.cmake:
29. state: Added address_utils
fboss/agent/state/BUCK has `//fboss/agent:address_utils` in exported_deps for state
30. state_utils: Added hwswitch_matcher and state
fboss/agent/state/BUCK has `:state` and `//fboss/agent:hwswitch_matcher`
in exported_deps for state_utils
## Fixes in cmake/AgentTest.cmake:
31. agent_test_utils: Added route_distribution_gen
fboss/agent/test/BUCK has `:route_distribution_gen` in exported_deps for utils
32. multinode_tests: Added agent_test_utils, hw_copp_utils, hw_packet_utils, load_balancer_utils
fboss/agent/test/BUCK has `:utils`, `//fboss/agent/hw/test:hw_copp_utils`,
`//fboss/agent/hw/test:hw_packet_utils`, and `//fboss/agent/hw/test:load_balancer_utils`
in exported_deps for multinode_tests
33. agent_ensemble: Added sw_agent_initializer
fboss/agent/test/BUCK has `//fboss/agent:sw_agent_initializer` in exported_deps
for agent_ensemble
34. linkstate_toggler: Added test_ensemble_if
fboss/agent/test/BUCK has `:test_ensemble_if` in exported_deps for linkstate_toggler
35. system_scale_test_utils: Added trap_packet_utils
fboss/agent/test/utils/BUCK has `:trap_packet_utils` in exported_deps
for system_scale_test_utils
## Fixes in cmake/AgentTestAgentHwTests.cmake:
36. agent_hw_test_src: Added load_balancer_test_runner_h
fboss/agent/test/agent_hw_tests/BUCK has `//fboss/agent/test/utils:load_balancer_test_runner_h`
in exported_deps for agent_hw_test_src
## Fixes in cmake/AgentTestLinkTests.cmake:
37. link_tests: Added trap_packet_utils, hw_qos_utils, hw_test_fabric_utils
fboss/agent/test/link_tests/BUCK has `//fboss/agent/test/utils:trap_packet_utils`,
`//fboss/agent/hw/test:hw_qos_utils`, and `//fboss/agent/hw/test:hw_test_fabric_utils`
in exported_deps for link_tests
38. agent_ensemble_link_tests: Added trap_packet_utils and agent_test_utils
fboss/agent/test/link_tests/BUCK has `//fboss/agent/test/utils:trap_packet_utils`
and `//fboss/agent/test:utils` in exported_deps for agent_ensemble_link_tests
## Fixes in cmake/AgentTestUtils.cmake:
39. traffic_policy_utils: Added copp_test_utils
fboss/agent/test/utils/BUCK has `:copp_test_utils` in exported_deps for traffic_policy_utils
40. qos_test_utils: Added voq_test_utils, resourcelibutil, and pkt_test_utils
fboss/agent/test/utils/BUCK has `:voq_test_utils`, `//fboss/agent/test:resourcelibutil`,
and `:pkt_test_utils` in exported_deps for qos_test_utils
41. l2learn_observer_util: Added agent_ensemble
fboss/agent/test/utils/BUCK has `//fboss/agent/test:agent_ensemble`
in exported_deps for l2learn_observer_util
42. mac_test_utils: Added core
fboss/agent/test/utils/BUCK has `//fboss/agent:core` in exported_deps for mac_test_utils
43. pfc_test_utils: Added test_ensemble_if, agent_ensemble, and resourcelibutil
fboss/agent/test/utils/BUCK has `//fboss/agent/test:test_ensemble_if`,
`//fboss/agent/test:agent_ensemble`, and `//fboss/agent/test:resourcelibutil`
in exported_deps for pfc_test_utils
## Fixes in cmake/LedService.cmake:
44. led_manager_lib: Added wedge400_fpga and common_port_utils
fboss/led_service/BUCK has `//fboss/lib/fpga:wedge400_fpga` and
`//fboss/lib:common_port_utils` in exported_deps for led_manager
## Fixes in cmake/Lib.cmake:
45. common_thrift_utils: Added thrift_service_client
fboss/lib/BUCK has `//fboss/lib/thrift_service_client:thrift-service-client`
in exported_deps for common_thrift_utils
46. common_utils: Added common_file_utils
fboss/lib/BUCK has `:common_file_utils` in exported_deps for common_utils
## Fixes in cmake/LibFpga.cmake:
47. fpga_multi_pim_container: Added fpga_device and qsfp_stats
fboss/lib/fpga/BUCK has `:fpga_device` and `//fboss/qsfp_service:stats`
in exported_deps for multi_pim_container
48. fb_fpga_i2c: Added i2c_ctrl and i2_api
fboss/lib/fpga/BUCK has `//fboss/lib/i2c:i2c_ctrl` and `//fboss/lib/usb:i2-api`
in exported_deps for fb_fpga_i2c
49. wedge400_i2c: Added i2_api
fboss/lib/fpga/BUCK has `//fboss/lib/usb:i2-api` in exported_deps for wedge400_i2c
## Fixes in cmake/LibI2c.cmake:
50. i2c_ctrl: Added utils
fboss/lib/i2c/BUCK has `//fboss/agent:utils` in exported_deps for i2c_ctrl
## Fixes in cmake/LibPhy.cmake:
51. external_phy: Added mdio, alert_logger, and fboss_types
fboss/lib/phy/BUCK has `//fboss/mdio:mdio`, `//fboss/lib:alert_logger`,
and `//fboss/agent:fboss-types` in exported_deps for external_phy
## Fixes in cmake/PlatformBspTests.cmake:
52. bsp_test_utils: Added platform_manager_i2c_explorer
fboss/platform/bsp_tests/BUCK has `//fboss/platform/platform_manager:i2c_explorer`
in exported_deps for utils
## Fixes in cmake/PlatformPlatformChecks.cmake:
53. platform_check: Added platform_config_lib
fboss/platform/platform_checks/BUCK has `//fboss/platform/config_lib:config_lib`
in exported_deps for platform_check
## Fixes in cmake/PlatformPlatformManager.cmake:
54. platform_manager_i2c_explorer: Added platform_fs_utils
fboss/platform/platform_manager/BUCK has `//fboss/platform/helpers:platform_fs_utils`
in exported_deps for i2c_explorer
55. platform_manager_presence_checker: Added platform_fs_utils
fboss/platform/platform_manager/BUCK has `//fboss/platform/helpers:platform_fs_utils`
in exported_deps for presence_checker
## Fixes in cmake/QsfpService.cmake:
56-72. Added bsp_platform_mapping to 17 BSP targets:
meru400bfu_bsp, meru400bia_bsp, meru400biu_bsp, meru800bia_bsp,
meru800bfa_bsp, montblanc_bsp, icecube800bc_bsp, icetea800bc_bsp,
minipack3n_bsp, morgan800cc_bsp, janga800bic_bsp, tahan800bc_bsp,
tahansb800bc_bsp, nh4010_bsp, wedge800bact_bsp, wedge800cact_bsp,
ladakh800bcls_bsp
All these targets in fboss/lib/bsp/*/BUCK have `//fboss/lib/bsp:bsp_platform_mapping_lib`
in exported_deps (example: fboss/lib/bsp/meru400bfu/BUCK has this for meru400bfu_bsp)
73. qsfp_stats: Added fboss_types
fboss/qsfp_service/BUCK has `//fboss/agent:fboss-types` in exported_deps for stats
74. qsfp_bsp_core: Added gpiod_line and i2_api
fboss/lib/bsp/BUCK has `//fboss/lib:gpiod_line` and `//fboss/lib/usb:i2-api`
in exported_deps for bsp_core
75. transceiver_validator: Added alert_logger
fboss/qsfp_service/BUCK has `//fboss/lib:alert_logger` in exported_deps
for transceiver_validator
## Fixes in cmake/QsfpServiceTestHwTest.cmake:
76. hw_transceiver_utils: Added platform_mapping
fboss/qsfp_service/test/hw_test/BUCK has `//fboss/agent/platforms/common:platform_mapping`
in exported_deps for hw_transceiver_utils
## Fixes in cmake/ThriftCowVisitors.cmake:
77. thrift_cow_visitors: Added thrift_cow_serializer
fboss/thrift_cow/visitors/BUCK has `//fboss/thrift_cow/nodes:serializer`
in exported_deps for visitors
## Fixes in cmake/fsdb/FsdbClient.cmake:
78. fsdb_sub_mgr: Added fsdb_flags and thrift_service_client
fboss/fsdb/client/BUCK has `//fboss/fsdb/common:flags` and
`//fboss/lib/thrift_service_client:thrift-service-client` in exported_deps
for fsdb_sub_manager
## Fixes in cmake/fsdb/FsdbIf.cmake:
79. fsdb_model_cpp2: Added fsdb_common_cpp2 to DEPENDS
fboss/fsdb/if/oss/BUCK has `//fboss/fsdb/if:fsdb_common` in deps for fsdb_model
## Fixes in cmake/fsdb/FsdbOperInstantiations.cmake:
80. fsdb_cow_stats_sub_mgr: Added fsdb_cow_state_sub_mgr
fboss/fsdb/client/BUCK (fsdb_cow_stats_sub_manager target) has
`:fsdb_cow_state_sub_manager` in exported_deps
## Fixes in cmake/fsdb/FsdbServer.cmake:
81. fsdb_server: Added restart_time_tracker
fboss/fsdb/server/BUCK has `//fboss/lib/restart_tracker:restart_time_tracker`
in exported_deps for fsdb_server
## Fixes in cmake/fsdb/FsdbTests.cmake:
82. fsdb_test_subscriber: Changed fsdb_model_cpp2 to fsdb_model
fboss/fsdb/tests/utils/BUCK has `//fboss/fsdb/if:fsdb_model` in exported_deps
for fsdb_test_subscriber (fsdb_model includes both cpp2 types and thriftpath)
83. fsdb_test_clients: Changed fsdb_model_cpp2 to fsdb_model
fboss/fsdb/tests/client/BUCK has `//fboss/fsdb/if:fsdb_model` in exported_deps
for fsdb_test_clients
## New tool added:
`tools/buck_cmake_dep_checker.py` - A tool to detect missing dependencies
between Buck and cmake build systems by:
- Parsing BUCK and cmake files to extract targets and their dependencies
- Matching cmake targets to Buck targets based on source file overlap
- Identifying dependencies present in Buck but missing in cmake
- Supporting cmake variable expansion and transitive dependency analysis1 parent d08c9e3 commit 7ebee67
File tree
35 files changed
+882
-3
lines changed- cmake
- fsdb
- tools
35 files changed
+882
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| 101 | + | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
| |||
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
| 153 | + | |
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
| |||
174 | 179 | | |
175 | 180 | | |
176 | 181 | | |
| 182 | + | |
177 | 183 | | |
178 | 184 | | |
179 | 185 | | |
| |||
218 | 224 | | |
219 | 225 | | |
220 | 226 | | |
| 227 | + | |
221 | 228 | | |
| 229 | + | |
| 230 | + | |
222 | 231 | | |
223 | 232 | | |
224 | 233 | | |
| |||
370 | 379 | | |
371 | 380 | | |
372 | 381 | | |
| 382 | + | |
373 | 383 | | |
374 | 384 | | |
375 | 385 | | |
| |||
475 | 485 | | |
476 | 486 | | |
477 | 487 | | |
| 488 | + | |
478 | 489 | | |
479 | 490 | | |
480 | 491 | | |
| |||
504 | 515 | | |
505 | 516 | | |
506 | 517 | | |
| 518 | + | |
507 | 519 | | |
508 | 520 | | |
509 | 521 | | |
510 | 522 | | |
| 523 | + | |
511 | 524 | | |
512 | 525 | | |
| 526 | + | |
513 | 527 | | |
514 | 528 | | |
515 | 529 | | |
| |||
828 | 842 | | |
829 | 843 | | |
830 | 844 | | |
831 | | - | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
832 | 848 | | |
833 | 849 | | |
834 | 850 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
77 | 81 | | |
78 | 82 | | |
79 | 83 | | |
| 84 | + | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| |||
136 | 142 | | |
137 | 143 | | |
138 | 144 | | |
| 145 | + | |
139 | 146 | | |
140 | 147 | | |
141 | 148 | | |
| |||
174 | 181 | | |
175 | 182 | | |
176 | 183 | | |
| 184 | + | |
177 | 185 | | |
178 | 186 | | |
179 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
0 commit comments