Closed
Conversation
* fixed various comments about subfeatures values * fixed a couple of conditions in validate-value-string rule, the one on line 469 caused inefficiencies due to non-optimized (i.e., always performed) validations for non-free feature values; the condition on line 476, besides always being true, is also logically incorrect; ultimately, it only obfuscates the code; * fixed expand rule to perform full expansion even in the case of a composed feature that contains subfeatures * compress-subproperties rule cleanup, removed unused variables (all-subs and matched-subs) * added testing of complete expansion by expand rule in __test__ rule
Contributor
Author
|
@grafikrobot I don't want to bother you during your holidays, but what happened to these changes? |
Contributor
Author
|
sorry I found them |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
validate-value-stringrule: the one on line 469 caused inefficiencies due to non-optimized (i.e., always performed) validations for non-free feature values; the condition on line 476, besides always being true, is also logically incorrect; ultimately, it only obfuscates the code[1];expandrule to perform full expansion even in the case of a composed feature that contains subfeatures[2]compress-subpropertiesrule cleanup, removed unused variables (all-subsandmatched-subs)expandrule in__test__rule[1]
Since
$($(feature).subfeatures)contains the name of the subfeature (e.g.,gcc:version) and compares it to a valueIt cannot be true, while the first part of the condition
is implied by the previous condition (once updated).
[2]
Since subfeatures were expanded first and then composites, previously the subfeatures resulting from the last expansion were not further expanded. Furthermore, the change ensures that
expand-compositesalways occurs as the last step, since all checks are performed by this rule.