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/cmd/gotext: misbehaviors of gotext extract and gotext generate #56842

Closed
ilharp opened this issue Nov 18, 2022 · 2 comments
Closed

x/text/cmd/gotext: misbehaviors of gotext extract and gotext generate #56842

ilharp opened this issue Nov 18, 2022 · 2 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@ilharp
Copy link

ilharp commented Nov 18, 2022

What version of Go are you using (go version)?

$ go version

go version go1.19 darwin/arm64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users//Library/Caches/go-build"
GOENV="/Users/
/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users//go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/
/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.19"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
GOWORK="
"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/ls/f85m0dgx7lvf3zsrwts5wrcc0000gn/T/go-build1660918564=/tmp/go-build -gno-record-gcc-switches -fno-common"


Misbehaviors in x/text/cmd/gotext:

gotext extract ignores lang flag

Minimal Reproduction

In directory x/text/cmd/gotext/examples/extract on c8236a67:

rm -r locales
gotext extract --lang=en-US,de,zh
ls locales

Expected

de    en-US zh

Actual

en-US

gotext generate ignores out flag

Minimal Reproduction

In directory x/text/cmd/gotext/examples/extract on c8236a67:

rm catalog.go
gotext generate --out=catalog2.go

Expected

Generate new file catalog2.go

Actual

Could not create file .: open .: is a directory

Misbehavior of gotext generate when no flag specified

Minimal Reproduction

In directory x/text/cmd/gotext/examples/extract on c8236a67:

rm catalog.go
gotext generate

Expected

Print generated go file

Actual

Could not create file .: open .: is a directory
@gopherbot gopherbot added this to the Unreleased milestone Nov 18, 2022
@gopherbot
Copy link

Change https://go.dev/cl/452115 mentions this issue: cmd/gotext: fix misbehaviors

@ilharp
Copy link
Author

ilharp commented Nov 18, 2022

Closed by mistake. Reopening.

@ilharp ilharp reopened this Nov 18, 2022
@seankhliao seankhliao added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 19, 2022
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants