Done with:
go get go@1.18
go mod tidy
go fix ./...
Using go1.21.3.
Also update code generators to use only the new go:build lines,
not the old +build ones.
For golang/go#60268.
Change-Id: I832981d939ab0aad5c941555a6a4cd005958a189
Reviewed-on: https://go-review.googlesource.com/c/text/+/534242
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Remove logic that copies only the most current tablesXX.X.X.go,
renaming it to tables.go. The golang.org/x/net/idna package
currently contains all the versioned files and no tables.go,
so this change makes gen.go consistent with the last export.
Change-Id: Ic2797b45ec998873651eda04ed56ada29788f0f0
Reviewed-on: https://go-review.googlesource.com/c/text/+/360380
Trust: Damien Neil <dneil@google.com>
Trust: Marcel van Lohuizen <mpvl@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).
Not strictly necessary but will avoid spurious changes
as files are edited.
Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild
Change-Id: I8f1f65728dad29d63bc5a1ea5fdb4cbac255c7e5
Reviewed-on: https://go-review.googlesource.com/c/text/+/294372
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Also adds a dependency in the main gen.go file to include
this automatically in the generation process.
Change-Id: I395b686eec4dacd3639de0e78a48dfe3fdb0d6ce
Reviewed-on: https://go-review.googlesource.com/c/text/+/262217
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Marcel van Lohuizen <mpvl@golang.org>
Updates documentation and other changes not related to
a Unicode upgrade to minimize the diff.
This CL also updates gen.go to no longer copy packages
into the vendor directory. Henceforth, go mod vendor
should be used to copy packages.
Updates golang/go#27945
Change-Id: I59da1c56e81bec67979ce13d89af3a753d4809aa
Reviewed-on: https://go-review.googlesource.com/c/text/+/169637
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
This is used to update tables in core unicode.
Change-Id: I6fb34eba45842e38426b1ca54e79b74c361195ec
Reviewed-on: https://go-review.googlesource.com/c/154439
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This has the side-effect that the implementations using
compact tags will now have to chose whether to use
the regional or language variant of the tag. For instance,
the number package may display Swiss German number
formatting, even though the language selected is German.
Note that the tables for plural rules have slightly changed.
The new changes pick up data for some deprecated tags as
well. The entries for the deprecated tags could be removed
as compact indices, but as long as they are there, the
changes introduced here are correct. In practice the
language Matcher will match deprecated tags to their
modern equivalent, so these changes will have no effect
in practice.
Change-Id: I32f9149b0748a3ce51cab332b43a74092deffd8f
Reviewed-on: https://go-review.googlesource.com/98438
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ross Light <light@google.com>
Also rewrote the representation, which did not work for
Unicode 10
Change-Id: I39d9907908c67d07f8bbc153942ab0d8ab02ab6e
Reviewed-on: https://go-review.googlesource.com/96736
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ross Light <light@google.com>
Also updated date tables for this change and fixed
a small bug in code.go, which would escape '\', but
allowe it ('\\') to be broken across lines.
Change-Id: I139bf149a703f1063ccf10a8bae695be5696d97d
Reviewed-on: https://go-review.googlesource.com/95827
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
- Update api files in core when updating
Unicode version
- Exclude examples from copied packages.
Change-Id: Id96e735fb8acdd57d3fa0bc6eb01eaa817c1d421
Reviewed-on: https://go-review.googlesource.com/63610
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Move parts of code and do some renaming.
Manually change go generate directives and added new package to
x/text/gen.go
Regenerate tables for original and destination package.
Change-Id: I728dde1c0f7dcc289372fb815ecc4ed85d182cc2
Reviewed-on: https://go-review.googlesource.com/39132
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
See proposal golang/go#13560.
Also updated gen.go to include all packages using internal/gen
and to update the “Copy” comment.
Change-Id: Iad084642af3700a112b4305aef0c55b475893106
Reviewed-on: https://go-review.googlesource.com/38368
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Also rewrote vendoring update code to use the same code.
This way vendored packages don’t have to be manually
updated if there are new files to be added.
Change-Id: Ifcb48148cbe7badbc1a37eadf96ec4b975028f83
Reviewed-on: https://go-review.googlesource.com/34649
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
The trickiest changes are in language/display where the dropping
of nl-BE as Vlaams in Dutch caused some issues. This will
probably be changed back as I think this change is erroneous, but
as we’re not into the politics of it, we adopt the CLDR changes.
Change-Id: I6c593960778cd4c5b9f0553340b72a1410166506
Reviewed-on: https://go-review.googlesource.com/30910
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Include the generation of core Unicode tables in generation process.
Also ensure that vendored packages are up to date after the update.
Using this tool to update Core ensures that core, at least, will use a
consistent set of Unicode.
Change-Id: Ic7cca370b4af8556a79111f1b5ec2eb4381b5dc1
Reviewed-on: https://go-review.googlesource.com/29990
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
secure/precis and internal/number were added.
Also update dependencies included in tests (running tests was recently added, but not all dependencies).
bidi is added to precis preemptively.
Change-Id: Ie27ed195e7475691afb7f80dd390ef4279cce6d5
Reviewed-on: https://go-review.googlesource.com/19351
Reviewed-by: Sam Whited <sam@samwhited.com>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
To build the repo one should typically use the UNICODE_DIR env var to
allow reasonable build times.
This change standardizes the long option from tests and causes long
tests to run if the UNICODE_DIR env var is set. It thereby ensures
that these tests are run when the repo is built.
Change-Id: I26f5656069146d4966d773eafd0a2e4797f18f22
Reviewed-on: https://go-review.googlesource.com/17963
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
The htmlindex is a bit out of place, but this at least ensures that
it is periodically checked.
Change-Id: I53c5dafbdd8f8a6cfbd50bdd6d4f12d5a6bf9a83
Reviewed-on: https://go-review.googlesource.com/17803
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
The cldr package is quite low-level and probably would only for
internal use if it hadn't predated the internal directory convention.
Added doc.go in unicode directory to clarify nature of packages in
this subdirectory.
After this, the package that remains to be moved to unicode is bidi.
Change-Id: Ibff3285ca8cc00980e48fd30754c3f7abc87b2a0
Reviewed-on: https://go-review.googlesource.com/17491
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
The display package is now limited to contain only names for values
related to the language package. Moving it as a subpackage of
language makes both its purpose and discoverability clearer.
Sorry for the inconveniences.
Change-Id: I5321e7b81f0837f25f2523f6eb4811f82d0455b8
Reviewed-on: https://go-review.googlesource.com/17490
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Added internal and currency's dependency upon it (upcoming).
Change-Id: I8d5f64f5ff1fc975867ca2c64a2d9d365242d773
Reviewed-on: https://go-review.googlesource.com/14804
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Moved currency-related code from language to a separate package.
This will fit better in the grand design for localization support.
Also exposed rounding modes in new API.
Change-Id: Iad8e0988241b81312c4c4458db0ee5f16c71f6a9
Reviewed-on: https://go-review.googlesource.com/13855
Reviewed-by: Nigel Tao <nigeltao@golang.org>
I find myself wanting these utilities in testing code and they
seem to be generally useful enough to make public.
Change-Id: I4afd7cfc99bc797c5c12fe12bad40f0f16ed3400
Reviewed-on: https://go-review.googlesource.com/11493
Reviewed-by: Nigel Tao <nigeltao@golang.org>
This helps the repo maintainer upgrading packages to new versions
and also serves as documentation on dependencies.
@r: it would be convenient to also generate the core unicode tables
using this tool. It would be handy to slightly streamline the flags
of the unicode package for this. I can do this if changing some of
the semantics of the flags is acceptable.
Change-Id: Ib67161f7fe8724007d3c1479d5d173af65f646c7
Reviewed-on: https://go-review.googlesource.com/7495
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Reviewed-by: Rob Pike <r@golang.org>