You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -104,12 +105,31 @@ Each exercise has the following structure:
104
105
resolver for all the exercises.
105
106
-`package.yaml` is a file in the [hpack](https://github.com/sol/hpack#readme)
106
107
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.
107
109
-`src/ModuleName.hs` is a [stub solution](#stub-solution).
108
110
-`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.
109
111
-`examples/success-<name>/src/ModuleName.hs` is the source code of the sample solution.
110
112
-`test/Tests.hs` is the [test suite](#test-suite).
111
113
-`.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.
112
114
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
+
113
133
### Writing an issue
114
134
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).
0 commit comments