[SERVER-27497] Scope SCons Environment modifications Created: 22/Dec/16 Updated: 05/Apr/17 Resolved: 03/Jan/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Platforms 2017-01-23 |
| Participants: |
| Description |
|
Right now, we make available the top level Environment by calling Export('env') in the top level SConstruct, and then subordinate SConscript files obtain it by calling Import('env'). This means that if a sloppy SConscript file directly modifies the global env, those changes are propagated to all later SConscript files that import the env, which was probably not the intention. To fix this, we should:
By following this pattern everywhere, it becomes impossible for changes to escape the scope for which they were intended. In the worst case, a malformed subordinate SConscript could inject into its parent scope, but no further. |
| Comments |
| Comment by Githook User [ 03/Jan/17 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: |
| Comment by Githook User [ 03/Jan/17 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: |