-
-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aliases are inconsistent in Variables.options
#4630
Comments
agree, it's inconsistent. when I found that, we didn't want to change existing behavior if nobody was complaining. which version feels more natural? name in aliases or not? |
Today I needed to implement custom Footnotes
|
Do you need someone to complain? I am ready to complain! I've already seen tons of workarounds and needed to create them myself. I only work with scons for 1~1.5 months... From now I will report everything I find |
Or is it a published api? If no, then it will hurt many people (I will be hurted too), but there is option better. Tuples doesn't have embedded names so is there any difference to do |
And just formally as option itself is a tuple, why not to use tuple instead of list for aliases? Does SCons allow to modify aliases at runtime? If no why not to use tuple? More constness |
@bdbaddog any opinions here? When I ran across this before, I left it as-is, because tests were written to the existing behavior, and I left a comment about it. I didn't remember, but it looks like I preferred the eventual approach of leaving the name out of the alias list in both cases. if SCons.Util.is_Sequence(key):
option.key = key[0]
option.aliases = list(key[1:])
else:
option.key = key
# TODO: normalize to not include key in aliases. Currently breaks tests.
option.aliases = [key,] The name (key) is added later for processing anyway, so it doesn't really need to be there, e.g. like this: if arg in option.aliases + [option.key,]: I don't have an opinion on tuple-vs-list, which is a separate question above. |
Please don't just file issue without discussing them first. To ensure they are a) actually a issue and not user error, and b) that there isn't already an issue filed. |
Describe the bug
Aliases are inconsistent in
Variables.options
. Second member of tuple (which represents option) does contain original name if option doesn't have aliases. But it doesn't contain original name if option has aliases.Output:
Required information
The text was updated successfully, but these errors were encountered: