[SERVER-50010] Mongodb build should have specific ninja REGENERATE rule Created: 29/Jul/20  Updated: 29/Oct/23  Resolved: 26/Aug/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.7.0, 4.4.2

Type: Improvement Priority: Major - P3
Reporter: Daniel Moody Assignee: Daniel Moody
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Dev Platform 2020-08-24, Dev Platform 2020-09-07
Participants:

 Description   

The Mongodb build may want a more specific list of dependencies to determine when to regenerate the ninja file.

In SERVER-49493, the ninja tool made use of a depfile to push the SConstruct and SConscript files into a ninja depfile. This allowed the SConscripts to be removed (e.g removing the enterprise symlink) and still have a valid ninja file that could regenerate itself with the new changes.

However the creation of the depfile for the build.ninja file were generic and mongodb build may want something more specific. A list from the old ninja modules captures some interesting points: https://github.com/RedBeard0531/mongo_module_ninja/blob/master/build.py#L1336-L1362 but may be unnecessary. Look through that list and create new custom REGENERATE rule in the SConstruct that captures necessary items from the list and also consider if there are other files which we would want to cause a regeneration of the build.ninja file from.

Note that it's not known or tested if overwriting a hardcoded rule such as REGENERATE with the NinjaRule custom rule generator will work and may need some tweaking in ninja_next.py to support this.



 Comments   
Comment by Githook User [ 13/Oct/20 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-50363 Merge --build-tools=next into stable

Merging the following fixes into the stable version of the build tools
and migrate fully from --ninja=next to the --build-tools=next:

(cherry picked from commit 78bb3f3c8a658a5a9fec8d55864e426382f68bd0)
Branch: v4.4
https://github.com/mongodb/mongo/commit/e7f6696a96db5438a269c5e67a06ff9e05cb897a

Comment by Githook User [ 07/Oct/20 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-50363 Merge --build-tools=next into stable

Merging the following fixes into the stable version of the build tools
and migrate fully from --ninja=next to the --build-tools=next:

(cherry picked from commit 78bb3f3c8a658a5a9fec8d55864e426382f68bd0)
Branch: v4.4
https://github.com/mongodb/mongo/commit/7b93770e0835087c023ae3e3f36eeb46d204767f

Comment by Githook User [ 06/Oct/20 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-50363 Merge --build-tools=next into stable

Merging the following fixes into the stable version of the build tools
and migrate fully from --ninja=next to the --build-tools=next:

Comment by Githook User [ 09/Sep/20 ]

Author:

{'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}

Message: SERVER-50010 Added mechanism for custom deps for REGENERATE rule

(cherry picked from commit fff906108611c79956cd5bd7dc68aada59eff361)
Branch: v4.4
https://github.com/mongodb/mongo/commit/943296032bffc8b767c11961ef5eb8ff8fea9554

Comment by Githook User [ 26/Aug/20 ]

Author:

{'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}

Message: SERVER-50010 Added mechanism for custom deps for REGENERATE rule
Branch: master
https://github.com/mongodb/mongo/commit/fff906108611c79956cd5bd7dc68aada59eff361

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