[SERVER-45301] Not all expected aliases are present in the ninja generator output Created: 26/Dec/19  Updated: 29/Oct/23  Resolved: 13/Feb/20

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 4.3.4

Type: Bug Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Mathew Robinson (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-45048 Cleanup artifacts.tgz and remove brid... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

I generated the ninja file as follows:

python3 buildscripts/scons.py --implicit-cache --build-fast-and-loose=on --dbg=on --opt=on --variables-files="/home/andrew/.scons/site_scons/mongo_custom_variables.py etc/scons/mongodbtoolchain_stable_clang.vars" --install-mode=hygienic --link-model=object VERBOSE=1 CCACHE=ccache --ninja new.build.ninja

But looking for the included aliases, it seems only a small set were included:

grep 'build install-' new.build.ninja
build install-all-meta: phony | build/install/lib/libmurmurhash3.a build/install/lib/libbase_s2.a $
build install-common-meta: phony | build/install/README build/install/THIRD-PARTY-NOTICES $
build install-all-dev: phony | build/install/lib/libmurmurhash3.a build/install/lib/libbase_s2.a $
build install-all: phony | build/install/bin/wt build/install/bin/base_test $
build install-all-base: phony | build/install/share/doc/mongo_embedded/LICENSE-Community.txt $
build install-common-base: phony | generated-sources build/install/README $
build install-common: phony | install-common-base $
build install-common-dev: phony | install-common install-common-base $

I don't see install-servers there, for instance.

Sprint: Dev Platform 2020-01-13, Dev Platform 2020-01-27, Dev Platform 2020-02-10, Dev Platform 2020-02-24
Participants:

 Description   

Some scons level aliases that I would expect to see included in the ninja file when using hygeinic builds, like install-servers, don't seem to be included.



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

Author:

{'name': 'Mathew Robinson', 'email': 'chasinglogic@gmail.com'}

Message: SERVER-45301 Not all expected aliases are present in the ninja generator output
Branch: master
https://github.com/mongodb/mongo/commit/12b63497b80c46f31cb1ece3a23887e50a129504

Comment by Andrew Morrow (Inactive) [ 04/Jan/20 ]

mathew.robinson -

I did a little more thinking on this one, and I now understand the observed behavior, though I'm not sure how we ought to fix it. The Ninja generator is, basically, doing the right thing. We feed it install-all-meta as the root alias from which to generate. And Ninja correctly finds all the alias dependencies of install-all-meta: the other roles in the all component, and the role facets of the common component (because the all component, like every other component, depends on the common component on a role-by-role basis).

The issue is that other components, like dist, servers, etc., are not in fact dependencies of install-all-meta, so the Ninja generator never sees them during its dependency walk and never emits rules for them into the generated Ninja file.

We definitely want these targets in the generated Ninja file, so we will need to think about what the right way to accomplish that might be.

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