Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Mistyped features in feature-expressions evaluate as true #8

@npetryk

Description

@npetryk

com.rmn.version-qualified.qualifiers.feature/eval-feature-expr walks a feature expression and replaces features with true or false, then evals the expression. If a (for example) keyword is found in the expression which is not a known-feature?, it will not be replaced. The effect of this is that when evaling the expression, the keyword will basically evaluate as true in boolean logic expressions.

In this case, we should probably warn the user that we found a keyword but it was not a known feature, or just error out completely. The latter would cause problems if they legitimately wanted to put a keyword in the expression but did not mean it to refer to a version.

We should be cognizant that not all feature names are keywords

Example expression

(and :feature1 (not :faeture2))

Assuming that :faeture2 is a typo of :feature2, this will expression will always be false because we compile it to

(and true (not :faeture2))

rather than

(and true (not false))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions