From 3c911d8e3edae4ddeea7f8a6e3ea9eae74f1a81a Mon Sep 17 00:00:00 2001 From: Suzukihonoka Date: Wed, 31 May 2023 10:46:28 +0000 Subject: [PATCH 01/51] cmd/gomobile: upgrade minimal javac version to 1.8 Fixes golang/go#59803 Change-Id: I248ab312eedf091bbfd6ebf35c8990fbdf611fbc GitHub-Last-Rev: c61def7df008265555efa24ef27d262d7fd9b644 GitHub-Pull-Request: golang/mobile#91 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/488555 TryBot-Result: Gopher Robot Reviewed-by: Hyang-Ah Hana Kim Reviewed-by: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov Reviewed-by: Hajime Hoshi Auto-Submit: Dmitri Shuralyov Run-TryBot: Dmitri Shuralyov --- cmd/gomobile/bind.go | 2 +- cmd/gomobile/bind_androidapp.go | 2 +- cmd/gomobile/bind_test.go | 2 +- cmd/gomobile/gendex.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/gomobile/bind.go b/cmd/gomobile/bind.go index 54eaa4bcf..11b406256 100644 --- a/cmd/gomobile/bind.go +++ b/cmd/gomobile/bind.go @@ -44,7 +44,7 @@ example, in Android Studio (1.2+), an AAR file can be imported using the module import wizard (File > New > New Module > Import .JAR or .AAR package), and setting it as a new dependency (File > Project Structure > Dependencies). This requires 'javac' -(version 1.7+) and Android SDK (API level 16 or newer) to build the +(version 1.8+) and Android SDK (API level 16 or newer) to build the library for Android. The ANDROID_HOME and ANDROID_NDK_HOME environment variables can be used to specify the Android SDK and NDK if they are not in the default locations. Use the -javapkg flag to specify the Java diff --git a/cmd/gomobile/bind_androidapp.go b/cmd/gomobile/bind_androidapp.go index 3fa9cfa7a..f8fcabe1b 100644 --- a/cmd/gomobile/bind_androidapp.go +++ b/cmd/gomobile/bind_androidapp.go @@ -245,7 +245,7 @@ func buildAAR(srcDir, androidDir string, pkgs []*packages.Package, targets []tar } const ( - javacTargetVer = "1.7" + javacTargetVer = "1.8" minAndroidAPI = 16 ) diff --git a/cmd/gomobile/bind_test.go b/cmd/gomobile/bind_test.go index fa6b0efb8..22a88d533 100644 --- a/cmd/gomobile/bind_test.go +++ b/cmd/gomobile/bind_test.go @@ -190,7 +190,7 @@ GOOS=android CGO_ENABLED=1 gobind -lang=go,java -outdir=$WORK{{if .JavaPkg}} -ja mkdir -p $WORK/src-android-arm PWD=$WORK/src-android-arm GOMODCACHE=$GOPATH/pkg/mod GOOS=android GOARCH=arm CC=$NDK_PATH/toolchains/llvm/prebuilt/{{.NDKARCH}}/bin/armv7a-linux-androideabi16-clang CXX=$NDK_PATH/toolchains/llvm/prebuilt/{{.NDKARCH}}/bin/armv7a-linux-androideabi16-clang++ CGO_ENABLED=1 GOARM=7 GOPATH=$WORK:$GOPATH go mod tidy PWD=$WORK/src-android-arm GOMODCACHE=$GOPATH/pkg/mod GOOS=android GOARCH=arm CC=$NDK_PATH/toolchains/llvm/prebuilt/{{.NDKARCH}}/bin/armv7a-linux-androideabi16-clang CXX=$NDK_PATH/toolchains/llvm/prebuilt/{{.NDKARCH}}/bin/armv7a-linux-androideabi16-clang++ CGO_ENABLED=1 GOARM=7 GOPATH=$WORK:$GOPATH go build -x -buildmode=c-shared -o=$WORK/android/src/main/jniLibs/armeabi-v7a/libgojni.so ./gobind -PWD=$WORK/java javac -d $WORK/javac-output -source 1.7 -target 1.7 -bootclasspath {{.AndroidPlatform}}/android.jar *.java +PWD=$WORK/java javac -d $WORK/javac-output -source 1.8 -target 1.8 -bootclasspath {{.AndroidPlatform}}/android.jar *.java jar c -C $WORK/javac-output . `)) diff --git a/cmd/gomobile/gendex.go b/cmd/gomobile/gendex.go index 88cf5549f..bfc2ad7ac 100644 --- a/cmd/gomobile/gendex.go +++ b/cmd/gomobile/gendex.go @@ -74,8 +74,8 @@ func gendex() error { } cmd := exec.Command( "javac", - "-source", "1.7", - "-target", "1.7", + "-source", "1.8", + "-target", "1.8", "-bootclasspath", platform+"/android.jar", "-d", tmpdir+"/work", ) From 7088062f872dd0678a87e8986c67992e9c8855a5 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Fri, 18 Aug 2023 10:12:29 -0400 Subject: [PATCH 02/51] all: upgrade x/tools and its dependencies This picks up CL 516917 to fix test failures in cmd/gobind. For golang/go#61035. Change-Id: Ibecb7ace6ce9133a25559191ee6075bbb714a7d7 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/520835 Reviewed-by: Robert Findley Reviewed-by: Cuong Manh Le Run-TryBot: Bryan Mills TryBot-Result: Gopher Robot Auto-Submit: Bryan Mills --- go.mod | 8 ++++---- go.sum | 28 +++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 4cbf6276e..f9b2ba20b 100644 --- a/go.mod +++ b/go.mod @@ -5,9 +5,9 @@ go 1.17 require ( golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56 golang.org/x/image v0.0.0-20190802002840-cff245a6509b - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 - golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde - golang.org/x/tools v0.1.12 + golang.org/x/mod v0.12.0 + golang.org/x/sync v0.3.0 + golang.org/x/tools v0.12.1-0.20230818130535-1517d1a3ba60 ) -require golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect +require golang.org/x/sys v0.11.0 // indirect diff --git a/go.sum b/go.sum index 7a596ad12..71c9bae3e 100644 --- a/go.sum +++ b/go.sum @@ -3,6 +3,7 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56 h1:estk1glOnSVeJ9tdEZZc5mAMDZk5lNJNyJ6DvrBkTEU= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= @@ -10,32 +11,49 @@ golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDA golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde h1:ejfdSekXMDxDLbRrJMwUk6KnSLZ2McaUCVcIKM+N6jc= -golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.12.1-0.20230818130535-1517d1a3ba60 h1:o4bs4seAAlSiZQAZbO6/RP5XBCZCooQS3Pgc0AUjWts= +golang.org/x/tools v0.12.1-0.20230818130535-1517d1a3ba60/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 52620a4a7557849149770d52fd7b580cb3cbd1ae Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 2 Sep 2023 00:10:27 +0900 Subject: [PATCH 03/51] all: upgrade dependencies Change-Id: I3a3142fdd85870473d28376451d31f4f49718023 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/525075 Run-TryBot: Hajime Hoshi TryBot-Result: Gopher Robot Auto-Submit: Hajime Hoshi Reviewed-by: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov Reviewed-by: Hyang-Ah Hana Kim --- go.mod | 4 ++-- go.sum | 24 ++++-------------------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index f9b2ba20b..56984a74e 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module golang.org/x/mobile go 1.17 require ( - golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56 - golang.org/x/image v0.0.0-20190802002840-cff245a6509b + golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 + golang.org/x/image v0.11.0 golang.org/x/mod v0.12.0 golang.org/x/sync v0.3.0 golang.org/x/tools v0.12.1-0.20230818130535-1517d1a3ba60 diff --git a/go.sum b/go.sum index 71c9bae3e..a85cc444e 100644 --- a/go.sum +++ b/go.sum @@ -1,56 +1,40 @@ -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56 h1:estk1glOnSVeJ9tdEZZc5mAMDZk5lNJNyJ6DvrBkTEU= -golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= +golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= +golang.org/x/image v0.11.0 h1:ds2RoQvBvYTiJkwpSFDwCcDFNX7DqjL2WsUgTNk0Ooo= +golang.org/x/image v0.11.0/go.mod h1:bglhjqbqVuEb9e9+eNR45Jfu7D+T4Qan+NhQk8Ck2P8= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= From fbe1c053b6a9fb82bd32271219fa206af328fa80 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 2 Sep 2023 01:51:32 +0900 Subject: [PATCH 04/51] all: update Go version to 1.18 Fixes golang/go#62415 Change-Id: Ica46a62f60b8ebcf6244da98fe4e0643206cb24f Reviewed-on: https://go-review.googlesource.com/c/mobile/+/525095 Reviewed-by: Dmitri Shuralyov Run-TryBot: Hajime Hoshi TryBot-Result: Gopher Robot Auto-Submit: Hajime Hoshi Reviewed-by: Bryan Mills --- app/android.go | 1 - app/app.go | 1 - app/darwin_desktop.go | 1 - app/darwin_ios.go | 1 - app/internal/callfn/callfn.go | 2 -- app/internal/testapp/testapp.go | 1 - app/shiny.go | 1 - app/x11.go | 1 - asset/asset.go | 1 - asset/asset_darwin_armx.go | 2 -- asset/asset_desktop.go | 1 - bind/implicit.go | 1 - bind/testdata/testpkg/tagged.go | 1 - cmd/gobind/implicit.go | 1 - cmd/gomobile/gendex.go | 1 - cmd/gomobile/tools.go | 1 - example/basic/main.go | 1 - example/basic/main_x.go | 1 - example/flappy/game.go | 1 - example/flappy/main.go | 1 - example/flappy/main_x.go | 1 - example/ivy/tools.go | 1 - example/network/main.go | 1 - example/network/main_x.go | 1 - exp/app/debug/fps.go | 1 - exp/audio/al/al.go | 1 - exp/audio/al/al_notandroid.go | 1 - exp/audio/al/alc.go | 1 - exp/audio/al/alc_notandroid.go | 1 - exp/audio/al/const.go | 1 - exp/f32/gen.go | 1 - exp/font/font.go | 1 - exp/font/font_linux.go | 1 - exp/font/font_test.go | 1 - exp/gl/glutil/context_darwin_desktop.go | 1 - exp/gl/glutil/context_x11.go | 1 - exp/gl/glutil/glimage.go | 1 - exp/gl/glutil/glimage_test.go | 1 - exp/gl/glutil/glutil.go | 1 - exp/sensor/android.go | 1 - exp/sensor/darwin_armx.go | 2 -- exp/sensor/notmobile.go | 1 - exp/sprite/glsprite/glsprite.go | 1 - gl/gendebug.go | 4 +--- gl/gl.go | 2 -- gl/gldebug.go | 2 -- gl/types_debug.go | 2 -- gl/types_prod.go | 2 -- gl/work.go | 1 - gl/work_other.go | 2 -- go.mod | 2 +- internal/binres/genarsc.go | 1 - 52 files changed, 2 insertions(+), 62 deletions(-) diff --git a/app/android.go b/app/android.go index 08a6e0538..ebbd4b509 100644 --- a/app/android.go +++ b/app/android.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build android -// +build android /* Android Apps are built with -buildmode=c-shared. They are loaded by a diff --git a/app/app.go b/app/app.go index 19efb07f1..9817e13d7 100644 --- a/app/app.go +++ b/app/app.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || darwin || windows -// +build linux darwin windows package app diff --git a/app/darwin_desktop.go b/app/darwin_desktop.go index 337717531..180c60278 100644 --- a/app/darwin_desktop.go +++ b/app/darwin_desktop.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && !ios -// +build darwin,!ios package app diff --git a/app/darwin_ios.go b/app/darwin_ios.go index 8fb30fe82..bef9f4215 100644 --- a/app/darwin_ios.go +++ b/app/darwin_ios.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && ios -// +build darwin,ios package app diff --git a/app/internal/callfn/callfn.go b/app/internal/callfn/callfn.go index 7a3d0506e..ecc3d456f 100644 --- a/app/internal/callfn/callfn.go +++ b/app/internal/callfn/callfn.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build android && (arm || 386 || amd64 || arm64) -// +build android -// +build arm 386 amd64 arm64 // Package callfn provides an android entry point. // diff --git a/app/internal/testapp/testapp.go b/app/internal/testapp/testapp.go index eb850955b..18a97bf6a 100644 --- a/app/internal/testapp/testapp.go +++ b/app/internal/testapp/testapp.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || linux -// +build darwin linux // Small test app used by app/app_test.go. package main diff --git a/app/shiny.go b/app/shiny.go index dd1722a27..0b4e3e550 100644 --- a/app/shiny.go +++ b/app/shiny.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build windows -// +build windows package app diff --git a/app/x11.go b/app/x11.go index ec8c90a54..7e85e137c 100644 --- a/app/x11.go +++ b/app/x11.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && !android -// +build linux,!android package app diff --git a/asset/asset.go b/asset/asset.go index 5ed3a5c5a..d23656911 100644 --- a/asset/asset.go +++ b/asset/asset.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || linux || windows -// +build darwin linux windows package asset diff --git a/asset/asset_darwin_armx.go b/asset/asset_darwin_armx.go index 3eac25b04..e3b3b5a13 100644 --- a/asset/asset_darwin_armx.go +++ b/asset/asset_darwin_armx.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && (arm || arm64) -// +build darwin -// +build arm arm64 package asset diff --git a/asset/asset_desktop.go b/asset/asset_desktop.go index a36099504..af7c45f82 100644 --- a/asset/asset_desktop.go +++ b/asset/asset_desktop.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (linux && !android) || (darwin && !arm && !arm64) || windows -// +build linux,!android darwin,!arm,!arm64 windows package asset diff --git a/bind/implicit.go b/bind/implicit.go index 5144209c3..bf1d418c0 100644 --- a/bind/implicit.go +++ b/bind/implicit.go @@ -1,7 +1,6 @@ // This file imports implicit dependencies required by generated code. //go:build mobile_implicit -// +build mobile_implicit package bind diff --git a/bind/testdata/testpkg/tagged.go b/bind/testdata/testpkg/tagged.go index b5fe898e5..701a58044 100644 --- a/bind/testdata/testpkg/tagged.go +++ b/bind/testdata/testpkg/tagged.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aaa && bbb -// +build aaa,bbb // This file tests that tags work with gomobile. package testpkg diff --git a/cmd/gobind/implicit.go b/cmd/gobind/implicit.go index 4289d4b36..e8f6dd57b 100644 --- a/cmd/gobind/implicit.go +++ b/cmd/gobind/implicit.go @@ -1,7 +1,6 @@ // This file imports implicit dependencies required by generated code. //go:build mobile_implicit -// +build mobile_implicit package main diff --git a/cmd/gomobile/gendex.go b/cmd/gomobile/gendex.go index bfc2ad7ac..be470a2bd 100644 --- a/cmd/gomobile/gendex.go +++ b/cmd/gomobile/gendex.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore // Gendex generates a dex file used by Go apps created with gomobile. // diff --git a/cmd/gomobile/tools.go b/cmd/gomobile/tools.go index e8d4ade00..bee46004c 100644 --- a/cmd/gomobile/tools.go +++ b/cmd/gomobile/tools.go @@ -1,7 +1,6 @@ // This file includes the tools the gomobile depends on. //go:build tools -// +build tools package main diff --git a/example/basic/main.go b/example/basic/main.go index 94932db4f..fb6167be6 100644 --- a/example/basic/main.go +++ b/example/basic/main.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || linux || windows -// +build darwin linux windows // An app that draws a green triangle on a red background. // diff --git a/example/basic/main_x.go b/example/basic/main_x.go index 52e8c5399..49d8612d1 100644 --- a/example/basic/main_x.go +++ b/example/basic/main_x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !darwin && !linux && !windows -// +build !darwin,!linux,!windows package main diff --git a/example/flappy/game.go b/example/flappy/game.go index 89b8ae2db..04903c719 100644 --- a/example/flappy/game.go +++ b/example/flappy/game.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || linux -// +build darwin linux package main diff --git a/example/flappy/main.go b/example/flappy/main.go index 6f298ea6d..b0970f5b8 100644 --- a/example/flappy/main.go +++ b/example/flappy/main.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || linux -// +build darwin linux // Flappy Gopher is a simple one-button game that uses the // mobile framework and the experimental sprite engine. diff --git a/example/flappy/main_x.go b/example/flappy/main_x.go index 6739924fe..a056c79f2 100644 --- a/example/flappy/main_x.go +++ b/example/flappy/main_x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !darwin && !linux -// +build !darwin,!linux package main diff --git a/example/ivy/tools.go b/example/ivy/tools.go index 85a60697e..ab067c246 100644 --- a/example/ivy/tools.go +++ b/example/ivy/tools.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore package dummy diff --git a/example/network/main.go b/example/network/main.go index 4b23cbed4..5ac2f2cc9 100644 --- a/example/network/main.go +++ b/example/network/main.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || linux || windows -// +build darwin linux windows // An app that paints green if golang.org is reachable when the app first // starts, or red otherwise. diff --git a/example/network/main_x.go b/example/network/main_x.go index 9bda7ac77..e6cd77852 100644 --- a/example/network/main_x.go +++ b/example/network/main_x.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !darwin && !linux && !windows -// +build !darwin,!linux,!windows package main diff --git a/exp/app/debug/fps.go b/exp/app/debug/fps.go index bef808dd5..c01570582 100644 --- a/exp/app/debug/fps.go +++ b/exp/app/debug/fps.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || linux || windows -// +build darwin linux windows // Package debug provides GL-based debugging tools for apps. package debug // import "golang.org/x/mobile/exp/app/debug" diff --git a/exp/audio/al/al.go b/exp/audio/al/al.go index b02cbb761..974488967 100644 --- a/exp/audio/al/al.go +++ b/exp/audio/al/al.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || linux || windows -// +build darwin linux windows // Package al provides OpenAL Soft bindings for Go. // diff --git a/exp/audio/al/al_notandroid.go b/exp/audio/al/al_notandroid.go index 577fee361..06fee46ac 100644 --- a/exp/audio/al/al_notandroid.go +++ b/exp/audio/al/al_notandroid.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || (linux && !android) || windows -// +build darwin linux,!android windows package al diff --git a/exp/audio/al/alc.go b/exp/audio/al/alc.go index f0b421553..1c9c44282 100644 --- a/exp/audio/al/alc.go +++ b/exp/audio/al/alc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || linux || windows -// +build darwin linux windows package al diff --git a/exp/audio/al/alc_notandroid.go b/exp/audio/al/alc_notandroid.go index 68e907c1c..a87df647f 100644 --- a/exp/audio/al/alc_notandroid.go +++ b/exp/audio/al/alc_notandroid.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || (linux && !android) || windows -// +build darwin linux,!android windows package al diff --git a/exp/audio/al/const.go b/exp/audio/al/const.go index aef054328..2408cbe97 100644 --- a/exp/audio/al/const.go +++ b/exp/audio/al/const.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || linux || windows -// +build darwin linux windows package al diff --git a/exp/f32/gen.go b/exp/f32/gen.go index fdd1c3f63..2af3327bf 100644 --- a/exp/f32/gen.go +++ b/exp/f32/gen.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore package main diff --git a/exp/font/font.go b/exp/font/font.go index c14513409..02e2b9765 100644 --- a/exp/font/font.go +++ b/exp/font/font.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || darwin -// +build linux darwin package font diff --git a/exp/font/font_linux.go b/exp/font/font_linux.go index 65316233e..f0beb34b5 100644 --- a/exp/font/font_linux.go +++ b/exp/font/font_linux.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !android -// +build !android package font diff --git a/exp/font/font_test.go b/exp/font/font_test.go index c93c28237..f98752565 100644 --- a/exp/font/font_test.go +++ b/exp/font/font_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || darwin -// +build linux darwin package font diff --git a/exp/gl/glutil/context_darwin_desktop.go b/exp/gl/glutil/context_darwin_desktop.go index 344c73e41..725cdd2e6 100644 --- a/exp/gl/glutil/context_darwin_desktop.go +++ b/exp/gl/glutil/context_darwin_desktop.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && !ios -// +build darwin,!ios package glutil diff --git a/exp/gl/glutil/context_x11.go b/exp/gl/glutil/context_x11.go index 394f1b197..826b026d5 100644 --- a/exp/gl/glutil/context_x11.go +++ b/exp/gl/glutil/context_x11.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux && !android -// +build linux,!android package glutil diff --git a/exp/gl/glutil/glimage.go b/exp/gl/glutil/glimage.go index ffe953d54..72a205f8c 100644 --- a/exp/gl/glutil/glimage.go +++ b/exp/gl/glutil/glimage.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build linux || darwin || windows -// +build linux darwin windows package glutil diff --git a/exp/gl/glutil/glimage_test.go b/exp/gl/glutil/glimage_test.go index 975e30504..2468303b4 100644 --- a/exp/gl/glutil/glimage_test.go +++ b/exp/gl/glutil/glimage_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || (linux && !android) -// +build darwin linux,!android // TODO(crawshaw): Run tests on other OSs when more contexts are supported. diff --git a/exp/gl/glutil/glutil.go b/exp/gl/glutil/glutil.go index 18b09113b..880b97e28 100644 --- a/exp/gl/glutil/glutil.go +++ b/exp/gl/glutil/glutil.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || linux || windows -// +build darwin linux windows package glutil // import "golang.org/x/mobile/exp/gl/glutil" diff --git a/exp/sensor/android.go b/exp/sensor/android.go index ad8a98b6e..a44861450 100644 --- a/exp/sensor/android.go +++ b/exp/sensor/android.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build android -// +build android package sensor diff --git a/exp/sensor/darwin_armx.go b/exp/sensor/darwin_armx.go index 2c8df049a..699a7aa72 100644 --- a/exp/sensor/darwin_armx.go +++ b/exp/sensor/darwin_armx.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin && (arm || arm64) -// +build darwin -// +build arm arm64 package sensor diff --git a/exp/sensor/notmobile.go b/exp/sensor/notmobile.go index 3362e548c..dc6f328c0 100644 --- a/exp/sensor/notmobile.go +++ b/exp/sensor/notmobile.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build (linux && !android) || (darwin && !arm && !arm64) || windows -// +build linux,!android darwin,!arm,!arm64 windows package sensor diff --git a/exp/sprite/glsprite/glsprite.go b/exp/sprite/glsprite/glsprite.go index 4f2522b54..1e9fa0cda 100644 --- a/exp/sprite/glsprite/glsprite.go +++ b/exp/sprite/glsprite/glsprite.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || linux || windows -// +build darwin linux windows // Package glsprite implements a sprite Engine using OpenGL ES 2. // diff --git a/gl/gendebug.go b/gl/gendebug.go index 2e6563cd8..146826f07 100644 --- a/gl/gendebug.go +++ b/gl/gendebug.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore // The gendebug program takes gl.go and generates a version of it // where each function includes tracing code that writes its arguments @@ -885,8 +884,7 @@ const preamble = `// Copyright 2014 The Go Authors. All rights reserved. // Code generated from gl.go using go generate. DO NOT EDIT. // See doc.go for details. -// +build darwin linux openbsd windows -// +build gldebug +//go:build (darwin || linux || openbsd || windows) && gldebug package gl diff --git a/gl/gl.go b/gl/gl.go index 195a30919..28e747b09 100644 --- a/gl/gl.go +++ b/gl/gl.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin || linux || openbsd || windows) && !gldebug -// +build darwin linux openbsd windows -// +build !gldebug package gl diff --git a/gl/gldebug.go b/gl/gldebug.go index 5a4bf71da..fb79bb7ac 100644 --- a/gl/gldebug.go +++ b/gl/gldebug.go @@ -6,8 +6,6 @@ // See doc.go for details. //go:build (darwin || linux || openbsd || windows) && gldebug -// +build darwin linux openbsd windows -// +build gldebug package gl diff --git a/gl/types_debug.go b/gl/types_debug.go index b6dbaaad0..ea011704e 100644 --- a/gl/types_debug.go +++ b/gl/types_debug.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin || linux || openbsd || windows) && gldebug -// +build darwin linux openbsd windows -// +build gldebug package gl diff --git a/gl/types_prod.go b/gl/types_prod.go index e1c8b423c..f87f91f75 100644 --- a/gl/types_prod.go +++ b/gl/types_prod.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (darwin || linux || openbsd || windows) && !gldebug -// +build darwin linux openbsd windows -// +build !gldebug package gl diff --git a/gl/work.go b/gl/work.go index 65eaf9a23..c603adfe6 100644 --- a/gl/work.go +++ b/gl/work.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build darwin || linux || openbsd -// +build darwin linux openbsd package gl diff --git a/gl/work_other.go b/gl/work_other.go index b4b48f445..3bc597d43 100644 --- a/gl/work_other.go +++ b/gl/work_other.go @@ -3,8 +3,6 @@ // license that can be found in the LICENSE file. //go:build (!cgo || (!darwin && !linux && !openbsd)) && !windows -// +build !cgo !darwin,!linux,!openbsd -// +build !windows package gl diff --git a/go.mod b/go.mod index 56984a74e..3b8143300 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module golang.org/x/mobile -go 1.17 +go 1.18 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 diff --git a/internal/binres/genarsc.go b/internal/binres/genarsc.go index 4ec35fbc5..2e71f29f0 100644 --- a/internal/binres/genarsc.go +++ b/internal/binres/genarsc.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ignore -// +build ignore // Genarsc generates stripped down version of android.jar resources used // for validation of manifest entries. From dc64209e86f1af016ddbda6a5fb7a6e45adf32b5 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 6 Sep 2023 01:38:57 +0900 Subject: [PATCH 05/51] cmd/gomobile: add go statements to autogenerated go.mod files go.mod files are automatically generated in a temporary working directory in order to resolve dependencies. The go.mod files didn't include go statements, which means a Go compiler tried to resolve dependencies in the most conservative way. In this way, some paths could not be resolved as ambiguous paths (e.g. golang.org/x/exp vs golang.org/x/exp/shiny). This CL fixes this issue by giving a go statement to the go.mod files. Fixes golang/go#62458 Change-Id: Ibabd1974f8cd7a3e01eb89994080e32a7115693a Reviewed-on: https://go-review.googlesource.com/c/mobile/+/525695 Run-TryBot: Hajime Hoshi Reviewed-by: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov Reviewed-by: Hyang-Ah Hana Kim TryBot-Result: Gopher Robot --- cmd/gomobile/bind.go | 29 +++++++++++-- cmd/gomobile/bind_test.go | 90 ++++++++++++++++++++++++++++++++++++--- cmd/gomobile/main.go | 24 +++++++---- 3 files changed, 124 insertions(+), 19 deletions(-) diff --git a/cmd/gomobile/bind.go b/cmd/gomobile/bind.go index 11b406256..fc9f75631 100644 --- a/cmd/gomobile/bind.go +++ b/cmd/gomobile/bind.go @@ -251,7 +251,9 @@ func getModuleVersions(targetPlatform string, targetArch string, src string) (*m } f := &modfile.File{} - f.AddModuleStmt("gobind") + if err := f.AddModuleStmt("gobind"); err != nil { + return nil, err + } e := json.NewDecoder(bytes.NewReader(output)) for { var mod *Module @@ -266,13 +268,19 @@ func getModuleVersions(targetPlatform string, targetArch string, src string) (*m // replaced by a local directory p = mod.Replace.Dir } - f.AddReplace(mod.Path, mod.Version, p, v) + if err := f.AddReplace(mod.Path, mod.Version, p, v); err != nil { + return nil, err + } } else { // When the version part is empty, the module is local and mod.Dir represents the location. if v := mod.Version; v == "" { - f.AddReplace(mod.Path, mod.Version, mod.Dir, "") + if err := f.AddReplace(mod.Path, mod.Version, mod.Dir, ""); err != nil { + return nil, err + } } else { - f.AddRequire(mod.Path, v) + if err := f.AddRequire(mod.Path, v); err != nil { + return nil, err + } } } } @@ -280,6 +288,19 @@ func getModuleVersions(targetPlatform string, targetArch string, src string) (*m break } } + + v, err := ensureGoVersion() + if err != nil { + return nil, err + } + // ensureGoVersion can return an empty string for a devel version. In this case, use the minimum version. + if v == "" { + v = fmt.Sprintf("go1.%d", minimumGoMinorVersion) + } + if err := f.AddGoStmt(strings.TrimPrefix(v, "go")); err != nil { + return nil, err + } + return f, nil } diff --git a/cmd/gomobile/bind_test.go b/cmd/gomobile/bind_test.go index 22a88d533..42d3f1110 100644 --- a/cmd/gomobile/bind_test.go +++ b/cmd/gomobile/bind_test.go @@ -6,7 +6,6 @@ package main import ( "bytes" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -251,16 +250,75 @@ func TestBindAppleAll(t *testing.T) { } } +const ambiguousPathsGoMod = `module ambiguouspaths + +go 1.18 + +require golang.org/x/mobile v0.0.0-20230905140555-fbe1c053b6a9 + +require ( + golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 // indirect + golang.org/x/image v0.11.0 // indirect + golang.org/x/sys v0.11.0 // indirect +) +` + +const ambiguousPathsGoSum = `github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= +golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= +golang.org/x/image v0.11.0 h1:ds2RoQvBvYTiJkwpSFDwCcDFNX7DqjL2WsUgTNk0Ooo= +golang.org/x/image v0.11.0/go.mod h1:bglhjqbqVuEb9e9+eNR45Jfu7D+T4Qan+NhQk8Ck2P8= +golang.org/x/mobile v0.0.0-20230905140555-fbe1c053b6a9 h1:LaLfQUz4L1tfuOlrtEouZLZ0qHDwKn87E1NKoiudP/o= +golang.org/x/mobile v0.0.0-20230905140555-fbe1c053b6a9/go.mod h1:2jxcxt/JNJik+N+QcB8q308+SyrE3bu43+sGZDmJ02M= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +` + +const ambiguousPathsGo = `package ambiguouspaths + +import ( + _ "golang.org/x/mobile/app" +) + +func Dummy() {} +` + func TestBindWithGoModules(t *testing.T) { if runtime.GOOS == "android" || runtime.GOOS == "ios" { t.Skipf("gomobile and gobind are not available on %s", runtime.GOOS) } - dir, err := ioutil.TempDir("", "gomobile-test") - if err != nil { - t.Fatal(err) - } - defer os.RemoveAll(dir) + dir := t.TempDir() if out, err := exec.Command("go", "build", "-o="+dir, "golang.org/x/mobile/cmd/gobind").CombinedOutput(); err != nil { t.Fatalf("%v: %s", err, string(out)) @@ -273,7 +331,22 @@ func TestBindWithGoModules(t *testing.T) { path += string(filepath.ListSeparator) + p } + // Create a source package dynamically to avoid go.mod files in this repository. See golang/go#34352 for more details. + if err := os.Mkdir(filepath.Join(dir, "ambiguouspaths"), 0755); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(dir, "ambiguouspaths", "go.mod"), []byte(ambiguousPathsGoMod), 0644); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(dir, "ambiguouspaths", "go.sum"), []byte(ambiguousPathsGoSum), 0644); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(dir, "ambiguouspaths", "ambiguouspaths.go"), []byte(ambiguousPathsGo), 0644); err != nil { + t.Fatal(err) + } + for _, target := range []string{"android", "ios"} { + target := target t.Run(target, func(t *testing.T) { switch target { case "android": @@ -308,6 +381,11 @@ func TestBindWithGoModules(t *testing.T) { Path: "./bind/testdata/cgopkg", Dir: filepath.Join("..", ".."), }, + { + Name: "Ambiguous Paths", + Path: ".", + Dir: filepath.Join(dir, "ambiguouspaths"), + }, } for _, tc := range tests { diff --git a/cmd/gomobile/main.go b/cmd/gomobile/main.go index 9814a0d49..fe6fd7e16 100644 --- a/cmd/gomobile/main.go +++ b/cmd/gomobile/main.go @@ -9,7 +9,6 @@ package main import ( "bufio" "bytes" - "errors" "flag" "fmt" "html/template" @@ -24,9 +23,11 @@ import ( var ( gomobileName = "gomobile" - goVersionOut = []byte(nil) + goVersion string ) +const minimumGoMinorVersion = 18 + func printUsage(w io.Writer) { bufw := bufio.NewWriter(w) if err := usageTmpl.Execute(bufw, commands); err != nil { @@ -58,7 +59,7 @@ func main() { return } - if err := determineGoVersion(); err != nil { + if _, err := ensureGoVersion(); err != nil { fmt.Fprintf(os.Stderr, "%s: %v\n", gomobileName, err) os.Exit(1) } @@ -84,20 +85,25 @@ func main() { os.Exit(2) } -func determineGoVersion() error { +func ensureGoVersion() (string, error) { + if goVersion != "" { + return goVersion, nil + } + goVersionOut, err := exec.Command("go", "version").CombinedOutput() if err != nil { - return fmt.Errorf("'go version' failed: %v, %s", err, goVersionOut) + return "", fmt.Errorf("'go version' failed: %v, %s", err, goVersionOut) } var minor int if _, err := fmt.Sscanf(string(goVersionOut), "go version go1.%d", &minor); err != nil { // Ignore unknown versions; it's probably a devel version. - return nil + return "", nil } - if minor < 16 { - return errors.New("Go 1.16 or newer is required") + goVersion = fmt.Sprintf("go1.%d", minor) + if minor < minimumGoMinorVersion { + return "", fmt.Errorf("Go 1.%d or newer is required", minimumGoMinorVersion) } - return nil + return goVersion, nil } func help(args []string) { From 2077a32245712f1a55baf9c461e98b569abe852a Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Wed, 6 Sep 2023 12:21:26 +0000 Subject: [PATCH 06/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I6fe5f820573eed19138f9ec230955e394370798f Reviewed-on: https://go-review.googlesource.com/c/mobile/+/526035 Reviewed-by: Dmitri Shuralyov Reviewed-by: Carlos Amedee LUCI-TryBot-Result: Go LUCI Auto-Submit: Gopher Robot Reviewed-by: Dmitri Shuralyov --- go.mod | 6 +++--- go.sum | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 3b8143300..6815f29e2 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ go 1.18 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.11.0 + golang.org/x/image v0.12.0 golang.org/x/mod v0.12.0 golang.org/x/sync v0.3.0 - golang.org/x/tools v0.12.1-0.20230818130535-1517d1a3ba60 + golang.org/x/tools v0.13.0 ) -require golang.org/x/sys v0.11.0 // indirect +require golang.org/x/sys v0.12.0 // indirect diff --git a/go.sum b/go.sum index a85cc444e..8a8553b7c 100644 --- a/go.sum +++ b/go.sum @@ -3,8 +3,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.11.0 h1:ds2RoQvBvYTiJkwpSFDwCcDFNX7DqjL2WsUgTNk0Ooo= -golang.org/x/image v0.11.0/go.mod h1:bglhjqbqVuEb9e9+eNR45Jfu7D+T4Qan+NhQk8Ck2P8= +golang.org/x/image v0.12.0 h1:w13vZbU4o5rKOFFR8y7M+c4A5jXDC0uXTdHYRP8X2DQ= +golang.org/x/image v0.12.0/go.mod h1:Lu90jvHG7GfemOIcldsh9A2hS01ocl6oNO7ype5mEnk= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= @@ -24,8 +24,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -33,11 +33,11 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.12.1-0.20230818130535-1517d1a3ba60 h1:o4bs4seAAlSiZQAZbO6/RP5XBCZCooQS3Pgc0AUjWts= -golang.org/x/tools v0.12.1-0.20230818130535-1517d1a3ba60/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From e2f452493d570cfe278e63eccec99e62d4c775e5 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 21 Sep 2023 23:55:41 +0900 Subject: [PATCH 07/51] cmd/gomobile: resolve symbolic links as a workaround for an Xcode bug On macOS, a temporary directory starts with /var, which is a symbolic link to /private/var. And in gomobile, a temporary directory is usually used as a working directly. Unfortunately, xcodebuild in Xcode 15 seems to have a bug and might not be able to understand fullpaths with symbolic links. As a workaround, resolve the path with symbolic links by filepath.EvalSymlinks. Fixes golang/go#63141 Change-Id: Ieb684223192fc3e354b79dededaecdb0b25937e6 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/530135 TryBot-Result: Gopher Robot Run-TryBot: Hajime Hoshi Reviewed-by: Bryan Mills Reviewed-by: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov Auto-Submit: Hajime Hoshi --- cmd/gomobile/bind_iosapp.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/gomobile/bind_iosapp.go b/cmd/gomobile/bind_iosapp.go index a9f7a7f53..38437439c 100644 --- a/cmd/gomobile/bind_iosapp.go +++ b/cmd/gomobile/bind_iosapp.go @@ -269,6 +269,14 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo) xcframeworkArgs := []string{"-create-xcframework"} for _, dir := range frameworkDirs { + // On macOS, a temporary directory starts with /var, which is a symbolic link to /private/var. + // And in gomobile, a temporary directory is usually used as a working directly. + // Unfortunately, xcodebuild in Xcode 15 seems to have a bug and might not be able to understand fullpaths with symbolic links. + // As a workaround, resolve the path with symbolic links by filepath.EvalSymlinks. + dir, err := filepath.EvalSymlinks(dir) + if err != nil { + return err + } xcframeworkArgs = append(xcframeworkArgs, "-framework", dir) } From 2b44d11868fe87303c853ff0f8b8a8b0c33da4f2 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Fri, 6 Oct 2023 11:09:39 +0000 Subject: [PATCH 08/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: Ia243abc717b04a327f90fb0db14cd40504bcf412 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/533380 LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov Reviewed-by: Carlos Amedee Auto-Submit: Gopher Robot --- go.mod | 10 +++++----- go.sum | 51 ++++++++++----------------------------------------- 2 files changed, 15 insertions(+), 46 deletions(-) diff --git a/go.mod b/go.mod index 6815f29e2..4d5636222 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ go 1.18 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.12.0 - golang.org/x/mod v0.12.0 - golang.org/x/sync v0.3.0 - golang.org/x/tools v0.13.0 + golang.org/x/image v0.13.0 + golang.org/x/mod v0.13.0 + golang.org/x/sync v0.4.0 + golang.org/x/tools v0.14.0 ) -require golang.org/x/sys v0.12.0 // indirect +require golang.org/x/sys v0.13.0 // indirect diff --git a/go.sum b/go.sum index 8a8553b7c..a1e5b027a 100644 --- a/go.sum +++ b/go.sum @@ -1,43 +1,12 @@ -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.12.0 h1:w13vZbU4o5rKOFFR8y7M+c4A5jXDC0uXTdHYRP8X2DQ= -golang.org/x/image v0.12.0/go.mod h1:Lu90jvHG7GfemOIcldsh9A2hS01ocl6oNO7ype5mEnk= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/image v0.13.0 h1:3cge/F/QTkNLauhf2QoE9zp+7sr+ZcL4HnoZmdwg9sg= +golang.org/x/image v0.13.0/go.mod h1:6mmbMOeV28HuMTgA6OSRkdXKYw/t5W9Uwn2Yv1r3Yxk= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= From 35478a0c49da882188b186a3893d45be6ff74327 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Wed, 8 Nov 2023 22:58:57 +0000 Subject: [PATCH 09/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I4f17695a3f1568ad38c6cf63e51d2f0d58c59ffc Reviewed-on: https://go-review.googlesource.com/c/mobile/+/540821 Reviewed-by: Heschi Kreinick Auto-Submit: Gopher Robot LUCI-TryBot-Result: Go LUCI Reviewed-by: Carlos Amedee --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 4d5636222..56b6bdb0d 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ go 1.18 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.13.0 - golang.org/x/mod v0.13.0 - golang.org/x/sync v0.4.0 - golang.org/x/tools v0.14.0 + golang.org/x/image v0.14.0 + golang.org/x/mod v0.14.0 + golang.org/x/sync v0.5.0 + golang.org/x/tools v0.15.0 ) -require golang.org/x/sys v0.13.0 // indirect +require golang.org/x/sys v0.14.0 // indirect diff --git a/go.sum b/go.sum index a1e5b027a..26aecf893 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.13.0 h1:3cge/F/QTkNLauhf2QoE9zp+7sr+ZcL4HnoZmdwg9sg= -golang.org/x/image v0.13.0/go.mod h1:6mmbMOeV28HuMTgA6OSRkdXKYw/t5W9Uwn2Yv1r3Yxk= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= -golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= +golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= +golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= From 76ac6878050a2eef81867f2c6c21108e59919e8f Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Mon, 27 Nov 2023 18:30:54 +0000 Subject: [PATCH 10/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I220944631310aa41f80e4862d64df04036e7f36f Reviewed-on: https://go-review.googlesource.com/c/mobile/+/545256 LUCI-TryBot-Result: Go LUCI Auto-Submit: Gopher Robot Reviewed-by: Heschi Kreinick Reviewed-by: Dmitri Shuralyov --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 56b6bdb0d..7323bc3d6 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( golang.org/x/image v0.14.0 golang.org/x/mod v0.14.0 golang.org/x/sync v0.5.0 - golang.org/x/tools v0.15.0 + golang.org/x/tools v0.16.0 ) -require golang.org/x/sys v0.14.0 // indirect +require golang.org/x/sys v0.15.0 // indirect diff --git a/go.sum b/go.sum index 26aecf893..1b5415417 100644 --- a/go.sum +++ b/go.sum @@ -6,7 +6,7 @@ golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= +golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= From c713f31d574bb632a93f169b2cc99c9e753fef0e Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Thu, 11 Jan 2024 22:58:17 +0000 Subject: [PATCH 11/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I5c0afe458ee23e43bc4cb0619d9297b0a7795aa1 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/555518 Auto-Submit: Gopher Robot LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov Reviewed-by: Than McIntosh --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 7323bc3d6..ee2c3f2ff 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ go 1.18 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.14.0 + golang.org/x/image v0.15.0 golang.org/x/mod v0.14.0 - golang.org/x/sync v0.5.0 - golang.org/x/tools v0.16.0 + golang.org/x/sync v0.6.0 + golang.org/x/tools v0.17.0 ) -require golang.org/x/sys v0.15.0 // indirect +require golang.org/x/sys v0.16.0 // indirect diff --git a/go.sum b/go.sum index 1b5415417..cfc97dfdc 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= -golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= +golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8= +golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= -golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= From d1f7d34360758c8fa4e81b703102e5a1e44e65f5 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Mon, 12 Feb 2024 23:03:23 +0000 Subject: [PATCH 12/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I580f00b3c82b1bc521470eddc78ef5b3a3e48300 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/563557 Auto-Submit: Gopher Robot Reviewed-by: Than McIntosh LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index ee2c3f2ff..dfdab4142 100644 --- a/go.mod +++ b/go.mod @@ -5,9 +5,9 @@ go 1.18 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 golang.org/x/image v0.15.0 - golang.org/x/mod v0.14.0 + golang.org/x/mod v0.15.0 golang.org/x/sync v0.6.0 - golang.org/x/tools v0.17.0 + golang.org/x/tools v0.18.0 ) -require golang.org/x/sys v0.16.0 // indirect +require golang.org/x/sys v0.17.0 // indirect diff --git a/go.sum b/go.sum index cfc97dfdc..69b595b04 100644 --- a/go.sum +++ b/go.sum @@ -2,11 +2,11 @@ golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1 golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8= golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= From 19e4cdff4698e6e1e3332362aa283798fd26aa8c Mon Sep 17 00:00:00 2001 From: scosman Date: Sun, 17 Mar 2024 14:28:57 +0000 Subject: [PATCH 13/51] cmd/gomobile: fix a compatibility issue with Xcode 15.3 This change adds compatibility for Xcode 15.3 to "gomobile bind" for building xcframeworks. - New blank Info.plist in the *.framework target root - Add CFBundleExecutable and CFBundleIdentifier to the resource level Info.plist Tested locally on my framework on Xcode 15.3 (fixes issue) and 15.2 (doesn't create new issues). Would love to get some more folks to try this fix, to make sure it works broadly. Note: I'm using the framework name as the bundleID. Some chance of collision here, but didn't want to add a required top level cmd parameter. I don't *think* a collision is a serious concern, but I'm not an apple build system expert. To test: - sync my branch - build go mobile: `go build` in the `cmd/gomobile` dir - Build your xcframework with this version of go mobile: `gomobile bind ... ` - Launch a project using the xcframework in Xcode 15.3, and run in simulator Fixes golang/go#66018 Change-Id: I3e8ee99adb09071aa89a541dc97271a44b552ea3 GitHub-Last-Rev: 6277c7d66a26efa8b9ff99dea191eeb7bef136a6 GitHub-Pull-Request: golang/mobile#96 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/572175 TryBot-Result: Gopher Robot TryBot-Bypass: Hyang-Ah Hana Kim Reviewed-by: Hajime Hoshi Reviewed-by: Dmitri Shuralyov Run-TryBot: Hajime Hoshi Reviewed-by: Hyang-Ah Hana Kim Auto-Submit: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov --- cmd/gomobile/bind_iosapp.go | 45 +++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/cmd/gomobile/bind_iosapp.go b/cmd/gomobile/bind_iosapp.go index 38437439c..e92aa369c 100644 --- a/cmd/gomobile/bind_iosapp.go +++ b/cmd/gomobile/bind_iosapp.go @@ -5,6 +5,8 @@ package main import ( + "bytes" + "encoding/xml" "errors" "fmt" "io" @@ -230,6 +232,14 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo) if err != nil { return err } + + err = writeFile(filepath.Join(frameworkDir, "Info.plist"), func(w io.Writer) error { + _, err := w.Write([]byte(appleBlankInfoPlist)) + return err + }) + if err != nil { + return err + } } if err := mkdir(filepath.Join(versionsADir, "Resources")); err != nil { @@ -239,7 +249,15 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo) return err } err = writeFile(filepath.Join(frameworkDir, "Resources", "Info.plist"), func(w io.Writer) error { - _, err := w.Write([]byte(appleBindInfoPlist)) + infoFrameworkPlistlData := infoFrameworkPlistlData{ + BundleID: escapePlistValue(rfc1034Label(title)), + ExecutableName: escapePlistValue(title), + } + infoplist := new(bytes.Buffer) + if err := infoFrameworkPlistTmpl.Execute(infoplist, infoFrameworkPlistlData); err != nil { + return err + } + _, err := w.Write(infoplist.Bytes()) return err }) if err != nil { @@ -286,7 +304,7 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo) return err } -const appleBindInfoPlist = ` +const appleBlankInfoPlist = ` @@ -294,6 +312,29 @@ const appleBindInfoPlist = ` ` +type infoFrameworkPlistlData struct { + BundleID string + ExecutableName string +} + +var infoFrameworkPlistTmpl = template.Must(template.New("infoFrameworkPlist").Parse(` + + + + CFBundleExecutable + {{.ExecutableName}} + CFBundleIdentifier + {{.BundleID}} + + +`)) + +func escapePlistValue(value string) string { + var b bytes.Buffer + xml.EscapeText(&b, []byte(value)) + return b.String() +} + var appleModuleMapTmpl = template.Must(template.New("iosmmap").Parse(`framework module "{{.Module}}" { header "ref.h" {{range .Headers}} header "{{.}}" From c58ccf4b0c872b591d01fb9385f3cc4a71edfc49 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Tue, 5 Mar 2024 00:07:47 +0000 Subject: [PATCH 14/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: Ia4925c83dad0a905dc8b74b8494a0d750fbe18be Reviewed-on: https://go-review.googlesource.com/c/mobile/+/569055 LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov Auto-Submit: Gopher Robot Reviewed-by: Dmitri Shuralyov Reviewed-by: Than McIntosh --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index dfdab4142..1af8e5dca 100644 --- a/go.mod +++ b/go.mod @@ -5,9 +5,9 @@ go 1.18 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 golang.org/x/image v0.15.0 - golang.org/x/mod v0.15.0 + golang.org/x/mod v0.16.0 golang.org/x/sync v0.6.0 - golang.org/x/tools v0.18.0 + golang.org/x/tools v0.19.0 ) -require golang.org/x/sys v0.17.0 // indirect +require golang.org/x/sys v0.18.0 // indirect diff --git a/go.sum b/go.sum index 69b595b04..a7475d851 100644 --- a/go.sum +++ b/go.sum @@ -2,11 +2,11 @@ golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1 golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8= golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= From c76e57eead388dbb2912348f6598b6716b8f6535 Mon Sep 17 00:00:00 2001 From: vitalmotif Date: Wed, 20 Mar 2024 11:28:43 +0000 Subject: [PATCH 15/51] all: remove the repetitive words Change-Id: Ifdadb14d311a3620e499f0b33feefa3e0448a6f1 GitHub-Last-Rev: 4c346f55374cb8ab87c7a258c7d4ed932faa25ad GitHub-Pull-Request: golang/mobile#97 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/573035 Reviewed-by: Hajime Hoshi Reviewed-by: Hyang-Ah Hana Kim Reviewed-by: Dmitri Shuralyov Auto-Submit: Dmitri Shuralyov Run-TryBot: Hajime Hoshi TryBot-Result: Gopher Robot LUCI-TryBot-Result: Go LUCI Auto-Submit: Hyang-Ah Hana Kim --- bind/genobjc.go | 2 +- geom/geom.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bind/genobjc.go b/bind/genobjc.go index d0982207d..d5914138a 100644 --- a/bind/genobjc.go +++ b/bind/genobjc.go @@ -977,7 +977,7 @@ func (g *ObjcGen) genInterfaceMethodProxy(obj *types.TypeName, m *types.Func) { if isErrorType(obj.Type()) && m.Name() == "Error" { // As a special case, ObjC NSErrors are passed to Go pretending to implement the Go error interface. - // They don't actually have an Error method, so calls to to it needs to be rerouted. + // They don't actually have an Error method, so calls to it needs to be rerouted. g.Printf("%s = [o localizedDescription];\n", s.retParams[0].name) } else { if s.ret == "void" { diff --git a/geom/geom.go b/geom/geom.go index 23cf67bea..1bfd14f3e 100644 --- a/geom/geom.go +++ b/geom/geom.go @@ -74,7 +74,7 @@ import "fmt" // // The unit Pt is a typographical point, 1/72 of an inch (0.3527 mm). // -// It can be be converted to a length in current device pixels by +// It can be converted to a length in current device pixels by // multiplying with PixelsPerPt after app initialization is complete. type Pt float32 From 268e6c3a80d13e6acfd3b93ef02c3e2605e1ef46 Mon Sep 17 00:00:00 2001 From: scosman Date: Mon, 25 Mar 2024 16:46:07 +0000 Subject: [PATCH 16/51] cmd/gomobile: produce frameworks which follow Apple's specs per platform, fixing Xcode 15.3 compatibility issues This patch updates the framework generation code to follow the Apple spec for placing content: https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle Previously, we setup the framework in MacOS format, and used symlinks to make it compatible with iOS format. This approach no longer works (it works locally in simulator, but causes signing issues when attempting to upload apps for distribution, or running on real hardware). We now setup the expected bundle format for each platform. Other benefits: - Thirds the size of the xcframework and resulting app binary when distributing the xcframework by zip (common for SPM and other formats). The symlinks resulted in duplicate files after zipping, which made it into the final app. - Set MinimumOSVersion, fixing SPM compatibility issue - Eliminates the blank Info.plist - Initial testing shows this also fixes golang/go#66406 (code signing issues) as a side effect of using the proper format Testing: - Tested all 4 platforms (iOS, simulator, macOS, Catalyst) on Xcode 15.3 Fixes golang/go#66406 Fixes golang/go#66500 Change-Id: I8538989efe67cb0d2d0496087dcbeca923c3dffe GitHub-Last-Rev: 28dca85888bedcc5eb44d3c74af6b88cf5121914 GitHub-Pull-Request: golang/mobile#98 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/574055 Reviewed-by: Dmitri Shuralyov Reviewed-by: Hajime Hoshi Auto-Submit: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: Than McIntosh Reviewed-by: Dmitri Shuralyov --- cmd/gomobile/bind_iosapp.go | 109 ++++++++++++++++++++++-------------- 1 file changed, 67 insertions(+), 42 deletions(-) diff --git a/cmd/gomobile/bind_iosapp.go b/cmd/gomobile/bind_iosapp.go index e92aa369c..e8ebcc770 100644 --- a/cmd/gomobile/bind_iosapp.go +++ b/cmd/gomobile/bind_iosapp.go @@ -151,9 +151,12 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo) frameworkDirs = append(frameworkDirs, frameworkDir) frameworkArchCount[frameworkDir] = frameworkArchCount[frameworkDir] + 1 - versionsDir := filepath.Join(frameworkDir, "Versions") - versionsADir := filepath.Join(versionsDir, "A") - titlePath := filepath.Join(versionsADir, title) + frameworkLayout, err := frameworkLayoutForTarget(t, title) + if err != nil { + return err + } + + titlePath := filepath.Join(frameworkDir, frameworkLayout.binaryPath, title) if frameworkArchCount[frameworkDir] > 1 { // Not the first static lib, attach to a fat library and skip create headers fatCmd := exec.Command( @@ -166,17 +169,8 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo) continue } - versionsAHeadersDir := filepath.Join(versionsADir, "Headers") - if err := mkdir(versionsAHeadersDir); err != nil { - return err - } - if err := symlink("A", filepath.Join(versionsDir, "Current")); err != nil { - return err - } - if err := symlink("Versions/Current/Headers", filepath.Join(frameworkDir, "Headers")); err != nil { - return err - } - if err := symlink(filepath.Join("Versions/Current", title), filepath.Join(frameworkDir, title)); err != nil { + headersDir := filepath.Join(frameworkDir, frameworkLayout.headerPath) + if err := mkdir(headersDir); err != nil { return err } @@ -199,7 +193,7 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo) if len(fileBases) == 1 { headerFiles = append(headerFiles, title+".h") err := copyFile( - filepath.Join(versionsAHeadersDir, title+".h"), + filepath.Join(headersDir, title+".h"), filepath.Join(gobindDir, bindPrefix+title+".objc.h"), ) if err != nil { @@ -209,7 +203,7 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo) for _, fileBase := range fileBases { headerFiles = append(headerFiles, fileBase+".objc.h") err := copyFile( - filepath.Join(versionsAHeadersDir, fileBase+".objc.h"), + filepath.Join(headersDir, fileBase+".objc.h"), filepath.Join(gobindDir, fileBase+".objc.h"), ) if err != nil { @@ -217,14 +211,14 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo) } } err := copyFile( - filepath.Join(versionsAHeadersDir, "ref.h"), + filepath.Join(headersDir, "ref.h"), filepath.Join(gobindDir, "ref.h"), ) if err != nil { return err } headerFiles = append(headerFiles, title+".h") - err = writeFile(filepath.Join(versionsAHeadersDir, title+".h"), func(w io.Writer) error { + err = writeFile(filepath.Join(headersDir, title+".h"), func(w io.Writer) error { return appleBindHeaderTmpl.Execute(w, map[string]interface{}{ "pkgs": pkgs, "title": title, "bases": fileBases, }) @@ -232,23 +226,13 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo) if err != nil { return err } - - err = writeFile(filepath.Join(frameworkDir, "Info.plist"), func(w io.Writer) error { - _, err := w.Write([]byte(appleBlankInfoPlist)) - return err - }) - if err != nil { - return err - } } - if err := mkdir(filepath.Join(versionsADir, "Resources")); err != nil { - return err - } - if err := symlink("Versions/Current/Resources", filepath.Join(frameworkDir, "Resources")); err != nil { + frameworkInfoPlistDir := filepath.Join(frameworkDir, frameworkLayout.infoPlistPath) + if err := mkdir(frameworkInfoPlistDir); err != nil { return err } - err = writeFile(filepath.Join(frameworkDir, "Resources", "Info.plist"), func(w io.Writer) error { + err = writeFile(filepath.Join(frameworkInfoPlistDir, "Info.plist"), func(w io.Writer) error { infoFrameworkPlistlData := infoFrameworkPlistlData{ BundleID: escapePlistValue(rfc1034Label(title)), ExecutableName: escapePlistValue(title), @@ -271,15 +255,18 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo) Module: title, Headers: headerFiles, } - err = writeFile(filepath.Join(versionsADir, "Modules", "module.modulemap"), func(w io.Writer) error { + modulesDir := filepath.Join(frameworkDir, frameworkLayout.modulePath) + err = writeFile(filepath.Join(modulesDir, "module.modulemap"), func(w io.Writer) error { return appleModuleMapTmpl.Execute(w, mmVals) }) if err != nil { return err } - err = symlink(filepath.Join("Versions/Current/Modules"), filepath.Join(frameworkDir, "Modules")) - if err != nil { - return err + + for src, dst := range frameworkLayout.symlinks { + if err := symlink(src, filepath.Join(frameworkDir, dst)); err != nil { + return err + } } } @@ -304,19 +291,53 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo) return err } -const appleBlankInfoPlist = ` - - - - - -` +type frameworkLayout struct { + headerPath string + binaryPath string + modulePath string + infoPlistPath string + // symlinks to create in the framework. Maps src (relative to dst) -> dst (relative to framework bundle root) + symlinks map[string]string +} + +// frameworkLayoutForTarget generates the filestructure for a framework for the given target platform (macos, ios, etc), +// according to Apple's spec https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle +func frameworkLayoutForTarget(t targetInfo, title string) (*frameworkLayout, error) { + switch t.platform { + case "macos", "maccatalyst": + return &frameworkLayout{ + headerPath: "Versions/A/Headers", + binaryPath: "Versions/A", + modulePath: "Versions/A/Modules", + infoPlistPath: "Versions/A/Resources", + symlinks: map[string]string{ + "A": "Versions/Current", + "Versions/Current/Resources": "Resources", + "Versions/Current/Headers": "Headers", + "Versions/Current/Modules": "Modules", + filepath.Join("Versions/Current", title): title, + }, + }, nil + case "ios", "iossimulator": + return &frameworkLayout{ + headerPath: "Headers", + binaryPath: ".", + modulePath: "Modules", + infoPlistPath: ".", + }, nil + } + + return nil, fmt.Errorf("unsupported platform %q", t.platform) +} type infoFrameworkPlistlData struct { BundleID string ExecutableName string } +// infoFrameworkPlistTmpl is a template for the Info.plist file in a framework. +// Minimum OS version == 100.0 is a workaround for SPM issue +// https://github.com/firebase/firebase-ios-sdk/pull/12439/files#diff-f4eb4ff5ec89af999cbe8fa3ffe5647d7853ffbc9c1515b337ca043c684b6bb4R679 var infoFrameworkPlistTmpl = template.Must(template.New("infoFrameworkPlist").Parse(` @@ -325,6 +346,10 @@ var infoFrameworkPlistTmpl = template.Must(template.New("infoFrameworkPlist").Pa {{.ExecutableName}} CFBundleIdentifier {{.BundleID}} + MinimumOSVersion + 100.0 + CFBundlePackageType + FMWK `)) From 365c3533877076b351b0f5611a486ca6840d6864 Mon Sep 17 00:00:00 2001 From: scosman Date: Fri, 29 Mar 2024 00:30:25 +0000 Subject: [PATCH 17/51] cmd/gomobile: add CFBundleShortVersionString and CFBundleVersion, fixing Apple validation/distribution An app containing a framework can't be validated and distributed without these two entries in the framework bundle's `Info.plist`. Using `0.0.epoch` format per discussion here: https://go.dev/issue/66500#issuecomment-2025767017 Tested Xcode 15.3 with: - without keys, fails to validate - with keys: passing validation, distribution upload, and Apple's server validation ("Ready to test" server check). Fixes golang/go#66500 Change-Id: I2e0718247301ec7db36f8d85aea81b203ca7848b GitHub-Last-Rev: 1455c5e8165eecca82a5ab96d7d0c31b36607f7a GitHub-Pull-Request: golang/mobile#100 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/575115 Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Auto-Submit: Dmitri Shuralyov Reviewed-by: Hajime Hoshi Reviewed-by: Than McIntosh --- cmd/gomobile/bind_iosapp.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/gomobile/bind_iosapp.go b/cmd/gomobile/bind_iosapp.go index e8ebcc770..9a3e52169 100644 --- a/cmd/gomobile/bind_iosapp.go +++ b/cmd/gomobile/bind_iosapp.go @@ -15,6 +15,7 @@ import ( "strconv" "strings" "text/template" + "time" "golang.org/x/sync/errgroup" "golang.org/x/tools/go/packages" @@ -233,9 +234,11 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo) return err } err = writeFile(filepath.Join(frameworkInfoPlistDir, "Info.plist"), func(w io.Writer) error { + fmVersion := fmt.Sprintf("0.0.%d", time.Now().Unix()) infoFrameworkPlistlData := infoFrameworkPlistlData{ BundleID: escapePlistValue(rfc1034Label(title)), ExecutableName: escapePlistValue(title), + Version: escapePlistValue(fmVersion), } infoplist := new(bytes.Buffer) if err := infoFrameworkPlistTmpl.Execute(infoplist, infoFrameworkPlistlData); err != nil { @@ -333,6 +336,7 @@ func frameworkLayoutForTarget(t targetInfo, title string) (*frameworkLayout, err type infoFrameworkPlistlData struct { BundleID string ExecutableName string + Version string } // infoFrameworkPlistTmpl is a template for the Info.plist file in a framework. @@ -348,6 +352,10 @@ var infoFrameworkPlistTmpl = template.Must(template.New("infoFrameworkPlist").Pa {{.BundleID}} MinimumOSVersion 100.0 + CFBundleShortVersionString + {{.Version}} + CFBundleVersion + {{.Version}} CFBundlePackageType FMWK From 755f4ef71bbd9f9bd4cc123148409d88a25a2187 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Fri, 16 Feb 2024 11:53:42 -0500 Subject: [PATCH 18/51] cmd/gomobile: fix error message to reflect current build target Change-Id: I94b7d1c7029102c252a77f75929066281040b9f2 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/564856 LUCI-TryBot-Result: Go LUCI Reviewed-by: Emmanuel Odeke Reviewed-by: Hyang-Ah Hana Kim Auto-Submit: Hyang-Ah Hana Kim --- cmd/gomobile/build.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/gomobile/build.go b/cmd/gomobile/build.go index c9483434d..f8895eb31 100644 --- a/cmd/gomobile/build.go +++ b/cmd/gomobile/build.go @@ -160,7 +160,7 @@ func runBuildImpl(cmd *command) (*packages.Package, error) { return pkg, nil } if buildBundleID == "" { - return nil, fmt.Errorf("-target=ios requires -bundleid set") + return nil, fmt.Errorf("-target=%s requires -bundleid set", buildTarget) } nmpkgs, err = goAppleBuild(pkg, buildBundleID, targets) if err != nil { From 09dbf07665ed261ce09d387a5a9aea3e9c29069c Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Thu, 4 Apr 2024 22:17:56 +0000 Subject: [PATCH 19/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: Ie35799c1d449abe67ebd57c89c0d586eae5cfc02 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/576638 Auto-Submit: Gopher Robot LUCI-TryBot-Result: Go LUCI Reviewed-by: Than McIntosh Reviewed-by: Dmitri Shuralyov --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 1af8e5dca..033e1fe96 100644 --- a/go.mod +++ b/go.mod @@ -5,9 +5,9 @@ go 1.18 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 golang.org/x/image v0.15.0 - golang.org/x/mod v0.16.0 - golang.org/x/sync v0.6.0 - golang.org/x/tools v0.19.0 + golang.org/x/mod v0.17.0 + golang.org/x/sync v0.7.0 + golang.org/x/tools v0.20.0 ) -require golang.org/x/sys v0.18.0 // indirect +require golang.org/x/sys v0.19.0 // indirect diff --git a/go.sum b/go.sum index a7475d851..c4c8b2e5b 100644 --- a/go.sum +++ b/go.sum @@ -2,11 +2,11 @@ golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1 golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8= golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= -golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= -golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= From a1a533f289d32c6297d63bfdc30e42c80b5a1f55 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Mon, 6 May 2024 17:52:11 +0000 Subject: [PATCH 20/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I573cd0cd9833927ef61b0c23fe30dc9140dd5696 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/583595 Auto-Submit: Gopher Robot Reviewed-by: Dmitri Shuralyov Reviewed-by: Than McIntosh LUCI-TryBot-Result: Go LUCI --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 033e1fe96..5affd088d 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ go 1.18 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.15.0 + golang.org/x/image v0.16.0 golang.org/x/mod v0.17.0 golang.org/x/sync v0.7.0 - golang.org/x/tools v0.20.0 + golang.org/x/tools v0.21.0 ) -require golang.org/x/sys v0.19.0 // indirect +require golang.org/x/sys v0.20.0 // indirect diff --git a/go.sum b/go.sum index c4c8b2e5b..1a91fae92 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8= -golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= +golang.org/x/image v0.16.0 h1:9kloLAKhUufZhA12l5fwnx2NZW39/we1UhBesW433jw= +golang.org/x/image v0.16.0/go.mod h1:ugSZItdV4nOxyqp56HmXwH0Ry0nBCpjnZdpDaIHdoPs= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= -golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= +golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= From fa72addaaa1b12cbfbf3a6fb1a1d5e54a44ee017 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 18 May 2024 16:37:25 +0900 Subject: [PATCH 21/51] all: replace ALooper_pollAll with ALooper_pollOnce ALooper_pollAll is no longer available as of Android SDK 34. Fixes golang/go#67496 Change-Id: I1f781ef70d569df50d3059ce355a2f7d1edb435a Reviewed-on: https://go-review.googlesource.com/c/mobile/+/586595 Run-TryBot: Hajime Hoshi LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov TryBot-Result: Gopher Robot Reviewed-by: Dmitri Shuralyov Reviewed-by: Hyang-Ah Hana Kim Auto-Submit: Hajime Hoshi --- app/android.go | 2 +- exp/sensor/android.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/android.go b/app/android.go index ebbd4b509..5ee5605e4 100644 --- a/app/android.go +++ b/app/android.go @@ -365,7 +365,7 @@ func runInputQueue(vm, jniEnv, ctx uintptr) error { var q *C.AInputQueue for { - if C.ALooper_pollAll(-1, nil, nil, nil) == C.ALOOPER_POLL_WAKE { + if C.ALooper_pollOnce(-1, nil, nil, nil) == C.ALOOPER_POLL_WAKE { select { default: case p := <-pending: diff --git a/exp/sensor/android.c b/exp/sensor/android.c index 1ac722351..1cf934014 100644 --- a/exp/sensor/android.c +++ b/exp/sensor/android.c @@ -61,7 +61,7 @@ int GoAndroid_readQueue(int n, int32_t* types, int64_t* timestamps, float* vecto // Try n times read from the event queue. // If anytime timeout occurs, don't retry to read and immediately return. // Consume the event queue entirely between polls. - while (i < n && (id = ALooper_pollAll(GO_ANDROID_READ_TIMEOUT_MS, NULL, &events, NULL)) >= 0) { + while (i < n && (id = ALooper_pollOnce(GO_ANDROID_READ_TIMEOUT_MS, NULL, &events, NULL)) >= 0) { if (id != GO_ANDROID_SENSOR_LOOPER_ID) { continue; } From 2782386b8afd99b366f5d2b5738af9f2c82273a5 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Tue, 4 Jun 2024 18:46:36 +0000 Subject: [PATCH 22/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I8374c5df7d1cade76e1898b1d6377edd8c26537a Reviewed-on: https://go-review.googlesource.com/c/mobile/+/590455 Auto-Submit: Gopher Robot Reviewed-by: Dmitri Shuralyov Reviewed-by: Michael Knyszek LUCI-TryBot-Result: Go LUCI --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 5affd088d..b63212b84 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ go 1.18 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.16.0 - golang.org/x/mod v0.17.0 + golang.org/x/image v0.17.0 + golang.org/x/mod v0.18.0 golang.org/x/sync v0.7.0 - golang.org/x/tools v0.21.0 + golang.org/x/tools v0.22.0 ) -require golang.org/x/sys v0.20.0 // indirect +require golang.org/x/sys v0.21.0 // indirect diff --git a/go.sum b/go.sum index 1a91fae92..ed74aec4e 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.16.0 h1:9kloLAKhUufZhA12l5fwnx2NZW39/we1UhBesW433jw= -golang.org/x/image v0.16.0/go.mod h1:ugSZItdV4nOxyqp56HmXwH0Ry0nBCpjnZdpDaIHdoPs= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/image v0.17.0 h1:nTRVVdajgB8zCMZVsViyzhnMKPwYeroEERRC64JuLco= +golang.org/x/image v0.17.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= From b765e5d5218fbc6a3fdae18e37d389b14b2904aa Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Sun, 7 Jul 2024 20:31:24 +0000 Subject: [PATCH 23/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I86ba44822d818d83ac6f24d3456b12a37a974dda Reviewed-on: https://go-review.googlesource.com/c/mobile/+/596996 Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: Than McIntosh Auto-Submit: Gopher Robot --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index b63212b84..7cf4a8b22 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ go 1.18 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.17.0 - golang.org/x/mod v0.18.0 + golang.org/x/image v0.18.0 + golang.org/x/mod v0.19.0 golang.org/x/sync v0.7.0 - golang.org/x/tools v0.22.0 + golang.org/x/tools v0.23.0 ) -require golang.org/x/sys v0.21.0 // indirect +require golang.org/x/sys v0.22.0 // indirect diff --git a/go.sum b/go.sum index ed74aec4e..a28ac815e 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.17.0 h1:nTRVVdajgB8zCMZVsViyzhnMKPwYeroEERRC64JuLco= -golang.org/x/image v0.17.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ= +golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= -golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= From 1ad2df20a8b68aaaeb8a16bb2815d476837050a8 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 16 Jul 2024 11:35:21 -0400 Subject: [PATCH 24/51] LICENSE: update per Google Legal Very minor tweaks: - Remove (c) pseudosymbol. - Remove "All Rights Reserved." - Change "Google Inc." (no longer exists) to "Google LLC". [git-generate] echo ' ,s/\(c\) // ,s/ All rights reserved.// ,s/Google Inc./Google LLC/ w q ' | sam -d LICENSE Change-Id: Ib9d60f53433c8e92a0968c2b6d920876b5f7e7e9 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/598523 LUCI-TryBot-Result: Go LUCI Auto-Submit: Russ Cox Reviewed-by: Ian Lance Taylor --- LICENSE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 6a66aea5e..2a7cf70da 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. From 81131f6468ab9df03bc2b539cac4cf99d79f2447 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Tue, 6 Aug 2024 20:01:20 +0000 Subject: [PATCH 25/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: Id31b88c1c74c05ce63204c3a833ef554ec296112 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/603616 LUCI-TryBot-Result: Go LUCI Auto-Submit: Gopher Robot Reviewed-by: Dmitri Shuralyov Reviewed-by: David Chase --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 7cf4a8b22..d273059ac 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ go 1.18 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.18.0 - golang.org/x/mod v0.19.0 - golang.org/x/sync v0.7.0 - golang.org/x/tools v0.23.0 + golang.org/x/image v0.19.0 + golang.org/x/mod v0.20.0 + golang.org/x/sync v0.8.0 + golang.org/x/tools v0.24.0 ) -require golang.org/x/sys v0.22.0 // indirect +require golang.org/x/sys v0.23.0 // indirect diff --git a/go.sum b/go.sum index a28ac815e..588cf916e 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ= -golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E= -golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= -golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= -golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= +golang.org/x/image v0.19.0 h1:D9FX4QWkLfkeqaC62SonffIIuYdOk/UE2XKUBgRIBIQ= +golang.org/x/image v0.19.0/go.mod h1:y0zrRqlQRWQ5PXaYCOMLTW2fpsxZ8Qh9I/ohnInJEys= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= From 7c4916698cc93475ebfea76748ee0faba2deb2a5 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Wed, 4 Sep 2024 19:26:21 -0400 Subject: [PATCH 26/51] all: fix printf(var) mistakes detected by latest printf checker There's some similarity here to the situation in CL 610676. The calls that now look like g.Printf("%s", something) would perhaps be better expressed like g.Print(something) or g.WriteString(something), but that's a bigger potential change to consider. This is a minimal fix. For golang/go#69267. Change-Id: I9cf23aef7bf2b9d9c7e9dcf3b48ecb23231016dd Reviewed-on: https://go-review.googlesource.com/c/mobile/+/610800 Reviewed-by: Tim King Reviewed-by: Dmitri Shuralyov Reviewed-by: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI Auto-Submit: Dmitri Shuralyov --- bind/genclasses.go | 8 ++++---- bind/gengo.go | 2 +- bind/genjava.go | 18 +++++++++--------- bind/genobjc.go | 2 +- bind/genobjcw.go | 10 ++++------ internal/binres/binres_test.go | 5 +++-- 6 files changed, 22 insertions(+), 23 deletions(-) diff --git a/bind/genclasses.go b/bind/genclasses.go index 8746ab27e..a69d02b36 100644 --- a/bind/genclasses.go +++ b/bind/genclasses.go @@ -381,7 +381,7 @@ func (g *ClassGen) genCMethodBody(cls *java.Class, f *java.Func, virtual bool) { g.Printf("Nonvirtual") } if f.Ret != nil { - g.Printf(f.Ret.JNICallType()) + g.Printf("%s", f.Ret.JNICallType()) } else { g.Printf("Void") } @@ -430,7 +430,7 @@ func (g *ClassGen) genFuncDecl(local bool, fs *java.FuncSet) { if i == len(fs.Params)-1 && fs.Variadic { g.Printf("...") } - g.Printf(g.goType(a, local)) + g.Printf("%s", g.goType(a, local)) } g.Printf(")") if fs.Throws { @@ -879,7 +879,7 @@ func (g *ClassGen) genInterface(cls *java.Class) { if !g.isFuncSetSupported(fs) { continue } - g.Printf(fs.GoName) + g.Printf("%s", fs.GoName) g.genFuncDecl(true, fs) g.Printf("\n") } @@ -904,7 +904,7 @@ func flattenName(n string) string { return strings.Replace(strings.Replace(n, ".", "_", -1), "$", "_", -1) } -var ( +const ( classesPkgHeader = gobindPreamble + ` package Java diff --git a/bind/gengo.go b/bind/gengo.go index 8087c7ad2..bb3634e4f 100644 --- a/bind/gengo.go +++ b/bind/gengo.go @@ -341,7 +341,7 @@ func (g *goGen) genInterface(obj *types.TypeName) { g.Printf(") ") if res.Len() == 1 { - g.Printf(g.typeString(res.At(0).Type())) + g.Printf("%s", g.typeString(res.At(0).Type())) } else if res.Len() == 2 { g.Printf("(%s, error)", g.typeString(res.At(0).Type())) } diff --git a/bind/genjava.go b/bind/genjava.go index b197640aa..f1852a2bc 100644 --- a/bind/genjava.go +++ b/bind/genjava.go @@ -437,7 +437,7 @@ func (g *JavaGen) genConstructor(f *types.Func, n string, jcls bool) { if i > 0 { g.Printf(", ") } - g.Printf(g.paramName(params, i)) + g.Printf("%s", g.paramName(params, i)) } g.Printf(");\n") } @@ -447,7 +447,7 @@ func (g *JavaGen) genConstructor(f *types.Func, n string, jcls bool) { if i > 0 { g.Printf(", ") } - g.Printf(g.paramName(params, i)) + g.Printf("%s", g.paramName(params, i)) } g.Printf(");\n") g.Printf("Seq.trackGoRef(refnum, this);\n") @@ -757,21 +757,21 @@ func (g *JavaGen) genJNIFuncSignature(o *types.Func, sName string, jm *java.Func g.Printf("Java_%s_", g.jniPkgName()) if sName != "" { if proxy { - g.Printf(java.JNIMangle(g.className())) + g.Printf("%s", java.JNIMangle(g.className())) // 0024 is the mangled form of $, for naming inner classes. g.Printf("_00024proxy%s", sName) } else { - g.Printf(java.JNIMangle(g.javaTypeName(sName))) + g.Printf("%s", java.JNIMangle(g.javaTypeName(sName))) } } else { - g.Printf(java.JNIMangle(g.className())) + g.Printf("%s", java.JNIMangle(g.className())) } g.Printf("_") if jm != nil { - g.Printf(jm.JNIName) + g.Printf("%s", jm.JNIName) } else { oName := javaNameReplacer(lowerFirst(o.Name())) - g.Printf(java.JNIMangle(oName)) + g.Printf("%s", java.JNIMangle(oName)) } g.Printf("(JNIEnv* env, ") if sName != "" { @@ -839,9 +839,9 @@ func (g *JavaGen) genFuncSignature(o *types.Func, jm *java.Func, hasThis bool) { g.Printf("%s ", ret) if jm != nil { - g.Printf(jm.Name) + g.Printf("%s", jm.Name) } else { - g.Printf(javaNameReplacer(lowerFirst(o.Name()))) + g.Printf("%s", javaNameReplacer(lowerFirst(o.Name()))) } g.Printf("(") g.genFuncArgs(o, jm, hasThis) diff --git a/bind/genobjc.go b/bind/genobjc.go index d5914138a..b556212a4 100644 --- a/bind/genobjc.go +++ b/bind/genobjc.go @@ -1060,7 +1060,7 @@ func (g *ObjcGen) genStructH(obj *types.TypeName, t *types.Struct) { if oinf != nil { for _, sup := range oinf.supers { if !sup.Protocol { - g.Printf(sup.Name) + g.Printf("%s", sup.Name) } else { prots = append(prots, sup.Name) } diff --git a/bind/genobjcw.go b/bind/genobjcw.go index 1f5ccf63f..731f1ae51 100644 --- a/bind/genobjcw.go +++ b/bind/genobjcw.go @@ -286,14 +286,13 @@ func (g *ObjcWrapper) genCFuncDecl(prefix, name string, f *objc.Func) { case ret != nil && returnsErr: g.Printf("ret_%s", strings.Replace(g.cType(ret), " ", "_", -1)) case ret != nil: - g.Printf(g.cType(ret)) + g.Printf("%s", g.cType(ret)) case returnsErr: g.Printf("int") default: g.Printf("void") } - g.Printf(" ") - g.Printf(prefix) + g.Printf(" %s", prefix) if f.Static { g.Printf("_s") } @@ -397,8 +396,7 @@ func (g *ObjcWrapper) genFuncBody(n *objc.Named, f *objc.Func, prefix string) { if ret != nil || errParam != nil { g.Printf("res := ") } - g.Printf("C.") - g.Printf(prefix) + g.Printf("C.%s", prefix) if f.Static { g.Printf("_s") } @@ -575,7 +573,7 @@ func (g *ObjcWrapper) genInterface(n *objc.Named) { if !g.isFuncSupported(f) { continue } - g.Printf(f.GoName) + g.Printf("%s", f.GoName) g.genFuncDecl(true, f) g.Printf("\n") } diff --git a/internal/binres/binres_test.go b/internal/binres/binres_test.go index dbac875a1..7e4f214c8 100644 --- a/internal/binres/binres_test.go +++ b/internal/binres/binres_test.go @@ -8,6 +8,7 @@ import ( "bytes" "encoding" "encoding/xml" + "errors" "fmt" "io/ioutil" "log" @@ -103,7 +104,7 @@ func compareBytes(a, b []byte) error { fmt.Fprint(buf, "... output truncated.\n") } } - return fmt.Errorf(buf.String()) + return errors.New(buf.String()) } func TestBootstrap(t *testing.T) { @@ -329,7 +330,7 @@ func compareElements(have, want *XML) error { } } if buf.Len() > 0 { - return fmt.Errorf(buf.String()) + return errors.New(buf.String()) } return nil } From 642950227fb3dd9e9ec517d7630b10397f1d5e01 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Mon, 9 Sep 2024 15:51:57 +0000 Subject: [PATCH 27/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I47a97af459b0151af8af9df1bed5ee25312579a9 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/611936 Reviewed-by: Dmitri Shuralyov Reviewed-by: David Chase TryBot-Bypass: Dmitri Shuralyov Auto-Submit: Gopher Robot --- go.mod | 10 +++++----- go.sum | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index d273059ac..2c5f05647 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,13 @@ module golang.org/x/mobile -go 1.18 +go 1.22.0 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.19.0 - golang.org/x/mod v0.20.0 + golang.org/x/image v0.20.0 + golang.org/x/mod v0.21.0 golang.org/x/sync v0.8.0 - golang.org/x/tools v0.24.0 + golang.org/x/tools v0.25.0 ) -require golang.org/x/sys v0.23.0 // indirect +require golang.org/x/sys v0.25.0 // indirect diff --git a/go.sum b/go.sum index 588cf916e..58acbec3a 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.19.0 h1:D9FX4QWkLfkeqaC62SonffIIuYdOk/UE2XKUBgRIBIQ= -golang.org/x/image v0.19.0/go.mod h1:y0zrRqlQRWQ5PXaYCOMLTW2fpsxZ8Qh9I/ohnInJEys= -golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/image v0.20.0 h1:7cVCUjQwfL18gyBJOmYvptfSHS8Fb3YUDtfLIZ7Nbpw= +golang.org/x/image v0.20.0/go.mod h1:0a88To4CYVBAHp5FXJm8o7QbUl37Vd85ply1vyD8auM= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= +golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= From c6794c95c70b02ddb1a79d92fec29f8b8ddd8836 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 30 Sep 2024 21:51:57 +0900 Subject: [PATCH 28/51] asset: do not use 'assets' directory for iOS The iOS implementation was just copied from the desktop version, and had and extra directory 'assets'. Also, files had an incorrect assumption that Arm Darwin should be an iOS. This change addresses these issues. Fixes golang/go#37177 Change-Id: I8e4de5337fbbe0b7697a8d519c8bded783399244 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/616655 Reviewed-by: Dmitri Shuralyov Auto-Submit: Hyang-Ah Hana Kim Reviewed-by: Hyang-Ah Hana Kim Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI --- asset/asset_darwin_armx.go | 23 ----------------------- asset/asset_desktop.go | 2 +- asset/asset_ios.go | 13 +++++++++++++ 3 files changed, 14 insertions(+), 24 deletions(-) delete mode 100644 asset/asset_darwin_armx.go create mode 100644 asset/asset_ios.go diff --git a/asset/asset_darwin_armx.go b/asset/asset_darwin_armx.go deleted file mode 100644 index e3b3b5a13..000000000 --- a/asset/asset_darwin_armx.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build darwin && (arm || arm64) - -package asset - -import ( - "os" - "path/filepath" -) - -func openAsset(name string) (File, error) { - if !filepath.IsAbs(name) { - name = filepath.Join("assets", name) - } - f, err := os.Open(name) - if err != nil { - return nil, err - } - return f, nil -} diff --git a/asset/asset_desktop.go b/asset/asset_desktop.go index af7c45f82..1c3805627 100644 --- a/asset/asset_desktop.go +++ b/asset/asset_desktop.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (linux && !android) || (darwin && !arm && !arm64) || windows +//go:build (linux && !android) || (darwin && !ios) || windows package asset diff --git a/asset/asset_ios.go b/asset/asset_ios.go new file mode 100644 index 000000000..4b7b37f4e --- /dev/null +++ b/asset/asset_ios.go @@ -0,0 +1,13 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package asset + +import ( + "os" +) + +func openAsset(name string) (File, error) { + return os.Open(name) +} From 08a83c5af9f8c7088ee059144335eec7fbbdb32c Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Fri, 4 Oct 2024 18:26:02 +0000 Subject: [PATCH 29/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: Ieee46df13d96ef0bc2be98e40f38f58c73131bcc Reviewed-on: https://go-review.googlesource.com/c/mobile/+/617960 Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Auto-Submit: Gopher Robot Reviewed-by: David Chase --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 2c5f05647..76a7d8194 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ go 1.22.0 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.20.0 + golang.org/x/image v0.21.0 golang.org/x/mod v0.21.0 golang.org/x/sync v0.8.0 - golang.org/x/tools v0.25.0 + golang.org/x/tools v0.26.0 ) -require golang.org/x/sys v0.25.0 // indirect +require golang.org/x/sys v0.26.0 // indirect diff --git a/go.sum b/go.sum index 58acbec3a..2e81dca14 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.20.0 h1:7cVCUjQwfL18gyBJOmYvptfSHS8Fb3YUDtfLIZ7Nbpw= -golang.org/x/image v0.20.0/go.mod h1:0a88To4CYVBAHp5FXJm8o7QbUl37Vd85ply1vyD8auM= +golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s= +golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78= golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= -golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= +golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= From 7ff83004ec2c864311acb5f558c65f372f05a25d Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 15 Oct 2024 17:38:47 +0900 Subject: [PATCH 30/51] cmd/gomobile: use Output instead of CombinedOutput at envClang It dosen't make sense to parse stdout and stderr to get a necessary information like clang command. Actually envClang sometimes didn't work correctly due to this. Fixes golang/go#53316 Change-Id: Ia2c518c44c0003b4f9b50dba85fb971c2ef4340d Reviewed-on: https://go-review.googlesource.com/c/mobile/+/620315 Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov Reviewed-by: Michael Knyszek --- cmd/gomobile/env.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/gomobile/env.go b/cmd/gomobile/env.go index 43f24b99d..082d76951 100644 --- a/cmd/gomobile/env.go +++ b/cmd/gomobile/env.go @@ -436,15 +436,21 @@ func envClang(sdkName string) (clang, cflags string, err error) { return sdkName + "-clang", "-isysroot " + sdkName, nil } cmd := exec.Command("xcrun", "--sdk", sdkName, "--find", "clang") - out, err := cmd.CombinedOutput() + out, err := cmd.Output() if err != nil { + if ee := (*exec.ExitError)(nil); errors.As(err, &ee) { + out = append(out, ee.Stderr...) + } return "", "", fmt.Errorf("xcrun --find: %v\n%s", err, out) } clang = strings.TrimSpace(string(out)) cmd = exec.Command("xcrun", "--sdk", sdkName, "--show-sdk-path") - out, err = cmd.CombinedOutput() + out, err = cmd.Output() if err != nil { + if ee := (*exec.ExitError)(nil); errors.As(err, &ee) { + out = append(out, ee.Stderr...) + } return "", "", fmt.Errorf("xcrun --show-sdk-path: %v\n%s", err, out) } sdk := strings.TrimSpace(string(out)) From 2b9d635e74e54c8475b1a0452de0ba0a7a3bc08c Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 5 Nov 2024 11:33:30 -0800 Subject: [PATCH 31/51] README: mention the git repo Change-Id: Id01077e4708b481e42b5aab6a34c25d6e34d1fe0 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/625397 Auto-Submit: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Reviewed-by: Hyang-Ah Hana Kim Commit-Queue: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 48253c6af..5e5a02528 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,11 @@ and the [bind](https://golang.org/x/mobile/example/bind) example apps. -- -Contributions to Go are appreciated. See https://golang.org/doc/contribute.html. +Contributions to Go are appreciated. See https://go.dev/doc/contribute. -* Bugs can be filed at the [Go issue tracker](https://golang.org/issue/new?title=x/mobile:+). +The git repository is https://go.googlesource.com/mobile. + +* Bugs can be filed at the [Go issue tracker](https://go.dev/issue/new?title=x/mobile:+). * Feature requests should preliminary be discussed on [golang-nuts](https://groups.google.com/forum/#!forum/golang-nuts) mailing list. From cee99c0f96fe2002e8a7c606904ece3a1d61ebd6 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Fri, 8 Nov 2024 13:13:23 -0500 Subject: [PATCH 32/51] example/ivy: use tools build constraint in tools.go In modern versions of the go command, the go mod tidy command doesn't consider module requirements coming from files with an "ignore" build constraint. Use "tools" instead. This way, running go mod tidy on this module becomes a no-op, instead of deleting all of the requirements from go.mod and go.sum. Change-Id: I42a24c462acf7340410614fa3b0dd80608efcdaa Reviewed-on: https://go-review.googlesource.com/c/mobile/+/626655 Reviewed-by: David Chase Reviewed-by: Dmitri Shuralyov Auto-Submit: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI --- example/ivy/tools.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/ivy/tools.go b/example/ivy/tools.go index ab067c246..de6105c52 100644 --- a/example/ivy/tools.go +++ b/example/ivy/tools.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build ignore +//go:build tools package dummy From fa514ef75a0ffd7d89e1b4c9b45485f7bb39cf83 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Fri, 8 Nov 2024 17:25:57 +0000 Subject: [PATCH 33/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I088f0acac42498a4148da7e98ace3a823be94ffe Reviewed-on: https://go-review.googlesource.com/c/mobile/+/626595 LUCI-TryBot-Result: Go LUCI Reviewed-by: David Chase Auto-Submit: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 76a7d8194..234c36712 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ go 1.22.0 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.21.0 - golang.org/x/mod v0.21.0 - golang.org/x/sync v0.8.0 - golang.org/x/tools v0.26.0 + golang.org/x/image v0.22.0 + golang.org/x/mod v0.22.0 + golang.org/x/sync v0.9.0 + golang.org/x/tools v0.27.0 ) -require golang.org/x/sys v0.26.0 // indirect +require golang.org/x/sys v0.27.0 // indirect diff --git a/go.sum b/go.sum index 2e81dca14..b892031ad 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s= -golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78= -golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/image v0.22.0 h1:UtK5yLUzilVrkjMAZAZ34DXGpASN8i8pj8g+O+yd10g= +golang.org/x/image v0.22.0/go.mod h1:9hPFhljd4zZ1GNSIZJ49sqbp45GKK9t6w+iXvGqZUz4= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= +golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= From ce44b2716d33505bd9e00bc3b17295042361e049 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Wed, 4 Dec 2024 23:09:52 +0000 Subject: [PATCH 34/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: Ia4e7f4bf74f5d06295bd5fccd8542940796022ee Reviewed-on: https://go-review.googlesource.com/c/mobile/+/633588 LUCI-TryBot-Result: Go LUCI Auto-Submit: Gopher Robot Reviewed-by: Dmitri Shuralyov Reviewed-by: David Chase --- go.mod | 8 ++++---- go.sum | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 234c36712..640c297c2 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ go 1.22.0 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.22.0 + golang.org/x/image v0.23.0 golang.org/x/mod v0.22.0 - golang.org/x/sync v0.9.0 - golang.org/x/tools v0.27.0 + golang.org/x/sync v0.10.0 + golang.org/x/tools v0.28.0 ) -require golang.org/x/sys v0.27.0 // indirect +require golang.org/x/sys v0.28.0 // indirect diff --git a/go.sum b/go.sum index b892031ad..8faf4f944 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,14 @@ +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.22.0 h1:UtK5yLUzilVrkjMAZAZ34DXGpASN8i8pj8g+O+yd10g= -golang.org/x/image v0.22.0/go.mod h1:9hPFhljd4zZ1GNSIZJ49sqbp45GKK9t6w+iXvGqZUz4= +golang.org/x/image v0.23.0 h1:HseQ7c2OpPKTPVzNjG5fwJsOTCiiwS4QdsYi5XU6H68= +golang.org/x/image v0.23.0/go.mod h1:wJJBTdLfCCf3tiHa1fNxpZmUI4mmoZvwMCPP0ddoNKY= golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= -golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8= +golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw= From a87c1cf6cf463f0d4476cfe0fcf67c2953d76e7c Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Wed, 11 Dec 2024 17:23:16 -0500 Subject: [PATCH 35/51] cmd/gomobile: work around for corrupted build on Mac Catalyst The problem was observed after Go 1.18. x/mobile requires go1.22.0+. Patch from https://github.com/stffabi/go-mobile/commit/e31230fb8e5d45adb0be5b69854b6b9bafb8151f For golang/go#52299 Co-authored-by: stffabi Change-Id: I856c68f60ad7c45acf4ae550a1e66747ef7719db Reviewed-on: https://go-review.googlesource.com/c/mobile/+/635342 Auto-Submit: Hyang-Ah Hana Kim LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor --- cmd/gomobile/env.go | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/cmd/gomobile/env.go b/cmd/gomobile/env.go index 082d76951..e9fd5dcc7 100644 --- a/cmd/gomobile/env.go +++ b/cmd/gomobile/env.go @@ -63,9 +63,11 @@ func platformOS(platform string) string { case "macos", "maccatalyst": // For "maccatalyst", Go packages should be built with GOOS=darwin, // not GOOS=ios, since the underlying OS (and kernel, runtime) is macOS. + // But, using GOOS=darwin with build-tag ios leads to corrupt builds: https://go.dev/issue/52299 + // => So we use GOOS=ios for now. // We also apply a "macos" or "maccatalyst" build tag, respectively. // See below for additional context. - return "darwin" + return "ios" default: panic(fmt.Sprintf("unexpected platform: %s", platform)) } @@ -82,17 +84,17 @@ func platformTags(platform string) []string { case "maccatalyst": // Mac Catalyst is a subset of iOS APIs made available on macOS // designed to ease porting apps developed for iPad to macOS. - // See https://developer.apple.com/mac-catalyst/. - // Because of this, when building a Go package targeting maccatalyst, - // GOOS=darwin (not ios). To bridge the gap and enable maccatalyst - // packages to be compiled, we also specify the "ios" build tag. + // See + // https://developer.apple.com/mac-catalyst/. + // https://stackoverflow.com/questions/12132933/preprocessor-macro-for-os-x-targets/49560690#49560690 + // + // Historically gomobile used GOOS=darwin with build tag ios when + // targeting Mac Catalyst. However, this configuration is not officially + // supported and leads to corrupt builds after go1.18: https://go.dev/issues/52299 + // Use GOOS=ios. // To help discriminate between darwin, ios, macos, and maccatalyst // targets, there is also a "maccatalyst" tag. - // Some additional context on this can be found here: - // https://stackoverflow.com/questions/12132933/preprocessor-macro-for-os-x-targets/49560690#49560690 - // TODO(ydnar): remove tag "ios" when cgo supports Catalyst - // See golang.org/issues/47228 - return []string{"ios", "macos", "maccatalyst"} + return []string{"macos", "maccatalyst"} default: panic(fmt.Sprintf("unexpected platform: %s", platform)) } @@ -217,17 +219,11 @@ func envInit() (err error) { cflags += " -mios-simulator-version-min=" + buildIOSVersion cflags += " -fembed-bitcode" case "maccatalyst": - // Mac Catalyst is a subset of iOS APIs made available on macOS - // designed to ease porting apps developed for iPad to macOS. - // See https://developer.apple.com/mac-catalyst/. - // Because of this, when building a Go package targeting maccatalyst, - // GOOS=darwin (not ios). To bridge the gap and enable maccatalyst - // packages to be compiled, we also specify the "ios" build tag. - // To help discriminate between darwin, ios, macos, and maccatalyst - // targets, there is also a "maccatalyst" tag. - // Some additional context on this can be found here: - // https://stackoverflow.com/questions/12132933/preprocessor-macro-for-os-x-targets/49560690#49560690 - goos = "darwin" + // See the comment about maccatalyst's GOOS, build tags configuration + // in platformOS and platformTags. + // Using GOOS=darwin with build-tag ios leads to corrupt builds: https://go.dev/issue/52299 + // => So we use GOOS=ios for now. + goos = "ios" sdk = "macosx" clang, cflags, err = envClang(sdk) // TODO(ydnar): the following 3 lines MAY be needed to compile From 5e5de4c8566398af0cdd9ee4164eeded53b1c0b3 Mon Sep 17 00:00:00 2001 From: cuishuang Date: Wed, 1 Jan 2025 22:18:56 +0800 Subject: [PATCH 36/51] all: make function and struct comments match the names Change-Id: I26f303201caebbe159f2e79f577e8d05b325c6ee Reviewed-on: https://go-review.googlesource.com/c/mobile/+/639615 Reviewed-by: Jorropo Auto-Submit: Jorropo Auto-Submit: Ian Lance Taylor Reviewed-by: Hyang-Ah Hana Kim LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov --- gl/interface.go | 8 ++++---- gl/work.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gl/interface.go b/gl/interface.go index 189c29e4e..6ad9ff65f 100644 --- a/gl/interface.go +++ b/gl/interface.go @@ -81,7 +81,7 @@ type Context interface { // http://www.khronos.org/opengles/sdk/docs/man3/html/glBlendFunc.xhtml BlendFunc(sfactor, dfactor Enum) - // BlendFunc sets the pixel RGB and alpha blending factors separately. + // BlendFuncSeparate sets the pixel RGB and alpha blending factors separately. // // http://www.khronos.org/opengles/sdk/docs/man3/html/glBlendFuncSeparate.xhtml BlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha Enum) @@ -192,7 +192,7 @@ type Context interface { // http://www.khronos.org/opengles/sdk/docs/man3/html/glGenTextures.xhtml CreateTexture() Texture - // CreateTVertexArray creates a vertex array. + // CreateVertexArray creates a vertex array. // // http://www.khronos.org/opengles/sdk/docs/man3/html/glGenVertexArrays.xhtml CreateVertexArray() VertexArray @@ -599,7 +599,7 @@ type Context interface { // http://www.khronos.org/opengles/sdk/docs/man3/html/glStencilFunc.xhtml StencilFunc(fn Enum, ref int, mask uint32) - // StencilFunc sets the front or back stencil test reference value. + // StencilFuncSeparate sets the front or back stencil test reference value. // // http://www.khronos.org/opengles/sdk/docs/man3/html/glStencilFuncSeparate.xhtml StencilFuncSeparate(face, fn Enum, ref int, mask uint32) @@ -737,7 +737,7 @@ type Context interface { // http://www.khronos.org/opengles/sdk/docs/man3/html/glUniform.xhtml Uniform4i(dst Uniform, v0, v1, v2, v3 int32) - // Uniform4i writes an ivec4 uniform array of len(src)/4 elements. + // Uniform4iv writes an ivec4 uniform array of len(src)/4 elements. // // http://www.khronos.org/opengles/sdk/docs/man3/html/glUniform.xhtml Uniform4iv(dst Uniform, src []int32) diff --git a/gl/work.go b/gl/work.go index c603adfe6..a778b0c52 100644 --- a/gl/work.go +++ b/gl/work.go @@ -160,7 +160,7 @@ func (ctx *context) cString(str string) (uintptr, func()) { return uintptr(ptr), func() { C.free(ptr) } } -// cString creates a pointer to a C string off the Go heap. +// cStringPtr creates a pointer to a C string off the Go heap. // ret is a **char. func (ctx *context) cStringPtr(str string) (uintptr, func()) { s, free := ctx.cString(str) From c31d5b91ecc32c0d598b8fe8457d244ca0b4e815 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Mon, 6 Jan 2025 10:08:18 -0800 Subject: [PATCH 37/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: Idf8f21610ad2aa7b52f54849dcc920a1990c6407 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/640697 Reviewed-by: Dmitri Shuralyov Reviewed-by: David Chase Auto-Submit: Gopher Robot LUCI-TryBot-Result: Go LUCI --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 640c297c2..91f3e8f77 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( golang.org/x/image v0.23.0 golang.org/x/mod v0.22.0 golang.org/x/sync v0.10.0 - golang.org/x/tools v0.28.0 + golang.org/x/tools v0.29.0 ) -require golang.org/x/sys v0.28.0 // indirect +require golang.org/x/sys v0.29.0 // indirect diff --git a/go.sum b/go.sum index 8faf4f944..a45638ecb 100644 --- a/go.sum +++ b/go.sum @@ -8,7 +8,7 @@ golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8= -golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= +golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= From b38b8813d6076f4e4ff25d71ee2c45f051a3a0cb Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Mon, 10 Feb 2025 10:28:08 -0800 Subject: [PATCH 38/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I4ec34da0a0903d47fc2b25a116fef256d63f8f1f Reviewed-on: https://go-review.googlesource.com/c/mobile/+/648176 LUCI-TryBot-Result: Go LUCI Reviewed-by: David Chase Auto-Submit: Gopher Robot Reviewed-by: Dmitri Shuralyov --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 91f3e8f77..ff1959ab5 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ go 1.22.0 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.23.0 - golang.org/x/mod v0.22.0 - golang.org/x/sync v0.10.0 - golang.org/x/tools v0.29.0 + golang.org/x/image v0.24.0 + golang.org/x/mod v0.23.0 + golang.org/x/sync v0.11.0 + golang.org/x/tools v0.30.0 ) -require golang.org/x/sys v0.29.0 // indirect +require golang.org/x/sys v0.30.0 // indirect diff --git a/go.sum b/go.sum index a45638ecb..31424023e 100644 --- a/go.sum +++ b/go.sum @@ -2,13 +2,13 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.23.0 h1:HseQ7c2OpPKTPVzNjG5fwJsOTCiiwS4QdsYi5XU6H68= -golang.org/x/image v0.23.0/go.mod h1:wJJBTdLfCCf3tiHa1fNxpZmUI4mmoZvwMCPP0ddoNKY= -golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= -golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= -golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= +golang.org/x/image v0.24.0 h1:AN7zRgVsbvmTfNyqIbbOraYL8mSwcKncEj8ofjgzcMQ= +golang.org/x/image v0.24.0/go.mod h1:4b/ITuLfqYq1hqZcjofwctIhi7sZh2WaCjvsBNjjya8= +golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= +golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= +golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= From ba142f8e7d3c04ffd3a1c19500840f7be8bb742b Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Sat, 15 Feb 2025 18:44:12 -0500 Subject: [PATCH 39/51] bind: pin go/types to not produce types.Alias types Bind currently targets the earlier go/types semantics (gotypesalias=0), and needs to be updated to be compatible with the new (gotypesalias=1). This is the only way in which the module isn't compatible with Go 1.23 language semantics, so add an explicit godebug line for it with a TODO. This unblocks moving the module to Go 1.23 (as done in the next CL). For golang/go#70698. Change-Id: I59a61defdcf327aed9ccd67b123b1516cd118d9e Reviewed-on: https://go-review.googlesource.com/c/mobile/+/649381 LUCI-TryBot-Result: Go LUCI Reviewed-by: Hajime Hoshi Auto-Submit: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov Reviewed-by: Michael Knyszek --- go.mod | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/go.mod b/go.mod index ff1959ab5..db1d25bd6 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,19 @@ module golang.org/x/mobile go 1.22.0 +// The modern go/types type checker produces types.Alias +// types for the explicit representation of type aliases. +// (Initial opt-in support for it was added in Go 1.22, +// and it became the default behavior in Go 1.23.) +// +// TODO(go.dev/issue/70698): Update the golang.org/x/mobile/bind +// code generator for the new behavior and delete this temporary¹ +// forced pre-1.23 go/types behavior. +// +// ¹ It's temporary because this godebug setting will be removed +// in a future Go release. +godebug gotypesalias=0 + require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 golang.org/x/image v0.24.0 From 21e291c9c26e620157cc44792253ce737982a4c5 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Fri, 14 Feb 2025 21:11:39 +0000 Subject: [PATCH 40/51] all: upgrade go directive to at least 1.23.0 [generated] By now Go 1.24.0 has been released, and Go 1.22 is no longer supported per the Go Release Policy (https://go.dev/doc/devel/release#policy). For golang/go#69095. [git-generate] (cd example/ivy && go get go@1.23.0 && go mod tidy && go fix ./... && go mod edit -toolchain=none) (cd . && go get go@1.23.0 && go mod tidy && go fix ./... && go mod edit -toolchain=none) Change-Id: Icc4624c0ff649e040bef1b068e92b43fdb57c72e Reviewed-on: https://go-review.googlesource.com/c/mobile/+/649378 Reviewed-by: Cherry Mui Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Auto-Submit: Dmitri Shuralyov --- example/ivy/go.mod | 2 +- go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/ivy/go.mod b/example/ivy/go.mod index 884df3db7..7b4640ba4 100644 --- a/example/ivy/go.mod +++ b/example/ivy/go.mod @@ -1,6 +1,6 @@ module golang.org/x/mobile/example/ivy -go 1.17 +go 1.23.0 require ( golang.org/x/mobile v0.0.0-20210924032853-1c027f395ef7 diff --git a/go.mod b/go.mod index db1d25bd6..23b39fa82 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module golang.org/x/mobile -go 1.22.0 +go 1.23.0 // The modern go/types type checker produces types.Alias // types for the explicit representation of type aliases. From a8bae7367306ade4b4f4a8bd8a57579d89f2f6a0 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Sat, 15 Feb 2025 19:08:13 -0500 Subject: [PATCH 41/51] all: make copyright headers consistent The standard copyright header at https://go.dev/doc/contribute#copyright has a single space (also see CL 20022). Also, add it to a files where it was missed. Change-Id: I341ce5b5c455efa768b65597c387866e47a6757e Reviewed-on: https://go-review.googlesource.com/c/mobile/+/649382 Auto-Submit: Dmitri Shuralyov Reviewed-by: Hajime Hoshi LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Knyszek Reviewed-by: Dmitri Shuralyov --- bind/bind_test.go | 4 ++++ bind/testdata/basictypes.go | 2 +- bind/testdata/classes.go | 2 +- bind/testdata/customprefix.go | 2 +- bind/testdata/doc.go | 2 +- bind/testdata/ignore.go | 2 +- bind/testdata/interfaces.go | 2 +- bind/testdata/issue10788.go | 2 +- bind/testdata/issue12328.go | 2 +- bind/testdata/java.go | 2 +- bind/testdata/keywords.go | 2 +- bind/testdata/objc.go | 2 +- bind/testdata/objcw.go | 2 +- bind/testdata/structs.go | 2 +- bind/testdata/try.go | 2 +- cmd/gobind/doc.go | 2 +- cmd/gobind/gen.go | 2 +- cmd/gobind/gobind_test.go | 2 +- cmd/gobind/main.go | 2 +- cmd/gomobile/bind.go | 2 +- cmd/gomobile/bind_androidapp.go | 2 +- cmd/gomobile/bind_iosapp.go | 2 +- cmd/gomobile/bind_test.go | 2 +- cmd/gomobile/build.go | 2 +- cmd/gomobile/build_androidapp.go | 2 +- cmd/gomobile/build_apple.go | 2 +- cmd/gomobile/build_darwin_test.go | 2 +- cmd/gomobile/build_test.go | 2 +- cmd/gomobile/cert.go | 2 +- cmd/gomobile/cert_test.go | 2 +- cmd/gomobile/clean.go | 2 +- cmd/gomobile/dex.go | 2 +- cmd/gomobile/doc.go | 2 +- cmd/gomobile/env.go | 4 ++++ cmd/gomobile/env_test.go | 2 +- cmd/gomobile/gendex.go | 4 ++-- cmd/gomobile/init.go | 2 +- cmd/gomobile/init_test.go | 2 +- cmd/gomobile/install.go | 2 +- cmd/gomobile/main.go | 4 ++-- cmd/gomobile/manifest.go | 2 +- cmd/gomobile/strings_flag.go | 2 +- cmd/gomobile/version.go | 2 +- cmd/gomobile/writer.go | 2 +- cmd/gomobile/writer_test.go | 2 +- example/ivy/doc.go | 2 +- example/ivy/tools.go | 2 +- exp/f32/affine_test.go | 4 ++++ gl/consts.go | 2 +- gl/doc.go | 2 +- gl/fn.go | 2 +- gl/gendebug.go | 4 ++-- gl/gl.go | 2 +- gl/gldebug.go | 2 +- gl/interface.go | 2 +- gl/types_debug.go | 2 +- gl/types_prod.go | 2 +- internal/binres/arsc.go | 2 +- internal/binres/binres.go | 2 +- internal/binres/binres_test.go | 2 +- internal/binres/genarsc.go | 4 ++-- internal/binres/node.go | 2 +- internal/binres/pool.go | 2 +- internal/binres/sdk.go | 4 ++++ internal/binres/table.go | 2 +- internal/importers/ast.go | 2 +- internal/importers/ast_test.go | 4 ++++ internal/sdkpath/sdkpath.go | 2 +- 68 files changed, 87 insertions(+), 67 deletions(-) diff --git a/bind/bind_test.go b/bind/bind_test.go index fae951b31..af0973323 100644 --- a/bind/bind_test.go +++ b/bind/bind_test.go @@ -1,3 +1,7 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package bind import ( diff --git a/bind/testdata/basictypes.go b/bind/testdata/basictypes.go index 1fc02e63a..1ff804e4b 100644 --- a/bind/testdata/basictypes.go +++ b/bind/testdata/basictypes.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/bind/testdata/classes.go b/bind/testdata/classes.go index 7263ac771..6d60349ca 100644 --- a/bind/testdata/classes.go +++ b/bind/testdata/classes.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/bind/testdata/customprefix.go b/bind/testdata/customprefix.go index b3a0967bb..057f78514 100644 --- a/bind/testdata/customprefix.go +++ b/bind/testdata/customprefix.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/bind/testdata/doc.go b/bind/testdata/doc.go index c17da8295..11125d0fb 100644 --- a/bind/testdata/doc.go +++ b/bind/testdata/doc.go @@ -1,4 +1,4 @@ -// Copyright 2016 The Go Authors. All rights reserved. +// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/bind/testdata/ignore.go b/bind/testdata/ignore.go index 2d3e1a686..e8b8517a9 100644 --- a/bind/testdata/ignore.go +++ b/bind/testdata/ignore.go @@ -1,4 +1,4 @@ -// Copyright 2016 The Go Authors. All rights reserved. +// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/bind/testdata/interfaces.go b/bind/testdata/interfaces.go index 9e2da3a34..c0e63bba6 100644 --- a/bind/testdata/interfaces.go +++ b/bind/testdata/interfaces.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/bind/testdata/issue10788.go b/bind/testdata/issue10788.go index af487218e..d3ceb75bc 100644 --- a/bind/testdata/issue10788.go +++ b/bind/testdata/issue10788.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/bind/testdata/issue12328.go b/bind/testdata/issue12328.go index 2b4ab887f..2dc5ee407 100644 --- a/bind/testdata/issue12328.go +++ b/bind/testdata/issue12328.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/bind/testdata/java.go b/bind/testdata/java.go index 8550582ff..f37e0386c 100644 --- a/bind/testdata/java.go +++ b/bind/testdata/java.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/bind/testdata/keywords.go b/bind/testdata/keywords.go index 6a04f0bdd..8a8808d92 100644 --- a/bind/testdata/keywords.go +++ b/bind/testdata/keywords.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/bind/testdata/objc.go b/bind/testdata/objc.go index ca42fb95f..2d154c306 100644 --- a/bind/testdata/objc.go +++ b/bind/testdata/objc.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/bind/testdata/objcw.go b/bind/testdata/objcw.go index dadfd93bc..353795b77 100644 --- a/bind/testdata/objcw.go +++ b/bind/testdata/objcw.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/bind/testdata/structs.go b/bind/testdata/structs.go index 5974bdc36..53be1c747 100644 --- a/bind/testdata/structs.go +++ b/bind/testdata/structs.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/bind/testdata/try.go b/bind/testdata/try.go index 5d3d21787..8dff65295 100644 --- a/bind/testdata/try.go +++ b/bind/testdata/try.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gobind/doc.go b/cmd/gobind/doc.go index 0823d5d81..cffb0d8b5 100644 --- a/cmd/gobind/doc.go +++ b/cmd/gobind/doc.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gobind/gen.go b/cmd/gobind/gen.go index fedbc2705..87c72d9d2 100644 --- a/cmd/gobind/gen.go +++ b/cmd/gobind/gen.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gobind/gobind_test.go b/cmd/gobind/gobind_test.go index 302103c9e..f8c7879eb 100644 --- a/cmd/gobind/gobind_test.go +++ b/cmd/gobind/gobind_test.go @@ -1,4 +1,4 @@ -// Copyright 2016 The Go Authors. All rights reserved. +// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gobind/main.go b/cmd/gobind/main.go index 8ccb9951e..b2503080a 100644 --- a/cmd/gobind/main.go +++ b/cmd/gobind/main.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/bind.go b/cmd/gomobile/bind.go index fc9f75631..4e1c453f4 100644 --- a/cmd/gomobile/bind.go +++ b/cmd/gomobile/bind.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/bind_androidapp.go b/cmd/gomobile/bind_androidapp.go index f8fcabe1b..a8fab279d 100644 --- a/cmd/gomobile/bind_androidapp.go +++ b/cmd/gomobile/bind_androidapp.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/bind_iosapp.go b/cmd/gomobile/bind_iosapp.go index 9a3e52169..ca3815e3a 100644 --- a/cmd/gomobile/bind_iosapp.go +++ b/cmd/gomobile/bind_iosapp.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/bind_test.go b/cmd/gomobile/bind_test.go index 42d3f1110..07e366560 100644 --- a/cmd/gomobile/bind_test.go +++ b/cmd/gomobile/bind_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/build.go b/cmd/gomobile/build.go index f8895eb31..a8f0ad2cc 100644 --- a/cmd/gomobile/build.go +++ b/cmd/gomobile/build.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/build_androidapp.go b/cmd/gomobile/build_androidapp.go index bcd2664bd..5063f94ac 100644 --- a/cmd/gomobile/build_androidapp.go +++ b/cmd/gomobile/build_androidapp.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/build_apple.go b/cmd/gomobile/build_apple.go index f7b682389..298367bdf 100644 --- a/cmd/gomobile/build_apple.go +++ b/cmd/gomobile/build_apple.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/build_darwin_test.go b/cmd/gomobile/build_darwin_test.go index 43ca683ee..c640fa80e 100644 --- a/cmd/gomobile/build_darwin_test.go +++ b/cmd/gomobile/build_darwin_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/build_test.go b/cmd/gomobile/build_test.go index b50aba752..5cec2acf2 100644 --- a/cmd/gomobile/build_test.go +++ b/cmd/gomobile/build_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/cert.go b/cmd/gomobile/cert.go index 0aa00b3a4..f61299366 100644 --- a/cmd/gomobile/cert.go +++ b/cmd/gomobile/cert.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/cert_test.go b/cmd/gomobile/cert_test.go index a4ab860b7..c871394b4 100644 --- a/cmd/gomobile/cert_test.go +++ b/cmd/gomobile/cert_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/clean.go b/cmd/gomobile/clean.go index 1c0e348e3..6c3dddf28 100644 --- a/cmd/gomobile/clean.go +++ b/cmd/gomobile/clean.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/dex.go b/cmd/gomobile/dex.go index ff844b348..59dc3defe 100644 --- a/cmd/gomobile/dex.go +++ b/cmd/gomobile/dex.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/doc.go b/cmd/gomobile/doc.go index 74090da67..205f167b2 100644 --- a/cmd/gomobile/doc.go +++ b/cmd/gomobile/doc.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/env.go b/cmd/gomobile/env.go index e9fd5dcc7..320597994 100644 --- a/cmd/gomobile/env.go +++ b/cmd/gomobile/env.go @@ -1,3 +1,7 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package main import ( diff --git a/cmd/gomobile/env_test.go b/cmd/gomobile/env_test.go index e5ad28259..1b9e452b4 100644 --- a/cmd/gomobile/env_test.go +++ b/cmd/gomobile/env_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 The Go Authors. All rights reserved. +// Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/gendex.go b/cmd/gomobile/gendex.go index be470a2bd..9ef5b315d 100644 --- a/cmd/gomobile/gendex.go +++ b/cmd/gomobile/gendex.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -148,7 +148,7 @@ func findLast(path string) (string, error) { return path + "/" + children[len(children)-1], nil } -var header = `// Copyright 2015 The Go Authors. All rights reserved. +var header = `// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/init.go b/cmd/gomobile/init.go index e7392df71..48642e22b 100644 --- a/cmd/gomobile/init.go +++ b/cmd/gomobile/init.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/init_test.go b/cmd/gomobile/init_test.go index 2eabda1a8..8a51e75ac 100644 --- a/cmd/gomobile/init_test.go +++ b/cmd/gomobile/init_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/install.go b/cmd/gomobile/install.go index beb7e5262..5a893c2ab 100644 --- a/cmd/gomobile/install.go +++ b/cmd/gomobile/install.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/main.go b/cmd/gomobile/main.go index fe6fd7e16..2d280b864 100644 --- a/cmd/gomobile/main.go +++ b/cmd/gomobile/main.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -128,7 +128,7 @@ func help(args []string) { os.Exit(2) } -const documentationHeader = `// Copyright 2015 The Go Authors. All rights reserved. +const documentationHeader = `// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/manifest.go b/cmd/gomobile/manifest.go index 09b8ff0e0..53fe32071 100644 --- a/cmd/gomobile/manifest.go +++ b/cmd/gomobile/manifest.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/strings_flag.go b/cmd/gomobile/strings_flag.go index 330833e70..6cf51c345 100644 --- a/cmd/gomobile/strings_flag.go +++ b/cmd/gomobile/strings_flag.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/version.go b/cmd/gomobile/version.go index 27fd6bde0..faf072428 100644 --- a/cmd/gomobile/version.go +++ b/cmd/gomobile/version.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/writer.go b/cmd/gomobile/writer.go index 880104120..029e6eeee 100644 --- a/cmd/gomobile/writer.go +++ b/cmd/gomobile/writer.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/cmd/gomobile/writer_test.go b/cmd/gomobile/writer_test.go index ae6e2c710..345ab2821 100644 --- a/cmd/gomobile/writer_test.go +++ b/cmd/gomobile/writer_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/example/ivy/doc.go b/example/ivy/doc.go index fa37ea90d..47eaa1fb6 100644 --- a/example/ivy/doc.go +++ b/example/ivy/doc.go @@ -1,4 +1,4 @@ -// Copyright 2021 The Go Authors. All rights reserved. +// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/example/ivy/tools.go b/example/ivy/tools.go index de6105c52..4219529ba 100644 --- a/example/ivy/tools.go +++ b/example/ivy/tools.go @@ -1,4 +1,4 @@ -// Copyright 2021 The Go Authors. All rights reserved. +// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/exp/f32/affine_test.go b/exp/f32/affine_test.go index f1d84cdd9..0c7009750 100644 --- a/exp/f32/affine_test.go +++ b/exp/f32/affine_test.go @@ -1,3 +1,7 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package f32 import ( diff --git a/gl/consts.go b/gl/consts.go index 370d0b859..62d93aab0 100644 --- a/gl/consts.go +++ b/gl/consts.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/gl/doc.go b/gl/doc.go index 880d5f925..4cf95042c 100644 --- a/gl/doc.go +++ b/gl/doc.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/gl/fn.go b/gl/fn.go index 3f2f3adea..c34e51662 100644 --- a/gl/fn.go +++ b/gl/fn.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/gl/gendebug.go b/gl/gendebug.go index 146826f07..7e3d5a2a6 100644 --- a/gl/gendebug.go +++ b/gl/gendebug.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -877,7 +877,7 @@ func setEnqueueBlocking(c *ast.CallExpr) { }) } -const preamble = `// Copyright 2014 The Go Authors. All rights reserved. +const preamble = `// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/gl/gl.go b/gl/gl.go index 28e747b09..2272c59d1 100644 --- a/gl/gl.go +++ b/gl/gl.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/gl/gldebug.go b/gl/gldebug.go index fb79bb7ac..b3aca42e3 100644 --- a/gl/gldebug.go +++ b/gl/gldebug.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/gl/interface.go b/gl/interface.go index 6ad9ff65f..693abe422 100644 --- a/gl/interface.go +++ b/gl/interface.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/gl/types_debug.go b/gl/types_debug.go index ea011704e..e9e9bd7c8 100644 --- a/gl/types_debug.go +++ b/gl/types_debug.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/gl/types_prod.go b/gl/types_prod.go index f87f91f75..6817c6f04 100644 --- a/gl/types_prod.go +++ b/gl/types_prod.go @@ -1,4 +1,4 @@ -// Copyright 2014 The Go Authors. All rights reserved. +// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/internal/binres/arsc.go b/internal/binres/arsc.go index 1b4dff223..bd583ffa5 100644 --- a/internal/binres/arsc.go +++ b/internal/binres/arsc.go @@ -1,4 +1,4 @@ -// Copyright 2016 The Go Authors. All rights reserved. +// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/internal/binres/binres.go b/internal/binres/binres.go index d77bde265..2f6dc7aae 100644 --- a/internal/binres/binres.go +++ b/internal/binres/binres.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/internal/binres/binres_test.go b/internal/binres/binres_test.go index 7e4f214c8..06259b420 100644 --- a/internal/binres/binres_test.go +++ b/internal/binres/binres_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/internal/binres/genarsc.go b/internal/binres/genarsc.go index 2e71f29f0..7d975cb8d 100644 --- a/internal/binres/genarsc.go +++ b/internal/binres/genarsc.go @@ -1,4 +1,4 @@ -// Copyright 2016 The Go Authors. All rights reserved. +// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -19,7 +19,7 @@ import ( "golang.org/x/mobile/internal/binres" ) -const tmpl = `// Copyright 2016 The Go Authors. All rights reserved. +const tmpl = `// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/internal/binres/node.go b/internal/binres/node.go index 491825143..20328fb9e 100644 --- a/internal/binres/node.go +++ b/internal/binres/node.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/internal/binres/pool.go b/internal/binres/pool.go index 273e94c72..c90350ce7 100644 --- a/internal/binres/pool.go +++ b/internal/binres/pool.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/internal/binres/sdk.go b/internal/binres/sdk.go index 607e0b7dc..44419c6ce 100644 --- a/internal/binres/sdk.go +++ b/internal/binres/sdk.go @@ -1,3 +1,7 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package binres import ( diff --git a/internal/binres/table.go b/internal/binres/table.go index b552cbaff..06dfb4392 100644 --- a/internal/binres/table.go +++ b/internal/binres/table.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Go Authors. All rights reserved. +// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/internal/importers/ast.go b/internal/importers/ast.go index 64da4a188..dafad08b8 100644 --- a/internal/importers/ast.go +++ b/internal/importers/ast.go @@ -1,4 +1,4 @@ -// Copyright 2016 The Go Authors. All rights reserved. +// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/internal/importers/ast_test.go b/internal/importers/ast_test.go index 8e329940e..52c6d6304 100644 --- a/internal/importers/ast_test.go +++ b/internal/importers/ast_test.go @@ -1,3 +1,7 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package importers import ( diff --git a/internal/sdkpath/sdkpath.go b/internal/sdkpath/sdkpath.go index 91e9a5124..cdcf152cb 100644 --- a/internal/sdkpath/sdkpath.go +++ b/internal/sdkpath/sdkpath.go @@ -1,4 +1,4 @@ -// Copyright 2022 The Go Authors. All rights reserved. +// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. From cd096645fcd3325d4006c702e6514a9f6b13b94a Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Sat, 15 Feb 2025 19:23:24 -0500 Subject: [PATCH 42/51] all: delete obsolete import comments Import comments were initially used to specify the canonical import path of a package, to prevent it from being used with a non-canonical path by accident. The module path in the go.mod file serves that purpose now. Change-Id: I36ebca191eb996b7254a6d452aa4f8dba88a6f94 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/649383 LUCI-TryBot-Result: Go LUCI Auto-Submit: Dmitri Shuralyov Reviewed-by: Michael Knyszek Reviewed-by: Dmitri Shuralyov Reviewed-by: Hajime Hoshi --- app/doc.go | 2 +- asset/doc.go | 2 +- bind/bind.go | 2 +- bind/java/context_android.go | 2 +- bind/seq/seq.go | 2 +- cmd/gobind/doc.go | 2 +- cmd/gomobile/doc.go | 2 +- event/lifecycle/lifecycle.go | 2 +- event/mouse/mouse.go | 2 +- event/paint/paint.go | 2 +- event/size/size.go | 2 +- event/touch/touch.go | 2 +- exp/app/debug/fps.go | 2 +- exp/audio/al/al.go | 2 +- exp/f32/f32.go | 2 +- exp/font/doc.go | 2 +- exp/gl/glutil/doc.go | 2 +- exp/gl/glutil/glutil.go | 2 +- exp/sensor/sensor.go | 2 +- exp/sprite/clock/clock.go | 2 +- exp/sprite/glsprite/glsprite.go | 2 +- exp/sprite/portable/portable.go | 2 +- exp/sprite/sprite.go | 2 +- geom/geom.go | 2 +- gl/doc.go | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/app/doc.go b/app/doc.go index 02bd6db80..2fabcd9de 100644 --- a/app/doc.go +++ b/app/doc.go @@ -85,4 +85,4 @@ response to lifecycle events. Such packages should call: in an init function inside that package. */ -package app // import "golang.org/x/mobile/app" +package app diff --git a/asset/doc.go b/asset/doc.go index b40d4a44d..37bb9bb34 100644 --- a/asset/doc.go +++ b/asset/doc.go @@ -14,4 +14,4 @@ // // For consistency when debugging on a desktop, assets are read from a // directory named assets under the current working directory. -package asset // import "golang.org/x/mobile/asset" +package asset diff --git a/bind/bind.go b/bind/bind.go index e5690835e..7c1b22e88 100644 --- a/bind/bind.go +++ b/bind/bind.go @@ -7,7 +7,7 @@ // See the documentation on the gobind command for usage details // and the list of currently supported types. // (http://godoc.org/golang.org/x/mobile/cmd/gobind) -package bind // import "golang.org/x/mobile/bind" +package bind // TODO(crawshaw): slice support // TODO(crawshaw): channel support diff --git a/bind/java/context_android.go b/bind/java/context_android.go index dc4443130..ee77a7e8a 100644 --- a/bind/java/context_android.go +++ b/bind/java/context_android.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package java // import "golang.org/x/mobile/bind/java" +package java // #cgo LDFLAGS: -llog // diff --git a/bind/seq/seq.go b/bind/seq/seq.go index 0740ca80f..699263669 100644 --- a/bind/seq/seq.go +++ b/bind/seq/seq.go @@ -9,7 +9,7 @@ // // Designed only for use by the code generated by gobind. Don't try to // use this directly. -package seq // import "golang.org/x/mobile/bind/seq" +package seq import _ "golang.org/x/mobile/internal/mobileinit" diff --git a/cmd/gobind/doc.go b/cmd/gobind/doc.go index cffb0d8b5..07b9df6ea 100644 --- a/cmd/gobind/doc.go +++ b/cmd/gobind/doc.go @@ -249,4 +249,4 @@ Examples can be found in http://golang.org/x/mobile/example. Design doc: http://golang.org/s/gobind */ -package main // import "golang.org/x/mobile/cmd/gobind" +package main diff --git a/cmd/gomobile/doc.go b/cmd/gomobile/doc.go index 205f167b2..6922125c2 100644 --- a/cmd/gomobile/doc.go +++ b/cmd/gomobile/doc.go @@ -167,4 +167,4 @@ Usage: Version prints versions of the gomobile binary and tools */ -package main // import "golang.org/x/mobile/cmd/gomobile" +package main diff --git a/event/lifecycle/lifecycle.go b/event/lifecycle/lifecycle.go index 4c588582d..58de2c419 100644 --- a/event/lifecycle/lifecycle.go +++ b/event/lifecycle/lifecycle.go @@ -17,7 +17,7 @@ // means it has lost the focus. // // See the golang.org/x/mobile/app package for details on the event model. -package lifecycle // import "golang.org/x/mobile/event/lifecycle" +package lifecycle import ( "fmt" diff --git a/event/mouse/mouse.go b/event/mouse/mouse.go index eec2fc078..e98131d37 100644 --- a/event/mouse/mouse.go +++ b/event/mouse/mouse.go @@ -5,7 +5,7 @@ // Package mouse defines an event for mouse input. // // See the golang.org/x/mobile/app package for details on the event model. -package mouse // import "golang.org/x/mobile/event/mouse" +package mouse import ( "fmt" diff --git a/event/paint/paint.go b/event/paint/paint.go index 0f24b1ad1..179136c46 100644 --- a/event/paint/paint.go +++ b/event/paint/paint.go @@ -5,7 +5,7 @@ // Package paint defines an event for the app being ready to paint. // // See the golang.org/x/mobile/app package for details on the event model. -package paint // import "golang.org/x/mobile/event/paint" +package paint // Event indicates that the app is ready to paint the next frame of the GUI. // diff --git a/event/size/size.go b/event/size/size.go index f39672819..4c4070b44 100644 --- a/event/size/size.go +++ b/event/size/size.go @@ -6,7 +6,7 @@ // orientation of the app's window. // // See the golang.org/x/mobile/app package for details on the event model. -package size // import "golang.org/x/mobile/event/size" +package size import ( "image" diff --git a/event/touch/touch.go b/event/touch/touch.go index c91967be2..94c4853ae 100644 --- a/event/touch/touch.go +++ b/event/touch/touch.go @@ -5,7 +5,7 @@ // Package touch defines an event for touch input. // // See the golang.org/x/mobile/app package for details on the event model. -package touch // import "golang.org/x/mobile/event/touch" +package touch // The best source on android input events is the NDK: include/android/input.h // diff --git a/exp/app/debug/fps.go b/exp/app/debug/fps.go index c01570582..67b194fc5 100644 --- a/exp/app/debug/fps.go +++ b/exp/app/debug/fps.go @@ -5,7 +5,7 @@ //go:build darwin || linux || windows // Package debug provides GL-based debugging tools for apps. -package debug // import "golang.org/x/mobile/exp/app/debug" +package debug import ( "image" diff --git a/exp/audio/al/al.go b/exp/audio/al/al.go index 974488967..f27dca258 100644 --- a/exp/audio/al/al.go +++ b/exp/audio/al/al.go @@ -22,7 +22,7 @@ // license file to the open source notices of your application. // OpenAL Soft's license file could be found at // http://repo.or.cz/w/openal-soft.git/blob/HEAD:/COPYING. -package al // import "golang.org/x/mobile/exp/audio/al" +package al // Capability represents OpenAL extension capabilities. type Capability int32 diff --git a/exp/f32/f32.go b/exp/f32/f32.go index 59e1b651c..a0a3ed0d9 100644 --- a/exp/f32/f32.go +++ b/exp/f32/f32.go @@ -23,7 +23,7 @@ // The interface to this package is not stable. It will change considerably. // Only use functions that provide package documentation. Semantics are // non-obvious. Be prepared for the package name to change. -package f32 // import "golang.org/x/mobile/exp/f32" +package f32 import ( "encoding/binary" diff --git a/exp/font/doc.go b/exp/font/doc.go index 5ae720518..349feb461 100644 --- a/exp/font/doc.go +++ b/exp/font/doc.go @@ -3,4 +3,4 @@ // license that can be found in the LICENSE file. // Package font provides platform independent access to system fonts. -package font // import "golang.org/x/mobile/exp/font" +package font diff --git a/exp/gl/glutil/doc.go b/exp/gl/glutil/doc.go index 44b121075..94e4a6ce1 100644 --- a/exp/gl/glutil/doc.go +++ b/exp/gl/glutil/doc.go @@ -3,4 +3,4 @@ // license that can be found in the LICENSE file. // Package glutil implements OpenGL utility functions. -package glutil // import "golang.org/x/mobile/exp/gl/glutil" +package glutil diff --git a/exp/gl/glutil/glutil.go b/exp/gl/glutil/glutil.go index 880b97e28..26edca145 100644 --- a/exp/gl/glutil/glutil.go +++ b/exp/gl/glutil/glutil.go @@ -4,7 +4,7 @@ //go:build darwin || linux || windows -package glutil // import "golang.org/x/mobile/exp/gl/glutil" +package glutil import ( "fmt" diff --git a/exp/sensor/sensor.go b/exp/sensor/sensor.go index 2c697b6dd..d03003504 100644 --- a/exp/sensor/sensor.go +++ b/exp/sensor/sensor.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // Package sensor provides sensor events from various movement sensors. -package sensor // import "golang.org/x/mobile/exp/sensor" +package sensor import ( "errors" diff --git a/exp/sprite/clock/clock.go b/exp/sprite/clock/clock.go index a468e66e7..6d4dbc27b 100644 --- a/exp/sprite/clock/clock.go +++ b/exp/sprite/clock/clock.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // Package clock provides a clock and time functions for a sprite engine. -package clock // import "golang.org/x/mobile/exp/sprite/clock" +package clock // A Time represents an instant in sprite time. // diff --git a/exp/sprite/glsprite/glsprite.go b/exp/sprite/glsprite/glsprite.go index 1e9fa0cda..32ca899e5 100644 --- a/exp/sprite/glsprite/glsprite.go +++ b/exp/sprite/glsprite/glsprite.go @@ -8,7 +8,7 @@ // // Each sprite.Texture is loaded as a GL texture object and drawn // to the screen via an affine transform done in a simple shader. -package glsprite // import "golang.org/x/mobile/exp/sprite/glsprite" +package glsprite import ( "image" diff --git a/exp/sprite/portable/portable.go b/exp/sprite/portable/portable.go index 4b6c9155f..bcf07240d 100644 --- a/exp/sprite/portable/portable.go +++ b/exp/sprite/portable/portable.go @@ -7,7 +7,7 @@ // It is intended to serve as a reference implementation for testing // other sprite Engines written against OpenGL, or other more exotic // modern hardware interfaces. -package portable // import "golang.org/x/mobile/exp/sprite/portable" +package portable import ( "image" diff --git a/exp/sprite/sprite.go b/exp/sprite/sprite.go index df13fb595..cbc9f458e 100644 --- a/exp/sprite/sprite.go +++ b/exp/sprite/sprite.go @@ -22,7 +22,7 @@ // modify the scene's nodes and animations (Arranger values) // e.Render(scene, t, sz) // } -package sprite // import "golang.org/x/mobile/exp/sprite" +package sprite import ( "image" diff --git a/geom/geom.go b/geom/geom.go index 1bfd14f3e..6b7394465 100644 --- a/geom/geom.go +++ b/geom/geom.go @@ -19,7 +19,7 @@ the screen. Positions on the plane are measured in typographic points, Any interface that draws to the screen using types from the geom package scales the number of pixels to maintain a Pt as 1/72 of an inch. */ -package geom // import "golang.org/x/mobile/geom" +package geom /* Notes on the various underlying coordinate systems. diff --git a/gl/doc.go b/gl/doc.go index 4cf95042c..408c35a68 100644 --- a/gl/doc.go +++ b/gl/doc.go @@ -42,7 +42,7 @@ error messages. For example, The gldebug tracing has very high overhead, so make sure to remove the build tag before deploying any binaries. */ -package gl // import "golang.org/x/mobile/gl" +package gl /* Implementation details. From 3a7bc9f8a4de41ecf23e44f7906242ae68b84ac5 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Wed, 5 Mar 2025 12:57:28 -0800 Subject: [PATCH 43/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I38d44c7d8e64e31452841c3901aad7a7604c6936 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/655042 Reviewed-by: David Chase Reviewed-by: Dmitri Shuralyov Auto-Submit: Gopher Robot LUCI-TryBot-Result: Go LUCI --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 23b39fa82..5b5e8c499 100644 --- a/go.mod +++ b/go.mod @@ -17,10 +17,10 @@ godebug gotypesalias=0 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.24.0 - golang.org/x/mod v0.23.0 - golang.org/x/sync v0.11.0 - golang.org/x/tools v0.30.0 + golang.org/x/image v0.25.0 + golang.org/x/mod v0.24.0 + golang.org/x/sync v0.12.0 + golang.org/x/tools v0.31.0 ) -require golang.org/x/sys v0.30.0 // indirect +require golang.org/x/sys v0.31.0 // indirect diff --git a/go.sum b/go.sum index 31424023e..4b7c42337 100644 --- a/go.sum +++ b/go.sum @@ -2,13 +2,13 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.24.0 h1:AN7zRgVsbvmTfNyqIbbOraYL8mSwcKncEj8ofjgzcMQ= -golang.org/x/image v0.24.0/go.mod h1:4b/ITuLfqYq1hqZcjofwctIhi7sZh2WaCjvsBNjjya8= -golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= -golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= -golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= +golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ= +golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs= +golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= +golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= +golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= From 978277e7eaf70fef73261815df6ce0d6e606af18 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Mon, 7 Apr 2025 19:17:51 -0700 Subject: [PATCH 44/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I61af4d63aed7548220a58b231e0347f5c67004a5 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/663619 Auto-Submit: Gopher Robot Reviewed-by: David Chase Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 5b5e8c499..72c5401a8 100644 --- a/go.mod +++ b/go.mod @@ -17,10 +17,10 @@ godebug gotypesalias=0 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.25.0 + golang.org/x/image v0.26.0 golang.org/x/mod v0.24.0 - golang.org/x/sync v0.12.0 - golang.org/x/tools v0.31.0 + golang.org/x/sync v0.13.0 + golang.org/x/tools v0.32.0 ) -require golang.org/x/sys v0.31.0 // indirect +require golang.org/x/sys v0.32.0 // indirect diff --git a/go.sum b/go.sum index 4b7c42337..bc1cdbc4f 100644 --- a/go.sum +++ b/go.sum @@ -2,13 +2,13 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ= -golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs= +golang.org/x/image v0.26.0 h1:4XjIFEZWQmCZi6Wv8BoxsDhRU3RVnLX04dToTDAEPlY= +golang.org/x/image v0.26.0/go.mod h1:lcxbMFAovzpnJxzXS3nyL83K27tmqtKzIJpctK8YO5c= golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= -golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= +golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= +golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/tools v0.32.0 h1:Q7N1vhpkQv7ybVzLFtTjvQya2ewbwNDZzUgfXGqtMWU= +golang.org/x/tools v0.32.0/go.mod h1:ZxrU41P/wAbZD8EDa6dDCa6XfpkhJ7HFMjHJXfBDu8s= From 78cd7a343bde765feaecace9f575518435d13e11 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Mon, 5 May 2025 14:56:29 -0700 Subject: [PATCH 45/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: Ie9c5a8e8b88723773c5884317a7724771fdc0db8 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/670099 Reviewed-by: Cherry Mui Auto-Submit: Gopher Robot Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 72c5401a8..d3a3ceefb 100644 --- a/go.mod +++ b/go.mod @@ -17,10 +17,10 @@ godebug gotypesalias=0 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.26.0 + golang.org/x/image v0.27.0 golang.org/x/mod v0.24.0 - golang.org/x/sync v0.13.0 - golang.org/x/tools v0.32.0 + golang.org/x/sync v0.14.0 + golang.org/x/tools v0.33.0 ) -require golang.org/x/sys v0.32.0 // indirect +require golang.org/x/sys v0.33.0 // indirect diff --git a/go.sum b/go.sum index bc1cdbc4f..093fbf4e8 100644 --- a/go.sum +++ b/go.sum @@ -2,13 +2,13 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.26.0 h1:4XjIFEZWQmCZi6Wv8BoxsDhRU3RVnLX04dToTDAEPlY= -golang.org/x/image v0.26.0/go.mod h1:lcxbMFAovzpnJxzXS3nyL83K27tmqtKzIJpctK8YO5c= +golang.org/x/image v0.27.0 h1:C8gA4oWU/tKkdCfYT6T2u4faJu3MeNS5O8UPWlPF61w= +golang.org/x/image v0.27.0/go.mod h1:xbdrClrAUway1MUTEZDq9mz/UpRwYAkFFNUslZtcB+g= golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= -golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= -golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= -golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/tools v0.32.0 h1:Q7N1vhpkQv7ybVzLFtTjvQya2ewbwNDZzUgfXGqtMWU= -golang.org/x/tools v0.32.0/go.mod h1:ZxrU41P/wAbZD8EDa6dDCa6XfpkhJ7HFMjHJXfBDu8s= +golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= +golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= +golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= From a1d90793fc63015513ae877a689ddcc0903750ae Mon Sep 17 00:00:00 2001 From: Iliya Lyan <68940374+12ya@users.noreply.github.com> Date: Mon, 19 May 2025 12:08:46 +0000 Subject: [PATCH 46/51] all: replace deprecated io/ioutil package Change-Id: Ie22fc00b1382fbf854ce5c2cd617bc9cb1e0c674 GitHub-Last-Rev: 3176a9fecffd48bad69493a188116a4f0961640d GitHub-Pull-Request: golang/mobile#110 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/674035 Reviewed-by: David Chase Reviewed-by: Hajime Hoshi Auto-Submit: Hajime Hoshi LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov --- app/app_test.go | 3 +-- bind/bind_test.go | 19 +++++++++---------- bind/java/seq_test.go | 11 +++++------ bind/objc/seq_test.go | 7 +++---- bind/testdata/testpkg/testpkg.go | 4 ++-- cmd/gobind/gen.go | 21 ++++++++++----------- cmd/gobind/main.go | 3 +-- cmd/gomobile/bind.go | 3 +-- cmd/gomobile/bind_androidapp.go | 5 ++--- cmd/gomobile/build_androidapp.go | 5 ++--- cmd/gomobile/build_apple.go | 3 +-- cmd/gomobile/build_test.go | 3 +-- cmd/gomobile/cert_test.go | 3 +-- cmd/gomobile/env.go | 5 ++--- cmd/gomobile/env_test.go | 3 +-- cmd/gomobile/gendex.go | 5 ++--- cmd/gomobile/init.go | 5 ++--- cmd/gomobile/init_test.go | 5 ++--- cmd/gomobile/main.go | 3 +-- cmd/gomobile/writer_test.go | 5 ++--- exp/f32/gen.go | 4 ++-- exp/font/font_android.go | 6 +++--- exp/font/font_linux.go | 10 +++++----- exp/sprite/portable/affine_test.go | 3 +-- gl/dll_windows.go | 17 ++++++++--------- gl/gendebug.go | 3 +-- internal/binres/binres_test.go | 5 ++--- internal/binres/genarsc.go | 4 ++-- 28 files changed, 75 insertions(+), 98 deletions(-) diff --git a/app/app_test.go b/app/app_test.go index 91742192b..9fa2a188a 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -9,7 +9,6 @@ import ( "image" "image/color" _ "image/png" - "io/ioutil" "net" "os" "os/exec" @@ -56,7 +55,7 @@ func TestAndroidApp(t *testing.T) { t.Fatal(err) } - tmpdir, err := ioutil.TempDir("", "app-test-") + tmpdir, err := os.MkdirTemp("", "app-test-") if err != nil { t.Fatal(err) } diff --git a/bind/bind_test.go b/bind/bind_test.go index af0973323..96288a4e2 100644 --- a/bind/bind_test.go +++ b/bind/bind_test.go @@ -15,7 +15,6 @@ import ( "go/token" "go/types" "io" - "io/ioutil" "log" "os" "os/exec" @@ -125,7 +124,7 @@ func diff(a, b string) string { } func writeTempFile(t *testing.T, name string, contents []byte) string { - f, err := ioutil.TempFile("", name) + f, err := os.CreateTemp("", name) if err != nil { t.Fatal(err) } @@ -219,14 +218,14 @@ func genObjcPackages(t *testing.T, dir string, cg *ObjcWrapper) { pkgFile := filepath.Join(pkgDir, "package.go") cg.Buf.Reset() cg.GenPackage(i) - if err := ioutil.WriteFile(pkgFile, cg.Buf.Bytes(), 0600); err != nil { + if err := os.WriteFile(pkgFile, cg.Buf.Bytes(), 0600); err != nil { t.Fatal(err) } } cg.Buf.Reset() cg.GenInterfaces() clsFile := filepath.Join(pkgBase, "interfaces.go") - if err := ioutil.WriteFile(clsFile, cg.Buf.Bytes(), 0600); err != nil { + if err := os.WriteFile(clsFile, cg.Buf.Bytes(), 0600); err != nil { t.Fatal(err) } @@ -258,7 +257,7 @@ func genJavaPackages(t *testing.T, dir string, cg *ClassGen) { pkgFile := filepath.Join(pkgDir, "package.go") cg.Buf.Reset() cg.GenPackage(i) - if err := ioutil.WriteFile(pkgFile, cg.Buf.Bytes(), 0600); err != nil { + if err := os.WriteFile(pkgFile, cg.Buf.Bytes(), 0600); err != nil { t.Fatal(err) } io.Copy(buf, cg.Buf) @@ -266,7 +265,7 @@ func genJavaPackages(t *testing.T, dir string, cg *ClassGen) { cg.Buf.Reset() cg.GenInterfaces() clsFile := filepath.Join(pkgBase, "interfaces.go") - if err := ioutil.WriteFile(clsFile, cg.Buf.Bytes(), 0600); err != nil { + if err := os.WriteFile(clsFile, cg.Buf.Bytes(), 0600); err != nil { t.Fatal(err) } io.Copy(buf, cg.Buf) @@ -306,7 +305,7 @@ func TestGenJava(t *testing.T) { } tmpGopath := "" if len(classes) > 0 { - tmpGopath, err = ioutil.TempDir(os.TempDir(), "gomobile-bind-test-") + tmpGopath, err = os.MkdirTemp(os.TempDir(), "gomobile-bind-test-") if err != nil { t.Fatal(err) } @@ -423,7 +422,7 @@ func TestGenGoJavaWrappers(t *testing.T) { if err != nil { t.Fatal(err) } - tmpGopath, err := ioutil.TempDir(os.TempDir(), "gomobile-bind-test-") + tmpGopath, err := os.MkdirTemp(os.TempDir(), "gomobile-bind-test-") if err != nil { t.Fatal(err) } @@ -453,7 +452,7 @@ func TestGenGoObjcWrappers(t *testing.T) { if err != nil { t.Fatal(err) } - tmpGopath, err := ioutil.TempDir(os.TempDir(), "gomobile-bind-test-") + tmpGopath, err := os.MkdirTemp(os.TempDir(), "gomobile-bind-test-") if err != nil { t.Fatal(err) } @@ -499,7 +498,7 @@ func testGenGo(t *testing.T, filename string, buf *bytes.Buffer, pkg *types.Pack } golden += ".golden" - goldenContents, err := ioutil.ReadFile(golden) + goldenContents, err := os.ReadFile(golden) if err != nil { t.Fatalf("failed to read golden file: %v", err) } diff --git a/bind/java/seq_test.go b/bind/java/seq_test.go index a5151d40b..4d9cd2fda 100644 --- a/bind/java/seq_test.go +++ b/bind/java/seq_test.go @@ -7,7 +7,6 @@ package java import ( "fmt" "io" - "io/ioutil" "log" "os" "os/exec" @@ -28,7 +27,7 @@ func TestMain(m *testing.M) { func testMain(m *testing.M) int { // Build gomobile and gobind and put them into PATH. - binDir, err := ioutil.TempDir("", "bind-java-test-") + binDir, err := os.MkdirTemp("", "bind-java-test-") if err != nil { log.Fatal(err) } @@ -117,7 +116,7 @@ func runTest(t *testing.T, pkgNames []string, javaPkg, javaCls string) { if err != nil { t.Fatalf("failed pwd: %v", err) } - tmpdir, err := ioutil.TempDir("", "bind-java-seq-test-") + tmpdir, err := os.MkdirTemp("", "bind-java-seq-test-") if err != nil { t.Fatalf("failed to prepare temp dir: %v", err) } @@ -164,20 +163,20 @@ func runTest(t *testing.T, pkgNames []string, javaPkg, javaCls string) { } fname = filepath.Join(tmpdir, "src/main/AndroidManifest.xml") - err = ioutil.WriteFile(fname, []byte(androidmanifest), 0700) + err = os.WriteFile(fname, []byte(androidmanifest), 0700) if err != nil { t.Fatalf("failed to write android manifest file: %v", err) } // Add a dummy string resource to avoid errors from the Android build system. fname = filepath.Join(tmpdir, "src/main/res/values/strings.xml") - err = ioutil.WriteFile(fname, []byte(stringsxml), 0700) + err = os.WriteFile(fname, []byte(stringsxml), 0700) if err != nil { t.Fatalf("failed to write strings.xml file: %v", err) } fname = filepath.Join(tmpdir, "build.gradle") - err = ioutil.WriteFile(fname, []byte(buildgradle), 0700) + err = os.WriteFile(fname, []byte(buildgradle), 0700) if err != nil { t.Fatalf("failed to write build.gradle file: %v", err) } diff --git a/bind/objc/seq_test.go b/bind/objc/seq_test.go index e6ef5e71d..0aa4bdcf6 100644 --- a/bind/objc/seq_test.go +++ b/bind/objc/seq_test.go @@ -8,7 +8,6 @@ import ( "flag" "fmt" "io" - "io/ioutil" "log" "os" "os/exec" @@ -43,7 +42,7 @@ func TestMain(m *testing.M) { } func testMain(m *testing.M) int { - binDir, err := ioutil.TempDir("", "bind-objc-test-") + binDir, err := os.MkdirTemp("", "bind-objc-test-") if err != nil { log.Fatal(err) } @@ -108,7 +107,7 @@ func runTest(t *testing.T, pkgNames []string, prefix, testfile, framework string t.Skip("command xcodebuild not found, skipping") } - tmpdir, err := ioutil.TempDir("", "bind-objc-seq-test-") + tmpdir, err := os.MkdirTemp("", "bind-objc-seq-test-") if err != nil { t.Fatalf("failed to prepare temp dir: %v", err) } @@ -200,7 +199,7 @@ func createProject(dir, testfile, framework string) error { {"xcodetest/AppDelegate.m", appdelegatem}, } for _, f := range files { - if err := ioutil.WriteFile(filepath.Join(dir, f.path), []byte(f.content), 0700); err != nil { + if err := os.WriteFile(filepath.Join(dir, f.path), []byte(f.content), 0700); err != nil { return err } } diff --git a/bind/testdata/testpkg/testpkg.go b/bind/testdata/testpkg/testpkg.go index cd7a2ea04..40203bfe3 100644 --- a/bind/testdata/testpkg/testpkg.go +++ b/bind/testdata/testpkg/testpkg.go @@ -12,7 +12,7 @@ import ( "context" "errors" "fmt" - "io/ioutil" + "io" "log" "math" "os" @@ -232,7 +232,7 @@ func ReadAsset() string { } defer rc.Close() - b, err := ioutil.ReadAll(rc) + b, err := io.ReadAll(rc) if err != nil { log.Fatal(err) } diff --git a/cmd/gobind/gen.go b/cmd/gobind/gen.go index 87c72d9d2..1bce3a433 100644 --- a/cmd/gobind/gen.go +++ b/cmd/gobind/gen.go @@ -11,7 +11,6 @@ import ( "go/token" "go/types" "io" - "io/ioutil" "os" "path/filepath" "strings" @@ -203,7 +202,7 @@ func genObjcPackages(dir string, types []*objc.Named, embedders []importers.Stru pkgFile := filepath.Join(pkgDir, "package.go") buf.Reset() cg.GenPackage(i) - if err := ioutil.WriteFile(pkgFile, buf.Bytes(), 0600); err != nil { + if err := os.WriteFile(pkgFile, buf.Bytes(), 0600); err != nil { return err } } @@ -213,7 +212,7 @@ func genObjcPackages(dir string, types []*objc.Named, embedders []importers.Stru if err := os.MkdirAll(objcBase, 0700); err != nil { return err } - if err := ioutil.WriteFile(filepath.Join(objcBase, "interfaces.go"), buf.Bytes(), 0600); err != nil { + if err := os.WriteFile(filepath.Join(objcBase, "interfaces.go"), buf.Bytes(), 0600); err != nil { return err } goBase := filepath.Join(dir, "src", "gobind") @@ -222,17 +221,17 @@ func genObjcPackages(dir string, types []*objc.Named, embedders []importers.Stru } buf.Reset() cg.GenGo() - if err := ioutil.WriteFile(filepath.Join(goBase, "interfaces_darwin.go"), buf.Bytes(), 0600); err != nil { + if err := os.WriteFile(filepath.Join(goBase, "interfaces_darwin.go"), buf.Bytes(), 0600); err != nil { return err } buf.Reset() cg.GenH() - if err := ioutil.WriteFile(filepath.Join(goBase, "interfaces.h"), buf.Bytes(), 0600); err != nil { + if err := os.WriteFile(filepath.Join(goBase, "interfaces.h"), buf.Bytes(), 0600); err != nil { return err } buf.Reset() cg.GenM() - if err := ioutil.WriteFile(filepath.Join(goBase, "interfaces_darwin.m"), buf.Bytes(), 0600); err != nil { + if err := os.WriteFile(filepath.Join(goBase, "interfaces_darwin.m"), buf.Bytes(), 0600); err != nil { return err } return nil @@ -256,7 +255,7 @@ func genJavaPackages(dir string, classes []*java.Class, embedders []importers.St pkgFile := filepath.Join(pkgDir, "package.go") buf.Reset() cg.GenPackage(i) - if err := ioutil.WriteFile(pkgFile, buf.Bytes(), 0600); err != nil { + if err := os.WriteFile(pkgFile, buf.Bytes(), 0600); err != nil { return err } } @@ -266,7 +265,7 @@ func genJavaPackages(dir string, classes []*java.Class, embedders []importers.St if err := os.MkdirAll(javaBase, 0700); err != nil { return err } - if err := ioutil.WriteFile(filepath.Join(javaBase, "interfaces.go"), buf.Bytes(), 0600); err != nil { + if err := os.WriteFile(filepath.Join(javaBase, "interfaces.go"), buf.Bytes(), 0600); err != nil { return err } goBase := filepath.Join(dir, "src", "gobind") @@ -275,17 +274,17 @@ func genJavaPackages(dir string, classes []*java.Class, embedders []importers.St } buf.Reset() cg.GenGo() - if err := ioutil.WriteFile(filepath.Join(goBase, "classes_android.go"), buf.Bytes(), 0600); err != nil { + if err := os.WriteFile(filepath.Join(goBase, "classes_android.go"), buf.Bytes(), 0600); err != nil { return err } buf.Reset() cg.GenH() - if err := ioutil.WriteFile(filepath.Join(goBase, "classes.h"), buf.Bytes(), 0600); err != nil { + if err := os.WriteFile(filepath.Join(goBase, "classes.h"), buf.Bytes(), 0600); err != nil { return err } buf.Reset() cg.GenC() - if err := ioutil.WriteFile(filepath.Join(goBase, "classes_android.c"), buf.Bytes(), 0600); err != nil { + if err := os.WriteFile(filepath.Join(goBase, "classes_android.c"), buf.Bytes(), 0600); err != nil { return err } return nil diff --git a/cmd/gobind/main.go b/cmd/gobind/main.go index b2503080a..bf1e7778e 100644 --- a/cmd/gobind/main.go +++ b/cmd/gobind/main.go @@ -10,7 +10,6 @@ import ( "fmt" "go/ast" "go/types" - "io/ioutil" "log" "os" "os/exec" @@ -102,7 +101,7 @@ func run() { if len(classes) > 0 || len(otypes) > 0 { srcDir := *outdir if srcDir == "" { - srcDir, err = ioutil.TempDir(os.TempDir(), "gobind-") + srcDir, err = os.MkdirTemp(os.TempDir(), "gobind-") if err != nil { log.Fatal(err) } diff --git a/cmd/gomobile/bind.go b/cmd/gomobile/bind.go index 4e1c453f4..2cab5609c 100644 --- a/cmd/gomobile/bind.go +++ b/cmd/gomobile/bind.go @@ -10,7 +10,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -197,7 +196,7 @@ func writeFile(filename string, generate func(io.Writer) error) error { } if buildN { - return generate(ioutil.Discard) + return generate(io.Discard) } f, err := os.Create(filename) diff --git a/cmd/gomobile/bind_androidapp.go b/cmd/gomobile/bind_androidapp.go index a8fab279d..d03e64968 100644 --- a/cmd/gomobile/bind_androidapp.go +++ b/cmd/gomobile/bind_androidapp.go @@ -8,7 +8,6 @@ import ( "archive/zip" "fmt" "io" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -73,7 +72,7 @@ func goAndroidBind(gobind string, pkgs []*packages.Package, targets []targetInfo } func buildSrcJar(src string) error { - var out io.Writer = ioutil.Discard + var out io.Writer = io.Discard if !buildN { ext := filepath.Ext(buildO) f, err := os.Create(buildO[:len(buildO)-len(ext)] + "-sources.jar") @@ -110,7 +109,7 @@ func buildSrcJar(src string) error { // // javac and jar commands are needed to build classes.jar. func buildAAR(srcDir, androidDir string, pkgs []*packages.Package, targets []targetInfo) (err error) { - var out io.Writer = ioutil.Discard + var out io.Writer = io.Discard if buildO == "" { buildO = pkgs[0].Name + ".aar" } diff --git a/cmd/gomobile/build_androidapp.go b/cmd/gomobile/build_androidapp.go index 5063f94ac..48837b5c4 100644 --- a/cmd/gomobile/build_androidapp.go +++ b/cmd/gomobile/build_androidapp.go @@ -13,7 +13,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "log" "os" "path" @@ -37,7 +36,7 @@ func goAndroidBuild(pkg *packages.Package, targets []targetInfo) (map[string]boo dir := filepath.Dir(pkg.GoFiles[0]) manifestPath := filepath.Join(dir, "AndroidManifest.xml") - manifestData, err := ioutil.ReadFile(manifestPath) + manifestData, err := os.ReadFile(manifestPath) if err != nil { if !os.IsNotExist(err) { return nil, err @@ -129,7 +128,7 @@ func goAndroidBuild(pkg *packages.Package, targets []targetInfo) (map[string]boo fmt.Fprintf(os.Stderr, "apk: %s\n", name) } if buildN { - return ioutil.Discard, nil + return io.Discard, nil } return apkw.Create(name) } diff --git a/cmd/gomobile/build_apple.go b/cmd/gomobile/build_apple.go index 298367bdf..1919a7ed7 100644 --- a/cmd/gomobile/build_apple.go +++ b/cmd/gomobile/build_apple.go @@ -9,7 +9,6 @@ import ( "crypto/x509" "encoding/pem" "fmt" - "io/ioutil" "os" "os/exec" "path" @@ -69,7 +68,7 @@ func goAppleBuild(pkg *packages.Package, bundleID string, targets []targetInfo) printcmd("echo \"%s\" > %s", file.contents, file.name) } if !buildN { - if err := ioutil.WriteFile(file.name, file.contents, 0644); err != nil { + if err := os.WriteFile(file.name, file.contents, 0644); err != nil { return nil, err } } diff --git a/cmd/gomobile/build_test.go b/cmd/gomobile/build_test.go index 5cec2acf2..e5e412ab7 100644 --- a/cmd/gomobile/build_test.go +++ b/cmd/gomobile/build_test.go @@ -6,7 +6,6 @@ package main import ( "bytes" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -212,7 +211,7 @@ func TestBuildWithGoModules(t *testing.T) { t.Skipf("gomobile are not available on %s", runtime.GOOS) } - dir, err := ioutil.TempDir("", "gomobile-test") + dir, err := os.MkdirTemp("", "gomobile-test") if err != nil { t.Fatal(err) } diff --git a/cmd/gomobile/cert_test.go b/cmd/gomobile/cert_test.go index c871394b4..c5c5e3c6b 100644 --- a/cmd/gomobile/cert_test.go +++ b/cmd/gomobile/cert_test.go @@ -8,7 +8,6 @@ import ( "crypto/rand" "crypto/x509" "encoding/pem" - "io/ioutil" "os" "os/exec" "testing" @@ -30,7 +29,7 @@ func TestSignPKCS7(t *testing.T) { if err != nil { t.Fatal(err) } - sig, err := ioutil.TempFile("", "content.rsa") + sig, err := os.CreateTemp("", "content.rsa") if err != nil { t.Fatal(err) } diff --git a/cmd/gomobile/env.go b/cmd/gomobile/env.go index 320597994..869e38cf3 100644 --- a/cmd/gomobile/env.go +++ b/cmd/gomobile/env.go @@ -10,7 +10,6 @@ import ( "errors" "fmt" "io/fs" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -144,7 +143,7 @@ func buildEnvInit() (cleanup func(), err error) { tmpdir = "$WORK" cleanupFn = func() {} } else { - tmpdir, err = ioutil.TempDir("", "gomobile-work-") + tmpdir, err = os.MkdirTemp("", "gomobile-work-") if err != nil { return nil, err } @@ -340,7 +339,7 @@ func checkNDKRoot(ndkRoot string, targets []targetInfo) error { // compatibleNDKRoots searches the side-by-side NDK dirs for compatible SDKs. func compatibleNDKRoots(ndkForest string, targets []targetInfo) ([]string, error) { - ndkDirs, err := ioutil.ReadDir(ndkForest) + ndkDirs, err := os.ReadDir(ndkForest) if err != nil { return nil, err } diff --git a/cmd/gomobile/env_test.go b/cmd/gomobile/env_test.go index 1b9e452b4..9090eaab3 100644 --- a/cmd/gomobile/env_test.go +++ b/cmd/gomobile/env_test.go @@ -6,14 +6,13 @@ package main import ( "fmt" - "io/ioutil" "os" "path/filepath" "testing" ) func TestNdkRoot(t *testing.T) { - home, err := ioutil.TempDir("", "gomobile-test-") + home, err := os.MkdirTemp("", "gomobile-test-") if err != nil { t.Fatal(err) } diff --git a/cmd/gomobile/gendex.go b/cmd/gomobile/gendex.go index 9ef5b315d..1e5efc957 100644 --- a/cmd/gomobile/gendex.go +++ b/cmd/gomobile/gendex.go @@ -23,7 +23,6 @@ import ( "flag" "fmt" "go/format" - "io/ioutil" "log" "os" "os/exec" @@ -40,7 +39,7 @@ func main() { flag.Parse() var err error - tmpdir, err = ioutil.TempDir("", "gendex-") + tmpdir, err = os.MkdirTemp("", "gendex-") if err != nil { log.Fatal(err) } @@ -98,7 +97,7 @@ func gendex() error { os.Stderr.Write(out) return err } - src, err := ioutil.ReadFile(tmpdir + "/classes.dex") + src, err := os.ReadFile(tmpdir + "/classes.dex") if err != nil { return err } diff --git a/cmd/gomobile/init.go b/cmd/gomobile/init.go index 48642e22b..be4eaea81 100644 --- a/cmd/gomobile/init.go +++ b/cmd/gomobile/init.go @@ -9,7 +9,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -63,7 +62,7 @@ func runInit(cmd *command) error { tmpdir = filepath.Join(gomobilepath, "work") } else { var err error - tmpdir, err = ioutil.TempDir(gomobilepath, "work-") + tmpdir, err = os.MkdirTemp(gomobilepath, "work-") if err != nil { return err } @@ -153,7 +152,7 @@ func installOpenAL(gomobilepath string) error { alTmpDir = filepath.Join(gomobilepath, "work") } else { var err error - alTmpDir, err = ioutil.TempDir(gomobilepath, "openal-release-") + alTmpDir, err = os.MkdirTemp(gomobilepath, "openal-release-") if err != nil { return err } diff --git a/cmd/gomobile/init_test.go b/cmd/gomobile/init_test.go index 8a51e75ac..0e737170e 100644 --- a/cmd/gomobile/init_test.go +++ b/cmd/gomobile/init_test.go @@ -6,7 +6,6 @@ package main import ( "bytes" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -40,7 +39,7 @@ func TestInit(t *testing.T) { // Test that first GOPATH element is chosen correctly. var err error - gopath, err = ioutil.TempDir("", "gomobile-test") + gopath, err = os.MkdirTemp("", "gomobile-test") if err != nil { t.Fatal(err) } @@ -55,7 +54,7 @@ func TestInit(t *testing.T) { os.Setenv("HOMEDRIVE", "C:") } - emptymod, err := ioutil.TempDir("", "gomobile-test") + emptymod, err := os.MkdirTemp("", "gomobile-test") if err != nil { t.Fatal(err) } diff --git a/cmd/gomobile/main.go b/cmd/gomobile/main.go index 2d280b864..c123263f5 100644 --- a/cmd/gomobile/main.go +++ b/cmd/gomobile/main.go @@ -13,7 +13,6 @@ import ( "fmt" "html/template" "io" - "io/ioutil" "log" "os" "os/exec" @@ -159,7 +158,7 @@ func helpDocumentation(path string) { w.WriteString("*/\npackage main // import \"golang.org/x/mobile/cmd/gomobile\"\n") - if err := ioutil.WriteFile(path, w.Bytes(), 0666); err != nil { + if err := os.WriteFile(path, w.Bytes(), 0666); err != nil { log.Fatal(err) } } diff --git a/cmd/gomobile/writer_test.go b/cmd/gomobile/writer_test.go index 345ab2821..324659a8b 100644 --- a/cmd/gomobile/writer_test.go +++ b/cmd/gomobile/writer_test.go @@ -8,7 +8,6 @@ import ( "crypto/x509" "encoding/pem" "io" - "io/ioutil" "os" "os/exec" "testing" @@ -28,7 +27,7 @@ func TestWriter(t *testing.T) { t.Fatal(err) } - f, err := ioutil.TempFile("", "testapk-") + f, err := os.CreateTemp("", "testapk-") if err != nil { t.Fatal(err) } @@ -141,7 +140,7 @@ const androidManifest = ` ` func writeTempFile(data string) (string, error) { - f, err := ioutil.TempFile("", "gofmt") + f, err := os.CreateTemp("", "gofmt") if err != nil { return "", err } diff --git a/exp/f32/gen.go b/exp/f32/gen.go index 2af3327bf..267948381 100644 --- a/exp/f32/gen.go +++ b/exp/f32/gen.go @@ -16,9 +16,9 @@ import ( "flag" "fmt" "go/format" - "io/ioutil" "log" "math" + "os" ) // N is the number of entries in the sin look-up table. It must be a power of 2. @@ -42,7 +42,7 @@ func main() { if err != nil { log.Fatal(err) } - if err := ioutil.WriteFile(*filename, data, 0644); err != nil { + if err := os.WriteFile(*filename, data, 0644); err != nil { log.Fatal(err) } } diff --git a/exp/font/font_android.go b/exp/font/font_android.go index 3503ec991..bbc0f34e2 100644 --- a/exp/font/font_android.go +++ b/exp/font/font_android.go @@ -4,12 +4,12 @@ package font -import "io/ioutil" +import "os" func buildDefault() ([]byte, error) { - return ioutil.ReadFile("/system/fonts/DroidSans.ttf") + return os.ReadFile("/system/fonts/DroidSans.ttf") } func buildMonospace() ([]byte, error) { - return ioutil.ReadFile("/system/fonts/DroidSansMono.ttf") + return os.ReadFile("/system/fonts/DroidSansMono.ttf") } diff --git a/exp/font/font_linux.go b/exp/font/font_linux.go index f0beb34b5..c0f00c88d 100644 --- a/exp/font/font_linux.go +++ b/exp/font/font_linux.go @@ -6,13 +6,13 @@ package font -import "io/ioutil" +import "os" func buildDefault() ([]byte, error) { // Try Noto first, but fall back to Droid as the latter was deprecated - noto, nerr := ioutil.ReadFile("/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf") + noto, nerr := os.ReadFile("/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf") if nerr != nil { - if droid, err := ioutil.ReadFile("/usr/share/fonts/truetype/droid/DroidSans.ttf"); err == nil { + if droid, err := os.ReadFile("/usr/share/fonts/truetype/droid/DroidSans.ttf"); err == nil { return droid, nil } } @@ -21,9 +21,9 @@ func buildDefault() ([]byte, error) { func buildMonospace() ([]byte, error) { // Try Noto first, but fall back to Droid as the latter was deprecated - noto, nerr := ioutil.ReadFile("/usr/share/fonts/truetype/noto/NotoMono-Regular.ttf") + noto, nerr := os.ReadFile("/usr/share/fonts/truetype/noto/NotoMono-Regular.ttf") if nerr != nil { - if droid, err := ioutil.ReadFile("/usr/share/fonts/truetype/droid/DroidSansMono.ttf"); err == nil { + if droid, err := os.ReadFile("/usr/share/fonts/truetype/droid/DroidSansMono.ttf"); err == nil { return droid, nil } } diff --git a/exp/sprite/portable/affine_test.go b/exp/sprite/portable/affine_test.go index 4b98e7c44..943a81267 100644 --- a/exp/sprite/portable/affine_test.go +++ b/exp/sprite/portable/affine_test.go @@ -9,7 +9,6 @@ import ( "image/color" "image/draw" "image/png" - "io/ioutil" "math" "os" "runtime" @@ -147,7 +146,7 @@ func TestAffineMask(t *testing.T) { } func writeTempPNG(prefix string, m image.Image) (string, error) { - f, err := ioutil.TempFile("", prefix+"-") + f, err := os.CreateTemp("", prefix+"-") if err != nil { return "", err } diff --git a/gl/dll_windows.go b/gl/dll_windows.go index 1afc5f8ef..b7a0d90ee 100644 --- a/gl/dll_windows.go +++ b/gl/dll_windows.go @@ -10,7 +10,6 @@ import ( "debug/pe" "fmt" "io" - "io/ioutil" "log" "net/http" "os" @@ -18,7 +17,7 @@ import ( "runtime" ) -var debug = log.New(ioutil.Discard, "gl: ", log.LstdFlags) +var debug = log.New(io.Discard, "gl: ", log.LstdFlags) func downloadDLLs() (path string, err error) { url := "https://dl.google.com/go/mobile/angle-bd3f8780b-" + runtime.GOARCH + ".tgz" @@ -54,11 +53,11 @@ func downloadDLLs() (path string, err error) { } switch header.Name { case "angle-" + runtime.GOARCH + "/libglesv2.dll": - bytesGLESv2, err = ioutil.ReadAll(tr) + bytesGLESv2, err = io.ReadAll(tr) case "angle-" + runtime.GOARCH + "/libegl.dll": - bytesEGL, err = ioutil.ReadAll(tr) + bytesEGL, err = io.ReadAll(tr) case "angle-" + runtime.GOARCH + "/d3dcompiler_47.dll": - bytesD3DCompiler, err = ioutil.ReadAll(tr) + bytesD3DCompiler, err = io.ReadAll(tr) default: // skip } if err != nil { @@ -70,13 +69,13 @@ func downloadDLLs() (path string, err error) { } writeDLLs := func(path string) error { - if err := ioutil.WriteFile(filepath.Join(path, "libglesv2.dll"), bytesGLESv2, 0755); err != nil { + if err := os.WriteFile(filepath.Join(path, "libglesv2.dll"), bytesGLESv2, 0755); err != nil { return fmt.Errorf("gl: cannot install ANGLE: %v", err) } - if err := ioutil.WriteFile(filepath.Join(path, "libegl.dll"), bytesEGL, 0755); err != nil { + if err := os.WriteFile(filepath.Join(path, "libegl.dll"), bytesEGL, 0755); err != nil { return fmt.Errorf("gl: cannot install ANGLE: %v", err) } - if err := ioutil.WriteFile(filepath.Join(path, "d3dcompiler_47.dll"), bytesD3DCompiler, 0755); err != nil { + if err := os.WriteFile(filepath.Join(path, "d3dcompiler_47.dll"), bytesD3DCompiler, 0755); err != nil { return fmt.Errorf("gl: cannot install ANGLE: %v", err) } return nil @@ -152,7 +151,7 @@ func chromePath() string { } for _, installdir := range installdirs { - versiondirs, err := ioutil.ReadDir(installdir) + versiondirs, err := os.ReadDir(installdir) if err != nil { continue } diff --git a/gl/gendebug.go b/gl/gendebug.go index 7e3d5a2a6..b04e3ca28 100644 --- a/gl/gendebug.go +++ b/gl/gendebug.go @@ -18,7 +18,6 @@ import ( "go/parser" "go/printer" "go/token" - "io/ioutil" "log" "os" "strconv" @@ -835,7 +834,7 @@ func main() { os.Stdout.Write(b) return } - if err := ioutil.WriteFile(*outfile, b, 0666); err != nil { + if err := os.WriteFile(*outfile, b, 0666); err != nil { die(err) } } diff --git a/internal/binres/binres_test.go b/internal/binres/binres_test.go index 06259b420..fecefaca4 100644 --- a/internal/binres/binres_test.go +++ b/internal/binres/binres_test.go @@ -10,7 +10,6 @@ import ( "encoding/xml" "errors" "fmt" - "io/ioutil" "log" "math" "os" @@ -108,7 +107,7 @@ func compareBytes(a, b []byte) error { } func TestBootstrap(t *testing.T) { - bin, err := ioutil.ReadFile("testdata/bootstrap.bin") + bin, err := os.ReadFile("testdata/bootstrap.bin") if err != nil { log.Fatal(err) } @@ -218,7 +217,7 @@ func TestEncode(t *testing.T) { t.Fatal(err) } - bin, err := ioutil.ReadFile("testdata/bootstrap.bin") + bin, err := os.ReadFile("testdata/bootstrap.bin") if err != nil { log.Fatal(err) } diff --git a/internal/binres/genarsc.go b/internal/binres/genarsc.go index 7d975cb8d..f05963646 100644 --- a/internal/binres/genarsc.go +++ b/internal/binres/genarsc.go @@ -12,8 +12,8 @@ package main import ( "fmt" - "io/ioutil" "log" + "os" "strconv" "golang.org/x/mobile/internal/binres" @@ -34,7 +34,7 @@ func main() { if err != nil { log.Fatal(err) } - if err := ioutil.WriteFile("arsc.go", []byte(fmt.Sprintf(tmpl, strconv.Quote(string(arsc)))), 0644); err != nil { + if err := os.WriteFile("arsc.go", []byte(fmt.Sprintf(tmpl, strconv.Quote(string(arsc)))), 0644); err != nil { log.Fatal(err) } } From a2a15c67f36f571f501e0a86d5a7f5f26e3fd201 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Thu, 5 Jun 2025 16:30:03 -0700 Subject: [PATCH 47/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I6a7818fa8c394792210b206020093b415c87484e Reviewed-on: https://go-review.googlesource.com/c/mobile/+/679222 Reviewed-by: Dmitri Shuralyov Auto-Submit: Gopher Robot Reviewed-by: David Chase LUCI-TryBot-Result: Go LUCI --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index d3a3ceefb..c4f0bbf58 100644 --- a/go.mod +++ b/go.mod @@ -17,10 +17,10 @@ godebug gotypesalias=0 require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.27.0 - golang.org/x/mod v0.24.0 - golang.org/x/sync v0.14.0 - golang.org/x/tools v0.33.0 + golang.org/x/image v0.28.0 + golang.org/x/mod v0.25.0 + golang.org/x/sync v0.15.0 + golang.org/x/tools v0.34.0 ) require golang.org/x/sys v0.33.0 // indirect diff --git a/go.sum b/go.sum index 093fbf4e8..d118a5160 100644 --- a/go.sum +++ b/go.sum @@ -2,13 +2,13 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.27.0 h1:C8gA4oWU/tKkdCfYT6T2u4faJu3MeNS5O8UPWlPF61w= -golang.org/x/image v0.27.0/go.mod h1:xbdrClrAUway1MUTEZDq9mz/UpRwYAkFFNUslZtcB+g= -golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= -golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= -golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= -golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/image v0.28.0 h1:gdem5JW1OLS4FbkWgLO+7ZeFzYtL3xClb97GaUzYMFE= +golang.org/x/image v0.28.0/go.mod h1:GUJYXtnGKEUgggyzh+Vxt+AviiCcyiwpsl8iQ8MvwGY= +golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w= +golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= +golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= -golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= +golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= +golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= From d5bb5ecc55c03634c30adcf688f9a2482006dcb0 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Fri, 11 Jul 2025 10:26:19 -0700 Subject: [PATCH 48/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I3b596cf026073a7b222102df5f52a8757de6376c Reviewed-on: https://go-review.googlesource.com/c/mobile/+/687556 Reviewed-by: Dmitri Shuralyov Auto-Submit: Gopher Robot Reviewed-by: David Chase LUCI-TryBot-Result: Go LUCI --- example/ivy/go.mod | 9 ++++----- example/ivy/go.sum | 48 ++++++++++------------------------------------ go.mod | 16 ++++++++++------ go.sum | 28 +++++++++++++++------------ 4 files changed, 40 insertions(+), 61 deletions(-) diff --git a/example/ivy/go.mod b/example/ivy/go.mod index 7b4640ba4..fb88a4f6f 100644 --- a/example/ivy/go.mod +++ b/example/ivy/go.mod @@ -3,13 +3,12 @@ module golang.org/x/mobile/example/ivy go 1.23.0 require ( - golang.org/x/mobile v0.0.0-20210924032853-1c027f395ef7 + golang.org/x/mobile v0.0.0-20250606033058-a2a15c67f36f robpike.io/ivy v0.2.7 ) require ( - golang.org/x/mod v0.4.2 // indirect - golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect - golang.org/x/tools v0.1.2 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + golang.org/x/mod v0.26.0 // indirect + golang.org/x/sync v0.16.0 // indirect + golang.org/x/tools v0.35.0 // indirect ) diff --git a/example/ivy/go.sum b/example/ivy/go.sum index bd42ab121..026100533 100644 --- a/example/ivy/go.sum +++ b/example/ivy/go.sum @@ -1,40 +1,12 @@ -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20210924032853-1c027f395ef7 h1:CyFUjc175y/mbMjxe+WdqI72jguLyjQChKCDe9mfTvg= -golang.org/x/mobile v0.0.0-20210924032853-1c027f395ef7/go.mod h1:c4YKU3ZylDmvbw+H/PSvm42vhdWbuxCzbonauEAP9B8= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +golang.org/x/mobile v0.0.0-20250606033058-a2a15c67f36f h1:/n+PL2HlfqeSiDCuhdBbRNlGS/g2fM4OHufalHaTVG8= +golang.org/x/mobile v0.0.0-20250606033058-a2a15c67f36f/go.mod h1:ESkJ836Z6LpG6mTVAhA48LpfW/8fNR0ifStlH2axyfg= +golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg= +golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= +golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= robpike.io/ivy v0.2.7 h1:XVYgWSm7THVm1bk1jfRBB9xhso459T22gbpotHbhk7M= robpike.io/ivy v0.2.7/go.mod h1:6B/DGaft5rvYiF7MgCTiZAAvH5W7vtu0eS2BW77updo= diff --git a/go.mod b/go.mod index c4f0bbf58..29ed63eab 100644 --- a/go.mod +++ b/go.mod @@ -16,11 +16,15 @@ go 1.23.0 godebug gotypesalias=0 require ( - golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/image v0.28.0 - golang.org/x/mod v0.25.0 - golang.org/x/sync v0.15.0 - golang.org/x/tools v0.34.0 + golang.org/x/exp/shiny v0.0.0-20250620022241-b7579e27df2b + golang.org/x/image v0.29.0 + golang.org/x/mod v0.26.0 + golang.org/x/sync v0.16.0 + golang.org/x/tools v0.35.0 + golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated ) -require golang.org/x/sys v0.33.0 // indirect +require ( + golang.org/x/sys v0.34.0 // indirect + golang.org/x/tools/go/expect v0.1.0-deprecated // indirect +) diff --git a/go.sum b/go.sum index d118a5160..38819f9fa 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,18 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 h1:3AGKexOYqL+ztdWdkB1bDwXgPBuTS/S8A4WzuTvJ8Cg= -golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/image v0.28.0 h1:gdem5JW1OLS4FbkWgLO+7ZeFzYtL3xClb97GaUzYMFE= -golang.org/x/image v0.28.0/go.mod h1:GUJYXtnGKEUgggyzh+Vxt+AviiCcyiwpsl8iQ8MvwGY= -golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w= -golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= -golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= -golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= -golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= -golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= +golang.org/x/exp/shiny v0.0.0-20250620022241-b7579e27df2b h1:zELBzk+7ERc6m8BxhzU2VYjp03wlEvi+cIgYQR5H3CI= +golang.org/x/exp/shiny v0.0.0-20250620022241-b7579e27df2b/go.mod h1:ygj7T6vSGhhm/9yTpOQQNvuAUFziTH7RUiH74EoE2C8= +golang.org/x/image v0.29.0 h1:HcdsyR4Gsuys/Axh0rDEmlBmB68rW1U9BUdB3UVHsas= +golang.org/x/image v0.29.0/go.mod h1:RVJROnf3SLK8d26OW91j4FrIHGbsJ8QnbEocVTOWQDA= +golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg= +golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= +golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= +golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= +golang.org/x/tools/go/expect v0.1.0-deprecated h1:jY2C5HGYR5lqex3gEniOQL0r7Dq5+VGVgY1nudX5lXY= +golang.org/x/tools/go/expect v0.1.0-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= From 395d808d53cdcc50f14b84fcb8049ba2c6427a69 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Thu, 7 Aug 2025 14:39:34 -0700 Subject: [PATCH 49/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I4db05e8462d9487db3885e73c35c9945afbee462 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/694003 Reviewed-by: Dmitri Shuralyov Reviewed-by: David Chase Auto-Submit: Gopher Robot LUCI-TryBot-Result: Go LUCI --- example/ivy/go.mod | 6 +++--- example/ivy/go.sum | 12 ++++++------ go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/example/ivy/go.mod b/example/ivy/go.mod index fb88a4f6f..8c82200da 100644 --- a/example/ivy/go.mod +++ b/example/ivy/go.mod @@ -3,12 +3,12 @@ module golang.org/x/mobile/example/ivy go 1.23.0 require ( - golang.org/x/mobile v0.0.0-20250606033058-a2a15c67f36f + golang.org/x/mobile v0.0.0-20250711185624-d5bb5ecc55c0 robpike.io/ivy v0.2.7 ) require ( - golang.org/x/mod v0.26.0 // indirect + golang.org/x/mod v0.27.0 // indirect golang.org/x/sync v0.16.0 // indirect - golang.org/x/tools v0.35.0 // indirect + golang.org/x/tools v0.36.0 // indirect ) diff --git a/example/ivy/go.sum b/example/ivy/go.sum index 026100533..d0dffbcda 100644 --- a/example/ivy/go.sum +++ b/example/ivy/go.sum @@ -1,12 +1,12 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -golang.org/x/mobile v0.0.0-20250606033058-a2a15c67f36f h1:/n+PL2HlfqeSiDCuhdBbRNlGS/g2fM4OHufalHaTVG8= -golang.org/x/mobile v0.0.0-20250606033058-a2a15c67f36f/go.mod h1:ESkJ836Z6LpG6mTVAhA48LpfW/8fNR0ifStlH2axyfg= -golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg= -golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= +golang.org/x/mobile v0.0.0-20250711185624-d5bb5ecc55c0 h1:Z6EFcPz8e1cx0ge5jWCwqafndPjdsDQf8fk4Kw3pJoI= +golang.org/x/mobile v0.0.0-20250711185624-d5bb5ecc55c0/go.mod h1:kqVs191xxTTCd39tk8zK1UD3jyCS1SPrMHTpJ9ujxZg= +golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= -golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= robpike.io/ivy v0.2.7 h1:XVYgWSm7THVm1bk1jfRBB9xhso459T22gbpotHbhk7M= robpike.io/ivy v0.2.7/go.mod h1:6B/DGaft5rvYiF7MgCTiZAAvH5W7vtu0eS2BW77updo= diff --git a/go.mod b/go.mod index 29ed63eab..100b3b24c 100644 --- a/go.mod +++ b/go.mod @@ -16,15 +16,15 @@ go 1.23.0 godebug gotypesalias=0 require ( - golang.org/x/exp/shiny v0.0.0-20250620022241-b7579e27df2b - golang.org/x/image v0.29.0 - golang.org/x/mod v0.26.0 + golang.org/x/exp/shiny v0.0.0-20250718183923-645b1fa84792 + golang.org/x/image v0.30.0 + golang.org/x/mod v0.27.0 golang.org/x/sync v0.16.0 - golang.org/x/tools v0.35.0 + golang.org/x/tools v0.36.0 golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated ) require ( - golang.org/x/sys v0.34.0 // indirect - golang.org/x/tools/go/expect v0.1.0-deprecated // indirect + golang.org/x/sys v0.35.0 // indirect + golang.org/x/tools/go/expect v0.1.1-deprecated // indirect ) diff --git a/go.sum b/go.sum index 38819f9fa..7d8d61f56 100644 --- a/go.sum +++ b/go.sum @@ -1,18 +1,18 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -golang.org/x/exp/shiny v0.0.0-20250620022241-b7579e27df2b h1:zELBzk+7ERc6m8BxhzU2VYjp03wlEvi+cIgYQR5H3CI= -golang.org/x/exp/shiny v0.0.0-20250620022241-b7579e27df2b/go.mod h1:ygj7T6vSGhhm/9yTpOQQNvuAUFziTH7RUiH74EoE2C8= -golang.org/x/image v0.29.0 h1:HcdsyR4Gsuys/Axh0rDEmlBmB68rW1U9BUdB3UVHsas= -golang.org/x/image v0.29.0/go.mod h1:RVJROnf3SLK8d26OW91j4FrIHGbsJ8QnbEocVTOWQDA= -golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg= -golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= +golang.org/x/exp/shiny v0.0.0-20250718183923-645b1fa84792 h1:YkeFUC3wFzzmWTi5lYbb5af46Tpk9DLWHXXwGjLF3R0= +golang.org/x/exp/shiny v0.0.0-20250718183923-645b1fa84792/go.mod h1:DUdAjGCS1V5oj0c1HZTX5UNuMxBjfxuU/NIoy/wuiRw= +golang.org/x/image v0.30.0 h1:jD5RhkmVAnjqaCUXfbGBrn3lpxbknfN9w2UhHHU+5B4= +golang.org/x/image v0.30.0/go.mod h1:SAEUTxCCMWSrJcCy/4HwavEsfZZJlYxeHLc6tTiAe/c= +golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= -golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= -golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= -golang.org/x/tools/go/expect v0.1.0-deprecated h1:jY2C5HGYR5lqex3gEniOQL0r7Dq5+VGVgY1nudX5lXY= -golang.org/x/tools/go/expect v0.1.0-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= +golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= From f12310a0cfd915e168e0cced7198eb3cd73aba76 Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Wed, 13 Aug 2025 14:21:47 +0000 Subject: [PATCH 50/51] all: upgrade go directive to at least 1.24.0 [generated] By now Go 1.25.0 has been released, and Go 1.23 is no longer supported per the Go Release Policy (see https://go.dev/doc/devel/release#policy). For golang/go#69095. [git-generate] (cd example/ivy && go get go@1.24.0 && go mod tidy && go fix ./... && go mod edit -toolchain=none) (cd . && go get go@1.24.0 && go mod tidy && go fix ./... && go mod edit -toolchain=none) Change-Id: I8ffd5cb5db1f3551a42787652d09b11a0f75c5c6 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/695418 Reviewed-by: Dmitri Shuralyov Auto-Submit: Gopher Robot LUCI-TryBot-Result: Go LUCI Reviewed-by: David Chase --- example/ivy/go.mod | 2 +- go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/ivy/go.mod b/example/ivy/go.mod index 8c82200da..73d1e436b 100644 --- a/example/ivy/go.mod +++ b/example/ivy/go.mod @@ -1,6 +1,6 @@ module golang.org/x/mobile/example/ivy -go 1.23.0 +go 1.24.0 require ( golang.org/x/mobile v0.0.0-20250711185624-d5bb5ecc55c0 diff --git a/go.mod b/go.mod index 100b3b24c..7f80d1e03 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module golang.org/x/mobile -go 1.23.0 +go 1.24.0 // The modern go/types type checker produces types.Alias // types for the explicit representation of type aliases. From 6912353760cf05c80a2c20d05cfba571cb0e66fa Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Wed, 10 Sep 2025 09:39:30 -0700 Subject: [PATCH 51/51] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I9aa173472d2e4fa473db62bfdbe180633ae06b1e Reviewed-on: https://go-review.googlesource.com/c/mobile/+/702040 Auto-Submit: Gopher Robot LUCI-TryBot-Result: Go LUCI Reviewed-by: David Chase Reviewed-by: Dmitri Shuralyov --- example/ivy/go.mod | 8 ++++---- example/ivy/go.sum | 16 ++++++++-------- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/example/ivy/go.mod b/example/ivy/go.mod index 73d1e436b..b2c46d604 100644 --- a/example/ivy/go.mod +++ b/example/ivy/go.mod @@ -3,12 +3,12 @@ module golang.org/x/mobile/example/ivy go 1.24.0 require ( - golang.org/x/mobile v0.0.0-20250711185624-d5bb5ecc55c0 + golang.org/x/mobile v0.0.0-20250813145510-f12310a0cfd9 robpike.io/ivy v0.2.7 ) require ( - golang.org/x/mod v0.27.0 // indirect - golang.org/x/sync v0.16.0 // indirect - golang.org/x/tools v0.36.0 // indirect + golang.org/x/mod v0.28.0 // indirect + golang.org/x/sync v0.17.0 // indirect + golang.org/x/tools v0.37.0 // indirect ) diff --git a/example/ivy/go.sum b/example/ivy/go.sum index d0dffbcda..8c60bdb85 100644 --- a/example/ivy/go.sum +++ b/example/ivy/go.sum @@ -1,12 +1,12 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -golang.org/x/mobile v0.0.0-20250711185624-d5bb5ecc55c0 h1:Z6EFcPz8e1cx0ge5jWCwqafndPjdsDQf8fk4Kw3pJoI= -golang.org/x/mobile v0.0.0-20250711185624-d5bb5ecc55c0/go.mod h1:kqVs191xxTTCd39tk8zK1UD3jyCS1SPrMHTpJ9ujxZg= -golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= -golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= -golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/mobile v0.0.0-20250813145510-f12310a0cfd9 h1:tf0OY/FXi1sPkoNVKP4w+GStqIfqbFUqDoDDm4B+iCg= +golang.org/x/mobile v0.0.0-20250813145510-f12310a0cfd9/go.mod h1:wNiuiJfmmgv45sw8EHpNeVWqpxLeEwQ8bkUIhuOYUh8= +golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= +golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= +golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= +golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= robpike.io/ivy v0.2.7 h1:XVYgWSm7THVm1bk1jfRBB9xhso459T22gbpotHbhk7M= robpike.io/ivy v0.2.7/go.mod h1:6B/DGaft5rvYiF7MgCTiZAAvH5W7vtu0eS2BW77updo= diff --git a/go.mod b/go.mod index 7f80d1e03..b7f2f9847 100644 --- a/go.mod +++ b/go.mod @@ -16,15 +16,15 @@ go 1.24.0 godebug gotypesalias=0 require ( - golang.org/x/exp/shiny v0.0.0-20250718183923-645b1fa84792 - golang.org/x/image v0.30.0 - golang.org/x/mod v0.27.0 - golang.org/x/sync v0.16.0 - golang.org/x/tools v0.36.0 + golang.org/x/exp/shiny v0.0.0-20250819193227-8b4c13bb791b + golang.org/x/image v0.31.0 + golang.org/x/mod v0.28.0 + golang.org/x/sync v0.17.0 + golang.org/x/tools v0.37.0 golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated ) require ( - golang.org/x/sys v0.35.0 // indirect + golang.org/x/sys v0.36.0 // indirect golang.org/x/tools/go/expect v0.1.1-deprecated // indirect ) diff --git a/go.sum b/go.sum index 7d8d61f56..f8cbd894c 100644 --- a/go.sum +++ b/go.sum @@ -1,17 +1,17 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -golang.org/x/exp/shiny v0.0.0-20250718183923-645b1fa84792 h1:YkeFUC3wFzzmWTi5lYbb5af46Tpk9DLWHXXwGjLF3R0= -golang.org/x/exp/shiny v0.0.0-20250718183923-645b1fa84792/go.mod h1:DUdAjGCS1V5oj0c1HZTX5UNuMxBjfxuU/NIoy/wuiRw= -golang.org/x/image v0.30.0 h1:jD5RhkmVAnjqaCUXfbGBrn3lpxbknfN9w2UhHHU+5B4= -golang.org/x/image v0.30.0/go.mod h1:SAEUTxCCMWSrJcCy/4HwavEsfZZJlYxeHLc6tTiAe/c= -golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= -golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= -golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= -golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/exp/shiny v0.0.0-20250819193227-8b4c13bb791b h1:OeyDhfAaNf4u4sBKDtc4k1iKGYngpGDa1L/1Ch049HA= +golang.org/x/exp/shiny v0.0.0-20250819193227-8b4c13bb791b/go.mod h1:QnFR+evpZFrYgSiu+d/Rn6g/6bNqLQTp+rzKaVpFoeI= +golang.org/x/image v0.31.0 h1:mLChjE2MV6g1S7oqbXC0/UcKijjm5fnJLUYKIYrLESA= +golang.org/x/image v0.31.0/go.mod h1:R9ec5Lcp96v9FTF+ajwaH3uGxPH4fKfHHAVbUILxghA= +golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= +golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= +golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= +golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= +golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM=