[SERVER-55259] build.ninja should always be left in a clean state by scons even if interrupted Created: 17/Mar/21 Updated: 29/Oct/23 Resolved: 18/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 5.2.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Ryan Egesdahl (Inactive) |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Backport Requested: |
v5.1, v5.0, v4.4
|
||||
| Sprint: | Dev Platform 2021-09-06, Dev Platform 2021-09-20, Dev Platform 2021-10-04, Dev Platform 2021-10-18 | ||||
| Participants: | |||||
| Description |
|
Currently build.ninja is deleted by scons prior to rebuilding it. This means that if you interrupt it while it is being rebuilt, you can't just rerun ninja again, and instead must reinvoke scons, remembering any and all flags you previously passed it. Using SCons' Precious() helps here. In addition, you should write to a temporary file and rename on top of build.ninja when done writing to ensure that it is atomically replaced. |
| Comments |
| Comment by Githook User [ 15/Oct/21 ] |
|
Author: {'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}Message: |
| Comment by Githook User [ 15/Oct/21 ] |
|
Author: {'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}Message: Revert " This reverts commit c12d02757ceb26e611a7bafcd30d78db99d8778f. |
| Comment by Githook User [ 13/Oct/21 ] |
|
Author: {'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}Message: |
| Comment by Githook User [ 12/Oct/21 ] |
|
Author: {'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}Message: Revert " This reverts commit 13f0ae71f634409f2e219616ac489b45057d56bb. |
| Comment by Githook User [ 11/Oct/21 ] |
|
Author: {'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}Message: |
| Comment by Ryan Egesdahl (Inactive) [ 27/Aug/21 ] |
|
I couldn't find an open ticket that referenced build.ninja, so I will just work from this one. |
| Comment by Andrew Morrow (Inactive) [ 17/Mar/21 ] |
|
redbeard0531 - I think this was requested before somewhere, we will look for the ticket when we triage this. But I agree the target should be Precious at least, and we can definitely investigate doing the atomic replacement approach. |