[SERVER-54487] Developers shouldn't need to deal with shim_foo.cpp files Created: 12/Feb/21  Updated: 29/Oct/23  Resolved: 18/Aug/21

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

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

Backwards Compatibility: Fully Compatible
Sprint: Dev Platform 2021-08-23
Participants:

 Description   

They are really just a solution to library building tools not liking libraries with no files. This should be handled as an internal detail of the build system rather than making it the responsibility of every developer to know about this limitation.

Possible options to address this (non-exhaustive):

  • Make Library() auto generate shim files as needed when a "library" has no source files
  • Make the LIBDEPS logic deal with these "libraries" by eliminating them from the dependency graph that scons is aware of and just propagate their LIBDEPS onward.


 Comments   
Comment by Nehal J Wani [ 07/Nov/21 ]

Hello acm, I've opened SERVER-61304 with the requested details.

Comment by Andrew Morrow (Inactive) [ 07/Nov/21 ]

nehaljw.kkd1@gmail.com - That's definitely not intended. Could you please file a new JIRA ticket in the SERVER project and we will investigate? Please include the SCons command line you used and the result you observed, and we will investigate.

Comment by Nehal J Wani [ 07/Nov/21 ]

Please note that the following commit has completely broken --use-system-<lib> option:

b7aeb64343266da73e29632ef96ebfad5df91495 is the first bad commit
commit b7aeb64343266da73e29632ef96ebfad5df91495
Author: Andrew Morrow <acm@mongodb.com>
Date: Tue Aug 10 13:57:18 2021 -0400
SERVER-54487 Third-party shim libraries do not need to be linked to or installed
site_scons/libdeps.py | 8 +++++++-
 src/third_party/SConscript | 12 +++++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 18/Aug/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-54487 Third-party shim libraries do not need to be linked to or installed
Branch: master
https://github.com/mongodb/mongo/commit/b7aeb64343266da73e29632ef96ebfad5df91495

Comment by Andrew Morrow (Inactive) [ 28/Jul/21 ]

The first part of this has already been implemented as a side effect of work under SERVER-48291 - there is no longer any need to declare a new shim file for each new third party library on v5.0 and master. The second part is actually as easy as adding a new type of libdeps tag.

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