Skip to content

track x-common version somewhere in xrust #281

Closed
@petertseng

Description

@petertseng

Ever since x-common started versioning their canonical-data.json files (see exercism/problem-specifications#673), it becomes possible for xrust to keep track of which version of the x-common JSON file was used to write the current tests. If we keep track of this, then we would easily be able to determine whether the xrust tests are out-of-date.

Let's discuss a few questions before doing this:

Do we need an additional version component?

Let's pretend that for a given exercise, x-common's version is 1.0.0, and we note this. Let's then decide that even though x-common's version hasn't changed, we need to change something about the tests anyway. It wouldn't make sense to change the version to 1.0.1 because that's not x-common's version. Do we need to change the version to 1.0.0.1 or something? The alternative is to leave the version at 1.0.0.

Note that this wouldn't matter for the goal of determining whether we are out of date with x-common. It only matters so the student can quickly determine whether the tests may have changed in some way. So it is not necessary for the goals of this issue. Do we want it anyway?

I don't really care so if nobody says anything I'm assuming no (leave the version at 1.0.0).

Where should we keep the version?

Note that all Cargo.toml files have a version, as we see in https://github.com/exercism/xrust/blob/master/exercises/acronym/Cargo.toml#L3. That is one possibility of where to put it. Disadvantage: we would need to remember to update Cargo.toml plus the test file, so that's two files.

Another choice that might be reasonable is in the tests/*.rs file so that we don't have to update two files. Disadvantage: we would need a standard version comment so it can be easily found, like ``// x-common test version 1.0.0`, so it's less stuctured.

Personally I think putting it in Cargo.toml would be nice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions