[SERVER-23668] scons abbreviated options do not work properly Created: 12/Apr/16 Updated: 22/Sep/20 Resolved: 02/Sep/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0, 4.2.10, 4.4.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v4.4, v4.2
|
||||||||||||
| Sprint: | Execution Team 2020-08-10, Dev Platform 2020-09-07 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
SCons apparently supports accepting unambiguous prefixes of valid options; see e.g. http://scons.org/doc/1.3.1/HTML/scons-api/SCons.compat._scons_optparse.OptionParser-class.html#_match_long_opt However, if you pass an unambiguous abbreviated option on the command line, scons accepts it but GetOption(name) still returns None when our SConstruct code asks for the fully specified option name. You can try this with --disable-warnings-as-errors: Example: Expected behavior: |
| Comments |
| Comment by Githook User [ 09/Sep/20 ] |
|
Author: {'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}Message: See https://github.com/SCons/scons/commit/456428184f388eccccbcbc3d76866a8dce060b3c (cherry picked from commit 36920786ecae139217f8ea1eed4274e77477b2d0) |
| Comment by Ryan Egesdahl (Inactive) [ 09/Sep/20 ] |
|
(wrong ticket number in description, forgot to change it before sending it up) Message: See https://github.com/SCons/scons/commit/456428184f388eccccbcbc3d76866a8dce060b3c (cherry picked from commit 36920786ecae139217f8ea1eed4274e77477b2d0) |
| Comment by Eric Milkie [ 02/Sep/20 ] |
|
(NB: wrong server ticket in commit description) Message: See https://github.com/SCons/scons/commit/456428184f388eccccbcbc3d76866a8dce060b3c |
| Comment by Andrew Morrow (Inactive) [ 01/Sep/20 ] |
|
We might as well backport to the other SCons 3.1.2 based branches as well. |
| Comment by Andrew Morrow (Inactive) [ 01/Sep/20 ] |
|
I'm piggy-backing on the existing LGTM to merge the effectively equivalent change that landed upstream at https://github.com/SCons/scons/commit/456428184f388eccccbcbc3d76866a8dce060b3c |
| Comment by Geert Bosch [ 01/Sep/20 ] |
|
Sure, thanks. I'm happy my fix proved acceptable to upstram. |
| Comment by Andrew Morrow (Inactive) [ 01/Sep/20 ] |
|
geert.bosch - Do you want to hand this ticket back to SDP and we will get it merged from upstream? |
| Comment by Daniel Moody [ 06/Aug/20 ] |
|
upstream scons Issue for this: https://github.com/SCons/scons/issues/3653 |
| Comment by Geert Bosch [ 05/Aug/20 ] |
|
For the record: I got bitten by this bug today, where I misspelled the --variables-files option as --variables-file and got a mysterious link error related to missing delete and new operators and wasted more than an hour. |
| Comment by Andrew Morrow (Inactive) [ 30/Jul/20 ] |
|
milkie - That's correct, we are still waiting on a change there. Hopefully this just gets solved by a SCons upgrade. |
| Comment by Eric Milkie [ 30/Jul/20 ] |
|
Looks like someone has proposed a fix to SCons but it's still being evaluated. |
| Comment by Andrew Morrow (Inactive) [ 17/May/20 ] |
|
milkie - To me, that sounds tricky, because the options parser would need to parse your option that affects how options get parsed. Let's give the SCons devs a little time to work on the issue now that it is flagged. Hopefully they come up with something we can cherry pick back. |
| Comment by Eric Milkie [ 15/May/20 ] |
|
I wonder if it would be possible to just add an option for scons to disable abbreviations. |
| Comment by Andrew Morrow (Inactive) [ 15/May/20 ] |
|
I raised this issue to the SCons developers. This is a SCons bug, and it looks like it might be pretty hard to fix: https://github.com/SCons/scons/issues/3653 |