[SERVER-81217] Create basic scons-to-bazel rule generator Created: 19/Sep/23  Updated: 16/Nov/23

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

Type: Improvement Priority: Major - P3
Reporter: Zack Winter Assignee: Zack Winter
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

We now have a script that extracts and lists out bazel conversion candidate targets (scons targets without dependencies that haven't been converted to bazel): https://github.com/10gen/mongo/pull/15564

We're now ready to start converting individual targets. Since there are 1140 scons targets that need to be converted, an entire manual process is going to be painful.

Create a script that does a best-effort attempt at generating bazel rules for all bazel conversion candidates. The goal is not to generate a perfect rule for every target. This should create mostly-correct rules for most scons targets, but many will likely need human modification.

Rough outline of the execution plan:

    • Query each target's src files from sconscripts (bazel output: "srcs")
    • Query each target's dependency targets from libdeps (bazel output: "deps")
    • Inspect the #includes of each src file (bazel output: "hdrs")
    • Write the newly generated bazel rule to stdout

 


Generated at Thu Feb 08 06:45:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.