Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/text: running go generate fails in TestParseScript #47566

Closed
josharian opened this issue Aug 5, 2021 · 4 comments
Closed

x/text: running go generate fails in TestParseScript #47566

josharian opened this issue Aug 5, 2021 · 4 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@josharian
Copy link
Contributor

$ go version
go version devel go1.17-fd45e267c2 Thu Aug 5 20:22:31 2021 +0000 darwin/arm64
$ git rev-parse master
3115f89c4b99a620c7f1a4395a2b4405e95b82b6
$ go generate
?   	golang.org/x/text/encoding/internal/identifier	[no test files]
ok  	golang.org/x/text/unicode/cldr	(cached)
ok  	golang.org/x/text/unicode/runenames	(cached)
ok  	golang.org/x/text/width	(cached)
ok  	golang.org/x/text/unicode/rangetable	(cached)
ok  	golang.org/x/text/unicode/norm	(cached)
ok  	golang.org/x/text/unicode/bidi	(cached)
ok  	golang.org/x/text/internal/export/idna	(cached)
--- FAIL: ./internal/language:
	--- FAIL: TestParseScript (0.00s)
	    language_test.go:153: 1:zzzz: was Afak, true; want Zzzz, true
	    language_test.go:153: 2:zyyy: was Adlm, true; want Zyyy, true
	FAIL
	FAIL	golang.org/x/text/internal/language	0.092s
	FAIL
	Error: exit status 1
--- ABORT: ./internal/language/compact
--- ABORT: ./language
--- ABORT: ./collate
--- ABORT: ./internal/number
--- ABORT: ./currency
--- ABORT: ./internal
--- ABORT: ./internal/cldrtree
--- ABORT: ./encoding/htmlindex
--- ABORT: ./encoding/ianaindex
--- ABORT: ./date
--- ABORT: ./language/display
--- ABORT: ./cases
--- ABORT: ./secure/precis
--- ABORT: ./search
--- ABORT: ./feature/plural
FAIL
exit status 1
doc.go:5: running "go": exit status 1
go generate 37.59s user 7.72s system 159% cpu 28.492 total 975840 maxrss

cc @mpvl

@gopherbot gopherbot added this to the Unreleased milestone Aug 5, 2021
@josharian
Copy link
Contributor Author

Looks like this is because we have type Script uint8 and there are now 258 scripts, so we overflow.

@gopherbot
Copy link

Change https://golang.org/cl/340309 mentions this issue: internal/language: make Script a uint16

@seankhliao seankhliao added the NeedsFix The path to resolution is known, but the work has not been done. label Aug 7, 2021
@esote
Copy link

esote commented Aug 18, 2022

@josharian This now appears to be fixed, from https://golang.org/cl/304029 (#45093)

$ go version
go version go1.18.5 linux/amd64
$ git rev-parse master
b0ca10ff35f1325c7d0ac7830fe3f036bd72d8f9
$ go generate
?   	golang.org/x/text/encoding/internal/identifier	[no test files]
ok  	golang.org/x/text/unicode/cldr	0.075s
ok  	golang.org/x/text/unicode/rangetable	0.418s
ok  	golang.org/x/text/unicode/runenames	0.054s
ok  	golang.org/x/text/width	0.238s
ok  	golang.org/x/text/internal/language	0.008s
ok  	golang.org/x/text/unicode/norm	2.855s
ok  	golang.org/x/text/unicode/bidi	2.068s
ok  	golang.org/x/text/internal/export/idna	0.445s
ok  	golang.org/x/text/internal/language/compact	0.002s
ok  	golang.org/x/text/language	0.028s
ok  	golang.org/x/text/internal	0.001s
ok  	golang.org/x/text/encoding/htmlindex	0.003s
ok  	golang.org/x/text/encoding/ianaindex	0.002s
ok  	golang.org/x/text/internal/cldrtree	0.049s
ok  	golang.org/x/text/cases	0.060s
ok  	golang.org/x/text/search	0.001s
ok  	golang.org/x/text/secure/precis	0.008s
ok  	golang.org/x/text/collate	0.008s
ok  	golang.org/x/text/internal/number	3.363s
ok  	golang.org/x/text/date	6.313s
ok  	golang.org/x/text/feature/plural	0.102s
ok  	golang.org/x/text/language/display	0.208s
ok  	golang.org/x/text/currency	3.538s

@mvdan
Copy link
Member

mvdan commented Sep 18, 2022

I agree that this appears to be fixed; https://go-review.googlesource.com/c/text/+/304029 was merged.

@mvdan mvdan closed this as completed Sep 18, 2022
@golang golang locked and limited conversation to collaborators Sep 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants