[SERVER-82638] Create ninja -> bazel integration Created: 31/Oct/23  Updated: 29/Nov/23  Resolved: 16/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Task Priority: Minor - P4
Reporter: Daniel Moody Assignee: Daniel Moody
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

Ninja is the primary tool developers use to build the server. Our ninja tool generates SCons->ninja syntax.

 

We will (similar to scons calling bazel), have ninja call bazel to build certain targets which have already been transcribed to the bazel build.

 

This will prove a little difficult to divulge the correct information to call bazel with. Ninja is a binary which we can not easily modified. It would require making a custom pip repo, fork and modify the ninja source code, and create release binaries on various platforms.

 

The proposed solution will be to use the same method that was used in the developer workflow metrics project, where the ninja binary is intercepted via a hook and then finally called after the command line has been processed. Additionally to that we will need a way to discover the desired dependencies of any given target passed on the command line. The ninja file contains a explicit graph of all dependencies, ninja traverses this graph in a fraction of a second. We may be able to ask ninja directly for the dependencies of a given target or traverse the ninja files ourselves.

 



 Comments   
Comment by Githook User [ 11/Nov/23 ]

Author:

{'name': 'Daniel Moody', 'email': 'dmoody256@gmail.com', 'username': 'dmoody256'}

Message: SERVER-82638 add ninja to bazel integration support.
Branch: master
https://github.com/mongodb/mongo/commit/c431f99d1fe5791f6422ae07a4d848e7092b3ceb

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