Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Checking package release dates #20

Open
olexandr-konovalov opened this issue Jun 21, 2016 · 1 comment
Open

Checking package release dates #20

olexandr-konovalov opened this issue Jun 21, 2016 · 1 comment

Comments

@olexandr-konovalov
Copy link
Member

As Leonard Soicher pointed out, http://www.gap-system.org/Packages/sla.html has now release date in the future - 29/12/2016. This page is generated automatically from PackageInfo.g file, so I am not going to fix this on the website since it will be overwritten after the next release again.

There are several kinds of misuses that may happen with the date:

  1. The string is not of the form NN/NN/NNNN where N is a digit (for example, 7/1/16 instead of 07/01/16). This will be rejected by ValidatePackageInfo:
TestMandat( record, "Date",
    x -> IsString(x) and Length(x) = 10 and x{ [3,6] } = "//"
             and ForAll( x{ [1,2,4,5,7,8,9,10] }, IsDigitChar ),
    "a string of the form `dd/mm/yyyy'" );
  1. The date swaps day and month, or contains numbers for non-existing day/month etc. This may be improved by checking that all numbers are within proper bounds, with the same effect that PackageInfo.g validation fails in case the date is wrong.

The next two issues are too specific to the package update mechanism - they should better be implemented separately, and not inside the ValidatePackageInfo:

  1. The date is in the future. In this case, package update is not picked up, and an error message is produced to be passed to the authors.

  2. The date is in the past. Often this happens when the author incremented the version but forgot to increment the date. But this is a bit more subtle. Maybe it is several days old, but check for package updates was not run since last week? Or maybe it is the same as the date of the last release, but it was yesterday, and the author prepared next release during the same day? Or maybe the package was published a month ago on the author's website, which then was not available for a month and we were unable to pick it up? So it seems like in this case there heuristic should be applied and a warning, not an error, should be produced. For example, I could easily add a warning for packages with release date not in the same month with the day of the check for updates.

@olexandr-konovalov
Copy link
Member Author

Alternatives could be using a string with a day/month/year record or use ISO 8601 format for dates (see https://bitbucket.org/gap-system/gap/issues/21/change-request-use-iso-8601-format-for). Transition would be very prolonged and would require to support both formats quite for a while.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant