Skip to content

Commit 8398d90

Browse files
authored
README: document exercises' versioning policy (#716)
We would like to document the versioning policy decided in #522 and implemented in #523 Closes #538
1 parent ca34355 commit 8398d90

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Exercism exercises in Haskell
1515
- [Repository structure and conventions](#repository-structure-and-conventions)
1616
* [Directory structure](#directory-structure)
1717
* [Exercise structure](#exercise-structure)
18+
* [Exercise versioning](#exercise-versioning)
1819
- [Writing an issue](#writing-an-issue)
1920
- [Writing a pull request](#writing-a-pull-request)
2021
- [Development Dependencies](#development-dependencies)
@@ -104,12 +105,31 @@ Each exercise has the following structure:
104105
resolver for all the exercises.
105106
- `package.yaml` is a file in the [hpack](https://github.com/sol/hpack#readme)
106107
format that has all dependencies and build instructions for an exercise.
108+
One of the properties tracked in `package.yaml` is the [version](#exercise-versioning) of the exercise.
107109
- `src/ModuleName.hs` is a [stub solution](#stub-solution).
108110
- `examples/success-<name>/package.yaml` contains library dependencies for the [example solution](#example-solution). `<name>` is a unique name for the example - usually "standard" (as in `success-standard`), but it can be some other name in case of multiple example solutions.
109111
- `examples/success-<name>/src/ModuleName.hs` is the source code of the sample solution.
110112
- `test/Tests.hs` is the [test suite](#test-suite).
111113
- `.meta/hints.md` is an optional file containing instructions and/or hints. It is used together with the respective `description.md` for the exercise from [problem-specifications](https://github.com/exercism/problem-specifications) to build the `README.md` file.
112114

115+
### Exercise versioning
116+
117+
Each exercise contains a four-part version in its `package.yaml` file, MAJOR.MINOR.PATCH.SERIAL.
118+
119+
There are two possibilities for the meaning of the MAJOR.MINOR.PATCH components:
120+
121+
* Exercises based on a `canonical-data.json` in [problem-specifications](https://github.com/exercism/problem-specifications) should use its version plus a serial number.
122+
* Exercises that are not based on `canonical-data.json` should use version 0.1.0 plus a serial number.
123+
124+
The serial number starts at 1 and always increases when the tests are changed, regardless of the changes in other version numbers.
125+
126+
When changing a test suite, the version number should be updated appropriately so that:
127+
128+
* It is possible for maintainers of this track to tell whether test suites are up to date with https://github.com/exercism/problem-specifications.
129+
* It is easier for students to determine at-a-glance whether they have the same tests, by comparing version numbers.
130+
131+
This versioning policy was proposed and accepted in https://github.com/exercism/haskell/issues/522.
132+
113133
### Writing an issue
114134
To report a bug you should [create an issue](https://help.github.com/articles/creating-an-issue/) on the [exercism/haskell repo](https://github.com/exercism/haskell/issues).
115135

0 commit comments

Comments
 (0)