darcs

Patch 1662 add validation for PatchInfo items, add unit test for parse/unparse

Title add validation for PatchInfo items, add unit test for parse/unparse
Superseder Nosy List bfrk
Related Issues
Status accepted Assigned To
Milestone

Created on 2018-03-18.21:11:45 by bfrk, last changed 2018-03-29.15:13:18 by gh.

Files
File name Status Uploaded Type Edit Remove
add-validation-for-patchinfo-items_-add-unit-test-for-parse_unparse.dpatch bfrk, 2018-03-18.21:11:44 application/x-darcs-patch
See mailing list archives for discussion on individual patches.
Messages
msg19983 (view) Author: bfrk Date: 2018-03-18.21:11:44
This patch is intended to mitigate/fix Issue2576.

1 patch for repository http://darcs.net/screened:

patch 403698ffdc7b41b9840ccad632915f82a848b644
Author: Ben Franksen <ben.franksen@online.de>
Date:   Mon Mar 12 22:42:53 CET 2018
  * add validation for PatchInfo items, add unit test for parse/unparse
  
  Due to the idiosyncratic format of the PatchInfo on disk (in patch
files and
  inventories), the PatchInfo parser must make certain assumptions regarding
  the PatchInfo items. These are now codified in validation functions and
  enforced when building PatchInfo data. They are also used to provide
correct
  Arbitrary instances for property tests.
Attachments
msg20079 (view) Author: gh Date: 2018-03-29.15:13:17
So, using unsafPerformIO patchinfo all that time was a mistake, the
correct function to use in reproducible tests should be rawPatchInfo
(slightly ill named function if it is only used in tests..).

You introduce validation functions in Darcs.Patch.Info and then use them
in combination with QuickCheck's `suchThat` function to generate usable
fields for patchinfo's.

Also  no longer used generatore are removed from
D.T.Patch.Arbitrary.RepoPatchV1 .

Good, accepted.
History
Date User Action Args
2018-03-18 21:11:45bfrkcreate
2018-03-18 21:58:44bfrksetstatus: needs-screening -> needs-review
2018-03-29 15:13:18ghsetstatus: needs-review -> accepted
messages: + msg20079