Skip to content

Allow arbitrary version / checksum comparison expression #16

@Ortham

Description

@Ortham

donmac on Discord recently asked:

I would like to compare the versions of two plugins (that should be released together) and report a warning if they differ.
Something like version('plugin1.esp',version(plugin2.esp) !=).
The current metadata syntax appears to indicate that the second element must be a string literal, and not a variable.
Is there an alternate way of achieving this goal?

-- donmac703 in loot-discussions at 2022-04-11, 9:44 AM

There isn't, but I can see it being useful.

It might be worth changing the syntax so that version(path, literal, comparator) becomes version(path) comparator literal like is more usually seen in programming languages. version(path) would return the equivalent of an Option<Version>, where Version is a String that's compared as a version according to the metadata syntax rules. The same would be done for product_version().

The same kind of thing could be done for checksum(), which could be made to return a Option<CRC> where CRC is a String which can only be compared for equality or inequality.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions