Skip to content

Commit 43e60fb

Browse files
committed
README.md: added section on semantic versioning
and added more info on how to generate the repo for new versions of Unicode and CLDR. Change-Id: I16c0cf2ed546e57da0490454cfeb8df95289c2e1 Reviewed-on: https://go-review.googlesource.com/63530 Run-TryBot: Marcel van Lohuizen <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Nigel Tao <[email protected]>
1 parent 996754b commit 43e60fb

File tree

1 file changed

+44
-4
lines changed

1 file changed

+44
-4
lines changed

README.md

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
This repository holds supplementary Go libraries for text processing, many involving Unicode.
22

3+
# Semantic Versioning
4+
This repo uses Semantic versioning (http://semver.org/), so
5+
1. MAJOR version when you make incompatible API changes,
6+
1. MINOR version when you add functionality in a backwards-compatible manner, and
7+
1. PATCH version when you make backwards-compatible bug fixes.
8+
9+
A Unicode major and minor version bump is mapped to a major version bump in
10+
x/text.
11+
A path version bump in Unicode is mapped to a minor version bump in x/text.
12+
Note that, consistent with the definitions in semver, until version 1.0.0 of
13+
x/text is reached, the minor version is considered a major version.
14+
So going from 0.1.0 to 0.2.0 is considered to be a major version bump.
15+
16+
A major new CLDR version is mapped to a minor version increase in x/text.
17+
Any other new CLDR version is mapped to a patch version increase in x/text.
18+
19+
# Contribute
20+
321
To submit changes to this repository, see http://golang.org/doc/contribute.html.
422

523
To generate the tables in this repository (except for the encoding tables),
@@ -8,16 +26,38 @@ Unicode version in core and the CLDR version defined in
826
golang.org/x/text/unicode/cldr.
927

1028
Running go generate will as a side effect create a DATA subdirectory in this
11-
directory which holds all files that are used as a source for generating the
29+
directory, which holds all files that are used as a source for generating the
1230
tables. This directory will also serve as a cache.
1331

32+
## Testing
1433
Run
1534

16-
go test ./...
35+
go test ./...
1736

1837
from this directory to run all tests. Add the "-tags icu" flag to also run
1938
ICU conformance tests (if available). This requires that you have the correct
2039
ICU version installed on your system.
2140

22-
TODO:
23-
- updating unversioned source files.
41+
## Versions
42+
To update a Unicode version run
43+
44+
UNICODE_VERSION=x.x.x go generate
45+
46+
where `x.x.x` must correspond to a directory in http://www.unicode.org/Public/.
47+
If this version is newer than the version in core it will also update the
48+
relevant packages there. The idna package in x/net will always be updated.
49+
50+
To update a CLDR version run
51+
52+
CLDR_VERSION=version go generate
53+
54+
where `version` must correspond to a directory in
55+
http://www.unicode.org/Public/cldr/.
56+
57+
Note that the code gets adapted over time to changes in the data and that
58+
backwards compatibility is not maintained.
59+
So updating to a different version may not work.
60+
61+
The files in DATA/{iana|icu|w3|whatwg} are currently not versioned.
62+
63+

0 commit comments

Comments
 (0)