diff options
| author | YDBot <[email protected]> | 2025-10-21 00:52:27 +0000 |
|---|---|---|
| committer | YDBot <[email protected]> | 2025-10-21 00:52:27 +0000 |
| commit | a703d86902fd02bd8e373d959b2498c034657449 (patch) | |
| tree | 1828c35d2d0872dce812b67b3e295df5fb7236a4 /contrib | |
| parent | 51b66527943329176e027929f58092c77e94c2f8 (diff) | |
| parent | 1138a2be17ffd323e177f9ceef97dd46879e6608 (diff) | |
Sync branches 251021-0051
Diffstat (limited to 'contrib')
139 files changed, 2924 insertions, 1145 deletions
diff --git a/contrib/go/_std_1.24/src/crypto/elliptic/ya.make b/contrib/go/_std_1.24/src/crypto/elliptic/ya.make index 4fbba2fb5a8..2b77a6b8537 100644 --- a/contrib/go/_std_1.24/src/crypto/elliptic/ya.make +++ b/contrib/go/_std_1.24/src/crypto/elliptic/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( elliptic.go nistec.go diff --git a/contrib/go/_std_1.24/src/crypto/internal/boring/sig/ya.make b/contrib/go/_std_1.24/src/crypto/internal/boring/sig/ya.make index c55bbc32425..5d4a227454a 100644 --- a/contrib/go/_std_1.24/src/crypto/internal/boring/sig/ya.make +++ b/contrib/go/_std_1.24/src/crypto/internal/boring/sig/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( sig.go sig_other.s diff --git a/contrib/go/_std_1.24/src/crypto/internal/boring/syso/ya.make b/contrib/go/_std_1.24/src/crypto/internal/boring/syso/ya.make index f6fabdbab40..4167a86a1f6 100644 --- a/contrib/go/_std_1.24/src/crypto/internal/boring/syso/ya.make +++ b/contrib/go/_std_1.24/src/crypto/internal/boring/syso/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( goboringcrypto_linux_arm64.syso ) diff --git a/contrib/go/_std_1.24/src/crypto/internal/fips140/aes/gcm/ya.make b/contrib/go/_std_1.24/src/crypto/internal/fips140/aes/gcm/ya.make index 7c83fa73e7d..15d5014c1dc 100644 --- a/contrib/go/_std_1.24/src/crypto/internal/fips140/aes/gcm/ya.make +++ b/contrib/go/_std_1.24/src/crypto/internal/fips140/aes/gcm/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( cast.go cmac.go diff --git a/contrib/go/_std_1.24/src/crypto/internal/fips140/aes/ya.make b/contrib/go/_std_1.24/src/crypto/internal/fips140/aes/ya.make index 482425afe48..746e1c9562a 100644 --- a/contrib/go/_std_1.24/src/crypto/internal/fips140/aes/ya.make +++ b/contrib/go/_std_1.24/src/crypto/internal/fips140/aes/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( aes.go aes_arm64.s diff --git a/contrib/go/_std_1.24/src/crypto/internal/fips140/bigmod/ya.make b/contrib/go/_std_1.24/src/crypto/internal/fips140/bigmod/ya.make index c0910cd6525..14dd1c0232d 100644 --- a/contrib/go/_std_1.24/src/crypto/internal/fips140/bigmod/ya.make +++ b/contrib/go/_std_1.24/src/crypto/internal/fips140/bigmod/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( nat.go nat_arm64.s diff --git a/contrib/go/_std_1.24/src/crypto/internal/fips140/check/checktest/ya.make b/contrib/go/_std_1.24/src/crypto/internal/fips140/check/checktest/ya.make index ce123e663c5..0fab7e34942 100644 --- a/contrib/go/_std_1.24/src/crypto/internal/fips140/check/checktest/ya.make +++ b/contrib/go/_std_1.24/src/crypto/internal/fips140/check/checktest/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( asm.s asm_arm64.s diff --git a/contrib/go/_std_1.24/src/crypto/internal/fips140/edwards25519/field/ya.make b/contrib/go/_std_1.24/src/crypto/internal/fips140/edwards25519/field/ya.make index 06329270e9e..184ae337996 100644 --- a/contrib/go/_std_1.24/src/crypto/internal/fips140/edwards25519/field/ya.make +++ b/contrib/go/_std_1.24/src/crypto/internal/fips140/edwards25519/field/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( fe.go fe_amd64_noasm.go diff --git a/contrib/go/_std_1.24/src/crypto/internal/fips140/nistec/ya.make b/contrib/go/_std_1.24/src/crypto/internal/fips140/nistec/ya.make index bbc88ac5cfc..a69012d04e1 100644 --- a/contrib/go/_std_1.24/src/crypto/internal/fips140/nistec/ya.make +++ b/contrib/go/_std_1.24/src/crypto/internal/fips140/nistec/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( nistec.go p224.go diff --git a/contrib/go/_std_1.24/src/crypto/internal/fips140/sha256/ya.make b/contrib/go/_std_1.24/src/crypto/internal/fips140/sha256/ya.make index 03860b186b5..6740bbdd507 100644 --- a/contrib/go/_std_1.24/src/crypto/internal/fips140/sha256/ya.make +++ b/contrib/go/_std_1.24/src/crypto/internal/fips140/sha256/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( cast.go sha256.go diff --git a/contrib/go/_std_1.24/src/crypto/internal/fips140/sha3/ya.make b/contrib/go/_std_1.24/src/crypto/internal/fips140/sha3/ya.make index 0a48bcad8b8..fb033462189 100644 --- a/contrib/go/_std_1.24/src/crypto/internal/fips140/sha3/ya.make +++ b/contrib/go/_std_1.24/src/crypto/internal/fips140/sha3/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( cast.go hashes.go diff --git a/contrib/go/_std_1.24/src/crypto/internal/fips140/sha512/ya.make b/contrib/go/_std_1.24/src/crypto/internal/fips140/sha512/ya.make index 5355b14acff..7df1784894c 100644 --- a/contrib/go/_std_1.24/src/crypto/internal/fips140/sha512/ya.make +++ b/contrib/go/_std_1.24/src/crypto/internal/fips140/sha512/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( cast.go sha512.go diff --git a/contrib/go/_std_1.24/src/crypto/internal/fips140/subtle/ya.make b/contrib/go/_std_1.24/src/crypto/internal/fips140/subtle/ya.make index 16515fa0bbf..43f6e1a2d31 100644 --- a/contrib/go/_std_1.24/src/crypto/internal/fips140/subtle/ya.make +++ b/contrib/go/_std_1.24/src/crypto/internal/fips140/subtle/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( constant_time.go xor.go diff --git a/contrib/go/_std_1.24/src/crypto/internal/sysrand/internal/seccomp/ya.make b/contrib/go/_std_1.24/src/crypto/internal/sysrand/internal/seccomp/ya.make index 04fcdc0eef4..d9d2489e4fe 100644 --- a/contrib/go/_std_1.24/src/crypto/internal/sysrand/internal/seccomp/ya.make +++ b/contrib/go/_std_1.24/src/crypto/internal/sysrand/internal/seccomp/ya.make @@ -4,11 +4,11 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( seccomp_unsupported.go ) -ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED) +ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED) SRCS( ) diff --git a/contrib/go/_std_1.24/src/crypto/internal/sysrand/ya.make b/contrib/go/_std_1.24/src/crypto/internal/sysrand/ya.make index 1e2e1055079..9625f148441 100644 --- a/contrib/go/_std_1.24/src/crypto/internal/sysrand/ya.make +++ b/contrib/go/_std_1.24/src/crypto/internal/sysrand/ya.make @@ -9,7 +9,7 @@ IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM6 rand.go rand_arc4random.go ) -ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( rand.go rand_getrandom.go diff --git a/contrib/go/_std_1.24/src/crypto/md5/ya.make b/contrib/go/_std_1.24/src/crypto/md5/ya.make index b6f3ee1e880..17ca4bc5070 100644 --- a/contrib/go/_std_1.24/src/crypto/md5/ya.make +++ b/contrib/go/_std_1.24/src/crypto/md5/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( md5.go md5block.go diff --git a/contrib/go/_std_1.24/src/crypto/sha1/ya.make b/contrib/go/_std_1.24/src/crypto/sha1/ya.make index 3bd2eea6dcb..3368e168447 100644 --- a/contrib/go/_std_1.24/src/crypto/sha1/ya.make +++ b/contrib/go/_std_1.24/src/crypto/sha1/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( sha1.go sha1block.go diff --git a/contrib/go/_std_1.24/src/crypto/x509/ya.make b/contrib/go/_std_1.24/src/crypto/x509/ya.make index 06ccc8c4f03..62670f9ec9d 100644 --- a/contrib/go/_std_1.24/src/crypto/x509/ya.make +++ b/contrib/go/_std_1.24/src/crypto/x509/ya.make @@ -18,7 +18,7 @@ IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM6 verify.go x509.go ) -ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( cert_pool.go oid.go diff --git a/contrib/go/_std_1.24/src/hash/crc32/ya.make b/contrib/go/_std_1.24/src/hash/crc32/ya.make index 3c8beba4656..d1f03f63625 100644 --- a/contrib/go/_std_1.24/src/hash/crc32/ya.make +++ b/contrib/go/_std_1.24/src/hash/crc32/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( crc32.go crc32_arm64.go diff --git a/contrib/go/_std_1.24/src/internal/abi/ya.make b/contrib/go/_std_1.24/src/internal/abi/ya.make index 6600d2f3d50..441d3343674 100644 --- a/contrib/go/_std_1.24/src/internal/abi/ya.make +++ b/contrib/go/_std_1.24/src/internal/abi/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( abi.go abi_arm64.go diff --git a/contrib/go/_std_1.24/src/internal/bytealg/ya.make b/contrib/go/_std_1.24/src/internal/bytealg/ya.make index 6039ffbfaac..11b59375e95 100644 --- a/contrib/go/_std_1.24/src/internal/bytealg/ya.make +++ b/contrib/go/_std_1.24/src/internal/bytealg/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( bytealg.go compare_arm64.s diff --git a/contrib/go/_std_1.24/src/internal/chacha8rand/ya.make b/contrib/go/_std_1.24/src/internal/chacha8rand/ya.make index 19ca5c013d9..bee485b8bd4 100644 --- a/contrib/go/_std_1.24/src/internal/chacha8rand/ya.make +++ b/contrib/go/_std_1.24/src/internal/chacha8rand/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( chacha8.go chacha8_arm64.s diff --git a/contrib/go/_std_1.24/src/internal/cpu/ya.make b/contrib/go/_std_1.24/src/internal/cpu/ya.make index ab61887d359..f990f26f648 100644 --- a/contrib/go/_std_1.24/src/internal/cpu/ya.make +++ b/contrib/go/_std_1.24/src/internal/cpu/ya.make @@ -37,5 +37,15 @@ ELSEIF (OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM cpu_arm.go cpu_no_name.go ) +ELSEIF (OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) + SRCS( + cpu.go + cpu.s + cpu_arm64.go + cpu_arm64.s + cpu_arm64_android.go + cpu_arm64_hwcap.go + cpu_no_name.go + ) ENDIF() END() diff --git a/contrib/go/_std_1.24/src/internal/filepathlite/ya.make b/contrib/go/_std_1.24/src/internal/filepathlite/ya.make index e99ddb8dcd1..7cc8b1e49e9 100644 --- a/contrib/go/_std_1.24/src/internal/filepathlite/ya.make +++ b/contrib/go/_std_1.24/src/internal/filepathlite/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( path.go path_nonwindows.go diff --git a/contrib/go/_std_1.24/src/internal/goarch/ya.make b/contrib/go/_std_1.24/src/internal/goarch/ya.make index 28b660ead0d..41e8618f549 100644 --- a/contrib/go/_std_1.24/src/internal/goarch/ya.make +++ b/contrib/go/_std_1.24/src/internal/goarch/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( goarch.go goarch_arm64.go diff --git a/contrib/go/_std_1.24/src/internal/goos/ya.make b/contrib/go/_std_1.24/src/internal/goos/ya.make index 849a01b80d6..8d828306869 100644 --- a/contrib/go/_std_1.24/src/internal/goos/ya.make +++ b/contrib/go/_std_1.24/src/internal/goos/ya.make @@ -22,5 +22,11 @@ ELSEIF (OS_WINDOWS AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_WINDOWS AND AR nonunix.go zgoos_windows.go ) +ELSEIF (OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) + SRCS( + goos.go + unix.go + zgoos_android.go + ) ENDIF() END() diff --git a/contrib/go/_std_1.24/src/internal/poll/ya.make b/contrib/go/_std_1.24/src/internal/poll/ya.make index 28b83b53895..7fcf9055164 100644 --- a/contrib/go/_std_1.24/src/internal/poll/ya.make +++ b/contrib/go/_std_1.24/src/internal/poll/ya.make @@ -26,7 +26,7 @@ IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM6 sys_cloexec.go writev.go ) -ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( copy_file_range_linux.go copy_file_range_unix.go diff --git a/contrib/go/_std_1.24/src/internal/race/ya.make b/contrib/go/_std_1.24/src/internal/race/ya.make index cc8850bd5f0..585e5f1ad2e 100644 --- a/contrib/go/_std_1.24/src/internal/race/ya.make +++ b/contrib/go/_std_1.24/src/internal/race/ya.make @@ -4,12 +4,12 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED) SRCS( doc.go race.go ) -ELSEIF (OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( doc.go norace.go diff --git a/contrib/go/_std_1.24/src/internal/runtime/atomic/ya.make b/contrib/go/_std_1.24/src/internal/runtime/atomic/ya.make index a526134c24e..2a626bc18e8 100644 --- a/contrib/go/_std_1.24/src/internal/runtime/atomic/ya.make +++ b/contrib/go/_std_1.24/src/internal/runtime/atomic/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( atomic_arm64.go atomic_arm64.s diff --git a/contrib/go/_std_1.24/src/internal/runtime/sys/ya.make b/contrib/go/_std_1.24/src/internal/runtime/sys/ya.make index aff4acacd13..11b9f41be81 100644 --- a/contrib/go/_std_1.24/src/internal/runtime/sys/ya.make +++ b/contrib/go/_std_1.24/src/internal/runtime/sys/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED) SRCS( consts.go consts_race.go @@ -16,7 +16,7 @@ IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM6 sys.go zversion.go ) -ELSEIF (OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( consts.go consts_norace.go diff --git a/contrib/go/_std_1.24/src/internal/runtime/syscall/ya.make b/contrib/go/_std_1.24/src/internal/runtime/syscall/ya.make index 0ec36ab748e..d0f5ed1ec46 100644 --- a/contrib/go/_std_1.24/src/internal/runtime/syscall/ya.make +++ b/contrib/go/_std_1.24/src/internal/runtime/syscall/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( asm_linux_arm64.s defs_linux.go diff --git a/contrib/go/_std_1.24/src/internal/syscall/execenv/ya.make b/contrib/go/_std_1.24/src/internal/syscall/execenv/ya.make index c3c24fa46cc..9e92edcb236 100644 --- a/contrib/go/_std_1.24/src/internal/syscall/execenv/ya.make +++ b/contrib/go/_std_1.24/src/internal/syscall/execenv/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( execenv_default.go ) diff --git a/contrib/go/_std_1.24/src/internal/syscall/unix/ya.make b/contrib/go/_std_1.24/src/internal/syscall/unix/ya.make index 05f7e5884cc..d1e8aec12ba 100644 --- a/contrib/go/_std_1.24/src/internal/syscall/unix/ya.make +++ b/contrib/go/_std_1.24/src/internal/syscall/unix/ya.make @@ -25,7 +25,7 @@ IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM6 tcsetpgrp_bsd.go user_darwin.go ) -ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( at.go at_fstatat.go diff --git a/contrib/go/_std_1.24/src/log/syslog/ya.make b/contrib/go/_std_1.24/src/log/syslog/ya.make index fe9cad8cbc0..0a373e6b9d4 100644 --- a/contrib/go/_std_1.24/src/log/syslog/ya.make +++ b/contrib/go/_std_1.24/src/log/syslog/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( doc.go syslog.go diff --git a/contrib/go/_std_1.24/src/math/big/ya.make b/contrib/go/_std_1.24/src/math/big/ya.make index 81a1c591616..0ae52b04d42 100644 --- a/contrib/go/_std_1.24/src/math/big/ya.make +++ b/contrib/go/_std_1.24/src/math/big/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( accuracy_string.go arith.go diff --git a/contrib/go/_std_1.24/src/math/ya.make b/contrib/go/_std_1.24/src/math/ya.make index a1854d3f236..3fba124857c 100644 --- a/contrib/go/_std_1.24/src/math/ya.make +++ b/contrib/go/_std_1.24/src/math/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( abs.go acosh.go diff --git a/contrib/go/_std_1.24/src/mime/ya.make b/contrib/go/_std_1.24/src/mime/ya.make index 0bb61d749a2..2dda9b91a43 100644 --- a/contrib/go/_std_1.24/src/mime/ya.make +++ b/contrib/go/_std_1.24/src/mime/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( encodedword.go grammar.go diff --git a/contrib/go/_std_1.24/src/net/internal/socktest/ya.make b/contrib/go/_std_1.24/src/net/internal/socktest/ya.make index fbc7000ea6c..58884f8e6d2 100644 --- a/contrib/go/_std_1.24/src/net/internal/socktest/ya.make +++ b/contrib/go/_std_1.24/src/net/internal/socktest/ya.make @@ -11,7 +11,7 @@ IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM6 switch_unix.go sys_unix.go ) -ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( switch.go switch_posix.go diff --git a/contrib/go/_std_1.24/src/net/ya.make b/contrib/go/_std_1.24/src/net/ya.make index ab17976c4ef..00a6fc6b736 100644 --- a/contrib/go/_std_1.24/src/net/ya.make +++ b/contrib/go/_std_1.24/src/net/ya.make @@ -141,7 +141,7 @@ IF (CGO_ENABLED) cgo_unix_cgo_res.go ) ENDIF() -ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( addrselect.go cgo_stub.go @@ -260,5 +260,77 @@ ELSEIF (OS_WINDOWS AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_WINDOWS AND AR unixsock_posix.go unixsock_readmsg_other.go ) +ELSEIF (OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED) + SRCS( + addrselect.go + cgo_unix.go + conf.go + dial.go + dnsclient.go + dnsclient_unix.go + dnsconfig.go + dnsconfig_unix.go + error_posix.go + error_unix.go + fd_posix.go + fd_unix.go + file.go + file_unix.go + hook.go + hook_unix.go + hosts.go + interface.go + interface_linux.go + ip.go + iprawsock.go + iprawsock_posix.go + ipsock.go + ipsock_posix.go + lookup.go + lookup_unix.go + mac.go + mptcpsock_linux.go + net.go + netcgo_off.go + netgo_off.go + nss.go + parse.go + pipe.go + port.go + port_unix.go + rawconn.go + rlimit_unix.go + sendfile_linux.go + sock_cloexec.go + sock_linux.go + sock_posix.go + sockaddr_posix.go + sockopt_linux.go + sockopt_posix.go + sockoptip_linux.go + sockoptip_posix.go + splice_linux.go + tcpsock.go + tcpsock_posix.go + tcpsock_unix.go + tcpsockopt_posix.go + tcpsockopt_unix.go + udpsock.go + udpsock_posix.go + unixsock.go + unixsock_posix.go + unixsock_readmsg_cmsg_cloexec.go + writev_unix.go + ) + +IF (CGO_ENABLED) + CGO_SRCS( + cgo_android.go + cgo_resold.go + cgo_socknew.go + cgo_unix_cgo.go + cgo_unix_cgo_res.go + ) +ENDIF() ENDIF() END() diff --git a/contrib/go/_std_1.24/src/os/exec/internal/fdtest/ya.make b/contrib/go/_std_1.24/src/os/exec/internal/fdtest/ya.make index d4a29d3895c..b9f1fb2cccc 100644 --- a/contrib/go/_std_1.24/src/os/exec/internal/fdtest/ya.make +++ b/contrib/go/_std_1.24/src/os/exec/internal/fdtest/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( exists_unix.go ) diff --git a/contrib/go/_std_1.24/src/os/exec/ya.make b/contrib/go/_std_1.24/src/os/exec/ya.make index 4e3e85fef8e..56b7132d586 100644 --- a/contrib/go/_std_1.24/src/os/exec/ya.make +++ b/contrib/go/_std_1.24/src/os/exec/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( exec.go exec_unix.go diff --git a/contrib/go/_std_1.24/src/os/user/ya.make b/contrib/go/_std_1.24/src/os/user/ya.make index 7cd0aa6cc32..48e082879a7 100644 --- a/contrib/go/_std_1.24/src/os/user/ya.make +++ b/contrib/go/_std_1.24/src/os/user/ya.make @@ -41,5 +41,13 @@ ELSEIF (OS_WINDOWS AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_WINDOWS AND AR lookup_windows.go user.go ) +ELSEIF (OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) + SRCS( + listgroups_stub.go + lookup.go + lookup_android.go + lookup_stubs.go + user.go + ) ENDIF() END() diff --git a/contrib/go/_std_1.24/src/os/ya.make b/contrib/go/_std_1.24/src/os/ya.make index cf58d18bcbf..7fc757caa3c 100644 --- a/contrib/go/_std_1.24/src/os/ya.make +++ b/contrib/go/_std_1.24/src/os/ya.make @@ -48,7 +48,7 @@ IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM6 zero_copy_posix.go zero_copy_stub.go ) -ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( dir.go dir_unix.go diff --git a/contrib/go/_std_1.24/src/path/filepath/ya.make b/contrib/go/_std_1.24/src/path/filepath/ya.make index c580f5ce868..2af5689b48a 100644 --- a/contrib/go/_std_1.24/src/path/filepath/ya.make +++ b/contrib/go/_std_1.24/src/path/filepath/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( match.go path.go diff --git a/contrib/go/_std_1.24/src/reflect/ya.make b/contrib/go/_std_1.24/src/reflect/ya.make index 687c552c6cb..7314857a3e0 100644 --- a/contrib/go/_std_1.24/src/reflect/ya.make +++ b/contrib/go/_std_1.24/src/reflect/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( abi.go asm_arm64.s diff --git a/contrib/go/_std_1.24/src/runtime/cgo/ya.make b/contrib/go/_std_1.24/src/runtime/cgo/ya.make index c672079ab7a..f66f45999e8 100644 --- a/contrib/go/_std_1.24/src/runtime/cgo/ya.make +++ b/contrib/go/_std_1.24/src/runtime/cgo/ya.make @@ -121,6 +121,49 @@ IF (CGO_ENABLED) ENDIF() ENDIF() + IF (OS_ANDROID) + CGO_LDFLAGS(-ldl -llog) + + SRCS( + callbacks_traceback.go + CGO_EXPORT gcc_android.c + CGO_EXPORT gcc_libinit.c + CGO_EXPORT gcc_setenv.c + CGO_EXPORT gcc_stack_unix.c + CGO_EXPORT gcc_traceback.c + linux.go + CGO_EXPORT linux_syscall.c + setenv.go + ) + + IF (ARCH_ARM64 OR ARCH_X86_64) + SRCS( + CGO_EXPORT gcc_sigaction.c + CGO_EXPORT gcc_mmap.c + mmap.go + sigaction.go + ) + ENDIF() + + IF (ARCH_ARM64) + SRCS( + CGO_EXPORT gcc_linux_arm64.c + ) + ENDIF() + + IF (ARCH_X86_64) + SRCS( + CGO_EXPORT gcc_linux_amd64.c + ) + ENDIF() + + IF (ARCH_ARM6 OR ARCH_ARM7) + SRCS( + CGO_EXPORT gcc_linux.c + ) + ENDIF() + ENDIF() + IF (OS_WINDOWS) SRCS( CGO_EXPORT gcc_libinit_windows.c diff --git a/contrib/go/_std_1.24/src/runtime/pprof/ya.make b/contrib/go/_std_1.24/src/runtime/pprof/ya.make index 5a2574591fa..b57cdf64e64 100644 --- a/contrib/go/_std_1.24/src/runtime/pprof/ya.make +++ b/contrib/go/_std_1.24/src/runtime/pprof/ya.make @@ -36,7 +36,7 @@ ELSEIF (OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH runtime.go vminfo_darwin.go ) -ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( elf.go label.go diff --git a/contrib/go/_std_1.24/src/runtime/race/internal/amd64v1/ya.make b/contrib/go/_std_1.24/src/runtime/race/internal/amd64v1/ya.make index 0587cd45977..00608a0d200 100644 --- a/contrib/go/_std_1.24/src/runtime/race/internal/amd64v1/ya.make +++ b/contrib/go/_std_1.24/src/runtime/race/internal/amd64v1/ya.make @@ -13,7 +13,7 @@ ELSEIF (OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH doc.go race_darwin.syso ) -ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( race_linux.syso ) diff --git a/contrib/go/_std_1.24/src/runtime/race/internal/amd64v3/ya.make b/contrib/go/_std_1.24/src/runtime/race/internal/amd64v3/ya.make index a5d7f9320ba..368fa6b3681 100644 --- a/contrib/go/_std_1.24/src/runtime/race/internal/amd64v3/ya.make +++ b/contrib/go/_std_1.24/src/runtime/race/internal/amd64v3/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( race_linux.syso ) diff --git a/contrib/go/_std_1.24/src/runtime/race/ya.make b/contrib/go/_std_1.24/src/runtime/race/ya.make index c36c08c0f36..9aada8bca62 100644 --- a/contrib/go/_std_1.24/src/runtime/race/ya.make +++ b/contrib/go/_std_1.24/src/runtime/race/ya.make @@ -26,7 +26,7 @@ ELSEIF (OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND doc.go race_v1_amd64.go ) -ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED) +ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED) SRCS( doc.go race_linux_arm64.syso @@ -37,7 +37,7 @@ IF (CGO_ENABLED) race.go ) ENDIF() -ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( doc.go race_linux_arm64.syso diff --git a/contrib/go/_std_1.24/src/runtime/ya.make b/contrib/go/_std_1.24/src/runtime/ya.make index f755bce2f81..19c457babab 100644 --- a/contrib/go/_std_1.24/src/runtime/ya.make +++ b/contrib/go/_std_1.24/src/runtime/ya.make @@ -2180,5 +2180,378 @@ ELSEIF (OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_WINDOWS AN zcallback_windows.go zcallback_windows.s ) +ELSEIF (OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED) + SRCS( + alg.go + arena.go + asm.s + asm_arm64.s + atomic_arm64.s + atomic_pointer.go + badlinkname.go + badlinkname_linux.go + cgo.go + cgo_mmap.go + cgo_sigaction.go + cgocall.go + cgocallback.go + cgocheck.go + chan.go + checkptr.go + compiler.go + complex.go + coro.go + covercounter.go + covermeta.go + cpuflags.go + cpuflags_arm64.go + cpuprof.go + create_file_unix.go + debug.go + debugcall.go + debuglog.go + debuglog_off.go + defs_linux_arm64.go + duff_arm64.s + env_posix.go + error.go + extern.go + fastlog2.go + fastlog2table.go + fds_unix.go + float.go + hash64.go + heapdump.go + histogram.go + iface.go + ints.s + lfstack.go + linkname.go + linkname_swiss.go + linkname_unix.go + lock_futex.go + lock_spinbit.go + lockrank.go + lockrank_off.go + malloc.go + map_fast32_swiss.go + map_fast64_swiss.go + map_faststr_swiss.go + map_swiss.go + mbarrier.go + mbitmap.go + mcache.go + mcentral.go + mcheckmark.go + mcleanup.go + mem.go + mem_linux.go + mem_nonsbrk.go + memclr_arm64.s + memmove_arm64.s + metrics.go + mfinal.go + mfixalloc.go + mgc.go + mgclimit.go + mgcmark.go + mgcpacer.go + mgcscavenge.go + mgcstack.go + mgcsweep.go + mgcwork.go + mheap.go + minmax.go + mpagealloc.go + mpagealloc_64bit.go + mpagecache.go + mpallocbits.go + mprof.go + mranges.go + msize.go + mspanset.go + mstats.go + mwbbuf.go + nbpipe_pipe2.go + netpoll.go + netpoll_epoll.go + nonwindows_stub.go + note_other.go + os_android.go + os_linux.go + os_linux_arm64.go + os_linux_generic.go + os_nonopenbsd.go + os_unix.go + panic.go + pinner.go + plugin.go + preempt.go + preempt_arm64.s + preempt_nonwindows.go + print.go + proc.go + profbuf.go + proflabel.go + race.go + race_arm64.s + rand.go + rdebug.go + retry.go + rt0_android_arm64.s + rt0_linux_arm64.s + runtime.go + runtime1.go + runtime2.go + runtime_boring.go + rwmutex.go + security_linux.go + security_unix.go + select.go + sema.go + signal_arm64.go + signal_linux_arm64.go + signal_unix.go + sigqueue.go + sigqueue_note.go + sigtab_linux_generic.go + sizeclasses.go + slice.go + softfloat64.go + stack.go + stkframe.go + string.go + stubs.go + stubs2.go + stubs3.go + stubs_arm64.go + stubs_linux.go + stubs_nonwasm.go + symtab.go + symtabinl.go + synctest.go + sys_arm64.go + sys_linux_arm64.s + sys_nonppc64x.go + tagptr.go + tagptr_64bit.go + test_stubs.go + time.go + time_nofake.go + timestub.go + timestub2.go + tls_arm64.s + tls_stub.go + trace.go + traceallocfree.go + traceback.go + tracebuf.go + tracecpu.go + traceevent.go + traceexp.go + tracemap.go + traceregion.go + traceruntime.go + tracestack.go + tracestatus.go + tracestring.go + tracetime.go + tracetype.go + type.go + typekind.go + unsafe.go + utf8.go + vdso_elf64.go + vdso_linux.go + vdso_linux_arm64.go + vgetrandom_linux.go + write_err_android.go + ) +ELSEIF (OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) + SRCS( + alg.go + arena.go + asm.s + asm_arm64.s + atomic_arm64.s + atomic_pointer.go + badlinkname.go + badlinkname_linux.go + cgo.go + cgo_mmap.go + cgo_sigaction.go + cgocall.go + cgocallback.go + cgocheck.go + chan.go + checkptr.go + compiler.go + complex.go + coro.go + covercounter.go + covermeta.go + cpuflags.go + cpuflags_arm64.go + cpuprof.go + create_file_unix.go + debug.go + debugcall.go + debuglog.go + debuglog_off.go + defs_linux_arm64.go + duff_arm64.s + env_posix.go + error.go + extern.go + fastlog2.go + fastlog2table.go + fds_unix.go + float.go + hash64.go + heapdump.go + histogram.go + iface.go + ints.s + lfstack.go + linkname.go + linkname_swiss.go + linkname_unix.go + lock_futex.go + lock_spinbit.go + lockrank.go + lockrank_off.go + malloc.go + map_fast32_swiss.go + map_fast64_swiss.go + map_faststr_swiss.go + map_swiss.go + mbarrier.go + mbitmap.go + mcache.go + mcentral.go + mcheckmark.go + mcleanup.go + mem.go + mem_linux.go + mem_nonsbrk.go + memclr_arm64.s + memmove_arm64.s + metrics.go + mfinal.go + mfixalloc.go + mgc.go + mgclimit.go + mgcmark.go + mgcpacer.go + mgcscavenge.go + mgcstack.go + mgcsweep.go + mgcwork.go + mheap.go + minmax.go + mpagealloc.go + mpagealloc_64bit.go + mpagecache.go + mpallocbits.go + mprof.go + mranges.go + msize.go + mspanset.go + mstats.go + mwbbuf.go + nbpipe_pipe2.go + netpoll.go + netpoll_epoll.go + nonwindows_stub.go + note_other.go + os_android.go + os_linux.go + os_linux_arm64.go + os_linux_generic.go + os_nonopenbsd.go + os_unix.go + panic.go + pinner.go + plugin.go + preempt.go + preempt_arm64.s + preempt_nonwindows.go + print.go + proc.go + profbuf.go + proflabel.go + race0.go + rand.go + rdebug.go + retry.go + rt0_android_arm64.s + rt0_linux_arm64.s + runtime.go + runtime1.go + runtime2.go + runtime_boring.go + rwmutex.go + security_linux.go + security_unix.go + select.go + sema.go + signal_arm64.go + signal_linux_arm64.go + signal_unix.go + sigqueue.go + sigqueue_note.go + sigtab_linux_generic.go + sizeclasses.go + slice.go + softfloat64.go + stack.go + stkframe.go + string.go + stubs.go + stubs2.go + stubs3.go + stubs_arm64.go + stubs_linux.go + stubs_nonwasm.go + symtab.go + symtabinl.go + synctest.go + sys_arm64.go + sys_linux_arm64.s + sys_nonppc64x.go + tagptr.go + tagptr_64bit.go + test_stubs.go + time.go + time_nofake.go + timestub.go + timestub2.go + tls_arm64.s + tls_stub.go + trace.go + traceallocfree.go + traceback.go + tracebuf.go + tracecpu.go + traceevent.go + traceexp.go + tracemap.go + traceregion.go + traceruntime.go + tracestack.go + tracestatus.go + tracestring.go + tracetime.go + tracetype.go + type.go + typekind.go + unsafe.go + utf8.go + vdso_elf64.go + vdso_linux.go + vdso_linux_arm64.go + vgetrandom_linux.go + write_err_android.go + ) ENDIF() END() diff --git a/contrib/go/_std_1.24/src/sync/atomic/ya.make b/contrib/go/_std_1.24/src/sync/atomic/ya.make index bb3cadc3a1b..9682cd98baf 100644 --- a/contrib/go/_std_1.24/src/sync/atomic/ya.make +++ b/contrib/go/_std_1.24/src/sync/atomic/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED) SRCS( doc.go doc_64.go @@ -12,7 +12,7 @@ IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM6 type.go value.go ) -ELSEIF (OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND CGO_ENABLED OR OS_WINDOWS AND ARCH_X86_64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( asm.s doc.go diff --git a/contrib/go/_std_1.24/src/syscall/ya.make b/contrib/go/_std_1.24/src/syscall/ya.make index f33de94c37e..6f1bc3f881c 100644 --- a/contrib/go/_std_1.24/src/syscall/ya.make +++ b/contrib/go/_std_1.24/src/syscall/ya.make @@ -74,7 +74,7 @@ ELSEIF (OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH zsysnum_darwin_amd64.go ztypes_darwin_amd64.go ) -ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( asm_linux_arm64.s badlinkname_unix.go diff --git a/contrib/go/_std_1.24/src/time/ya.make b/contrib/go/_std_1.24/src/time/ya.make index 2a4ef4c96ef..197515541ac 100644 --- a/contrib/go/_std_1.24/src/time/ya.make +++ b/contrib/go/_std_1.24/src/time/ya.make @@ -31,5 +31,17 @@ ELSEIF (OS_WINDOWS AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_WINDOWS AND AR zoneinfo_read.go zoneinfo_windows.go ) +ELSEIF (OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) + SRCS( + format.go + format_rfc3339.go + sleep.go + sys_unix.go + tick.go + time.go + zoneinfo.go + zoneinfo_android.go + zoneinfo_read.go + ) ENDIF() END() diff --git a/contrib/go/_std_1.24/src/vendor/golang.org/x/crypto/chacha20/ya.make b/contrib/go/_std_1.24/src/vendor/golang.org/x/crypto/chacha20/ya.make index f8f12c2013a..78468e6bba2 100644 --- a/contrib/go/_std_1.24/src/vendor/golang.org/x/crypto/chacha20/ya.make +++ b/contrib/go/_std_1.24/src/vendor/golang.org/x/crypto/chacha20/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( chacha_arm64.go chacha_arm64.s diff --git a/contrib/go/_std_1.24/src/vendor/golang.org/x/crypto/chacha20poly1305/ya.make b/contrib/go/_std_1.24/src/vendor/golang.org/x/crypto/chacha20poly1305/ya.make index 9099d547d71..baaf484710f 100644 --- a/contrib/go/_std_1.24/src/vendor/golang.org/x/crypto/chacha20poly1305/ya.make +++ b/contrib/go/_std_1.24/src/vendor/golang.org/x/crypto/chacha20poly1305/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( chacha20poly1305.go chacha20poly1305_generic.go diff --git a/contrib/go/_std_1.24/src/vendor/golang.org/x/crypto/internal/poly1305/ya.make b/contrib/go/_std_1.24/src/vendor/golang.org/x/crypto/internal/poly1305/ya.make index 9881dae419f..d71c52ed1fb 100644 --- a/contrib/go/_std_1.24/src/vendor/golang.org/x/crypto/internal/poly1305/ya.make +++ b/contrib/go/_std_1.24/src/vendor/golang.org/x/crypto/internal/poly1305/ya.make @@ -4,7 +4,7 @@ GO_LIBRARY() -IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED) +IF (OS_DARWIN AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM6 AND NOT RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_ARM7 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( mac_noasm.go poly1305.go diff --git a/contrib/go/_std_1.24/src/vendor/golang.org/x/sys/cpu/ya.make b/contrib/go/_std_1.24/src/vendor/golang.org/x/sys/cpu/ya.make index 21eda1a8a8f..b5cd8c4bf78 100644 --- a/contrib/go/_std_1.24/src/vendor/golang.org/x/sys/cpu/ya.make +++ b/contrib/go/_std_1.24/src/vendor/golang.org/x/sys/cpu/ya.make @@ -32,7 +32,7 @@ ELSEIF (OS_DARWIN AND ARCH_X86_64 AND RACE AND CGO_ENABLED OR OS_DARWIN AND ARCH runtime_auxv_go121.go syscall_darwin_x86_gc.go ) -ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED) +ELSEIF (OS_LINUX AND ARCH_AARCH64 AND RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND RACE AND NOT CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND CGO_ENABLED OR OS_LINUX AND ARCH_AARCH64 AND NOT RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND RACE AND NOT CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND CGO_ENABLED OR OS_ANDROID AND ARCH_ARM64 AND NOT RACE AND NOT CGO_ENABLED) SRCS( byteorder.go cpu.go diff --git a/contrib/libs/croaring/.yandex_meta/override.nix b/contrib/libs/croaring/.yandex_meta/override.nix index 525224c6fe1..0937e4a70cf 100644 --- a/contrib/libs/croaring/.yandex_meta/override.nix +++ b/contrib/libs/croaring/.yandex_meta/override.nix @@ -1,12 +1,12 @@ pkgs: attrs: with pkgs; with attrs; rec { pname = "croaring"; - version = "4.3.12"; + version = "4.4.1"; src = fetchFromGitHub { owner = "RoaringBitmap"; repo = "CRoaring"; rev = "v${version}"; - hash = "sha256-A2cWi/clh/mgKa192IqrT/qDL26jf8iN2d1if3ugIY0="; + hash = "sha256-IpDmqosQYISfDE0o28bJqe4omRs+MgyJyjQJaLnAEso="; }; patches = []; diff --git a/contrib/libs/croaring/README.md b/contrib/libs/croaring/README.md index 60723f48a55..4dad111d9ca 100644 --- a/contrib/libs/croaring/README.md +++ b/contrib/libs/croaring/README.md @@ -48,7 +48,7 @@ Bitsets, also called bitmaps, are commonly used as fast data structures. Unfortu Roaring bitmaps are compressed bitmaps which tend to outperform conventional compressed bitmaps such as WAH, EWAH or Concise. They are used by several major systems such as [Apache Lucene][lucene] and derivative systems such as [Solr][solr] and -[Elasticsearch][elasticsearch], [Metamarkets' Druid][druid], [LinkedIn Pinot][pinot], [Netflix Atlas][atlas], [Apache Spark][spark], [OpenSearchServer][opensearchserver], [Cloud Torrent][cloudtorrent], [Whoosh][whoosh], [InfluxDB](https://www.influxdata.com), [Pilosa][pilosa], [Bleve](http://www.blevesearch.com), [Microsoft Visual Studio Team Services (VSTS)][vsts], and eBay's [Apache Kylin][kylin]. The CRoaring library is used in several systems such as [Apache Doris](http://doris.incubator.apache.org), [ClickHouse](https://github.com/ClickHouse/ClickHouse), [Redpanda](https://github.com/redpanda-data/redpanda), [YDB](https://ydb.tech), and [StarRocks](https://github.com/StarRocks/starrocks). The YouTube SQL Engine, [Google Procella](https://research.google/pubs/pub48388/), uses Roaring bitmaps for indexing. +[Elasticsearch][elasticsearch], [Metamarkets' Druid][druid], [LinkedIn Pinot][pinot], [Netflix Atlas][atlas], [Apache Spark][spark], [OpenSearchServer][opensearchserver], [Cloud Torrent][cloudtorrent], [Whoosh][whoosh], [InfluxDB](https://www.influxdata.com), [Pilosa][pilosa], [Bleve](http://www.blevesearch.com), [Microsoft Visual Studio Team Services (VSTS)][vsts], and eBay's [Apache Kylin][kylin]. The CRoaring library is used in several systems such as [Apache Doris](http://doris.incubator.apache.org), [ClickHouse](https://github.com/ClickHouse/ClickHouse), [Redpanda](https://github.com/redpanda-data/redpanda), [YDB](https://ydb.tech), [Alibaba Tair](https://www.alibabacloud.com/help/en/redis/developer-reference/tairroaring-command), and [StarRocks](https://github.com/StarRocks/starrocks). The YouTube SQL Engine, [Google Procella](https://research.google/pubs/pub48388/), uses Roaring bitmaps for indexing. We published a peer-reviewed article on the design and evaluation of this library: @@ -206,7 +206,7 @@ CPMAddPackage( NAME roaring GITHUB_REPOSITORY "RoaringBitmap/CRoaring" GIT_TAG v2.0.4 - OPTIONS "BUILD_TESTING OFF" + OPTIONS "ENABLE_ROARING_TESTS OFF" ) target_link_libraries(hello roaring::roaring) diff --git a/contrib/libs/croaring/include/roaring/containers/containers.h b/contrib/libs/croaring/include/roaring/containers/containers.h index 30b0cde1aae..5f7c789036f 100644 --- a/contrib/libs/croaring/include/roaring/containers/containers.h +++ b/contrib/libs/croaring/include/roaring/containers/containers.h @@ -2477,6 +2477,40 @@ bool container_iterator_read_into_uint64(const container_t *c, uint8_t typecode, uint32_t count, uint32_t *consumed, uint16_t *value_out); +/** + * Skips the next `skip_count` entries in the container iterator. Returns true + * and sets `value_out` if a value is present after skipping. Returns false if + * the end of the container is reached during the skip operation. Sets + * consumed_count to the number of values actually skipped (which may be less + * than skip_count if the end of the container is reached). + * + * value_out must be initialized to the previous value yielded by the iterator. + * + * skip_count must be greater than zero. + */ +bool container_iterator_skip(const container_t *c, uint8_t typecode, + roaring_container_iterator_t *it, + uint32_t skip_count, uint32_t *consumed_count, + uint16_t *value_out); + +/** + * Skips the previous `skip_count` entries in the container iterator (moves + * backwards). Returns true and sets `value_out` if a value is present after + * skipping backwards. Returns false if the beginning of the container is + * reached during the skip operation. Sets consumed_count to the number of + * values actually skipped backwards (which may be less than skip_count if + * the beginning of the container is reached). + * + * value_out must be initialized to the current value yielded by the iterator. + * + * skip_count must be greater than zero. + */ +bool container_iterator_skip_backward(const container_t *c, uint8_t typecode, + roaring_container_iterator_t *it, + uint32_t skip_count, + uint32_t *consumed_count, + uint16_t *value_out); + #ifdef __cplusplus } } diff --git a/contrib/libs/croaring/include/roaring/roaring.h b/contrib/libs/croaring/include/roaring/roaring.h index a45b1dab76f..9823a408b19 100644 --- a/contrib/libs/croaring/include/roaring/roaring.h +++ b/contrib/libs/croaring/include/roaring/roaring.h @@ -74,6 +74,18 @@ roaring_bitmap_t *roaring_bitmap_from_range(uint64_t min, uint64_t max, */ roaring_bitmap_t *roaring_bitmap_of_ptr(size_t n_args, const uint32_t *vals); +/** + * Check if the bitmap contains any shared containers. + */ +bool roaring_contains_shared(const roaring_bitmap_t *r); + +/** + * Unshare all shared containers. + * Returns true if any unsharing was performed, false if there were no shared + * containers. + */ +bool roaring_unshare_all(roaring_bitmap_t *r); + /* * Whether you want to use copy-on-write. * Saves memory and avoids copies, but needs more care in a threaded context. @@ -82,6 +94,9 @@ roaring_bitmap_t *roaring_bitmap_of_ptr(size_t n_args, const uint32_t *vals); * Note: If you do turn this flag to 'true', enabling COW, then ensure that you * do so for all of your bitmaps, since interactions between bitmaps with and * without COW is unsafe. + * + * When setting this flag to false, if any containers are shared, they + * are unshared (cloned) immediately. */ inline bool roaring_bitmap_get_copy_on_write(const roaring_bitmap_t *r) { return r->high_low_container.flags & ROARING_FLAG_COW; @@ -90,6 +105,9 @@ inline void roaring_bitmap_set_copy_on_write(roaring_bitmap_t *r, bool cow) { if (cow) { r->high_low_container.flags |= ROARING_FLAG_COW; } else { + if (roaring_bitmap_get_copy_on_write(r)) { + roaring_unshare_all(r); + } r->high_low_container.flags &= ~ROARING_FLAG_COW; } } @@ -545,7 +563,11 @@ bool roaring_bitmap_to_bitset(const roaring_bitmap_t *r, bitset_t *bitset); * * ans = malloc(roaring_bitmap_get_cardinality(limit) * sizeof(uint32_t)); * - * Return false in case of failure (e.g., insufficient memory) + * This function always returns `true` + * + * For more control, see `roaring_uint32_iterator_skip` and + * `roaring_uint32_iterator_read`, which can be used to e.g. tell how many + * values were actually read. */ bool roaring_bitmap_range_uint32_array(const roaring_bitmap_t *r, size_t offset, size_t limit, uint32_t *ans); @@ -1172,7 +1194,7 @@ CROARING_DEPRECATED static inline void roaring_free_uint32_iterator( roaring_uint32_iterator_free(it); } -/* +/** * Reads next ${count} values from iterator into user-supplied ${buf}. * Returns the number of read elements. * This number can be smaller than ${count}, which means that iterator is @@ -1192,6 +1214,30 @@ CROARING_DEPRECATED static inline uint32_t roaring_read_uint32_iterator( return roaring_uint32_iterator_read(it, buf, count); } +/** + * Skip the next ${count} values from iterator. + * Returns the number of values actually skipped. + * The number can be smaller than ${count}, which means that iterator is + * drained. + * + * This function is equivalent to calling `roaring_uint32_iterator_advance()` + * ${count} times but is much more efficient. + */ +uint32_t roaring_uint32_iterator_skip(roaring_uint32_iterator_t *it, + uint32_t count); + +/** + * Skip the previous ${count} values from iterator (move backwards). + * Returns the number of values actually skipped backwards. + * The number can be smaller than ${count}, which means that iterator reached + * the beginning. + * + * This function is equivalent to calling `roaring_uint32_iterator_previous()` + * ${count} times but is much more efficient. + */ +uint32_t roaring_uint32_iterator_skip_backward(roaring_uint32_iterator_t *it, + uint32_t count); + #ifdef __cplusplus } } diff --git a/contrib/libs/croaring/include/roaring/roaring_array.h b/contrib/libs/croaring/include/roaring/roaring_array.h index 594a10b6089..be520d7a59a 100644 --- a/contrib/libs/croaring/include/roaring/roaring_array.h +++ b/contrib/libs/croaring/include/roaring/roaring_array.h @@ -199,9 +199,6 @@ inline void ra_replace_key_and_container_at_index(roaring_array_t *ra, // write set bits to an array void ra_to_uint32_array(const roaring_array_t *ra, uint32_t *ans); -bool ra_range_uint32_array(const roaring_array_t *ra, size_t offset, - size_t limit, uint32_t *ans); - /** * write a bitmap to a buffer. This is meant to be compatible with * the diff --git a/contrib/libs/croaring/include/roaring/roaring_version.h b/contrib/libs/croaring/include/roaring/roaring_version.h index c18fedf5b1d..c453aec7809 100644 --- a/contrib/libs/croaring/include/roaring/roaring_version.h +++ b/contrib/libs/croaring/include/roaring/roaring_version.h @@ -2,11 +2,11 @@ // /include/roaring/roaring_version.h automatically generated by release.py, do not change by hand #ifndef ROARING_INCLUDE_ROARING_VERSION #define ROARING_INCLUDE_ROARING_VERSION -#define ROARING_VERSION "4.3.12" +#define ROARING_VERSION "4.4.1" enum { ROARING_VERSION_MAJOR = 4, - ROARING_VERSION_MINOR = 3, - ROARING_VERSION_REVISION = 12 + ROARING_VERSION_MINOR = 4, + ROARING_VERSION_REVISION = 1 }; #endif // ROARING_INCLUDE_ROARING_VERSION // clang-format on
\ No newline at end of file diff --git a/contrib/libs/croaring/src/containers/containers.c b/contrib/libs/croaring/src/containers/containers.c index eb5a346be59..8a235ad38b2 100644 --- a/contrib/libs/croaring/src/containers/containers.c +++ b/contrib/libs/croaring/src/containers/containers.c @@ -706,6 +706,205 @@ bool container_iterator_read_into_uint64(const container_t *c, uint8_t typecode, } } +bool container_iterator_skip(const container_t *c, uint8_t typecode, + roaring_container_iterator_t *it, + uint32_t skip_count, uint32_t *consumed_count, + uint16_t *value_out) { + uint32_t actually_skipped; + bool has_value; + skip_count = minimum_uint32(skip_count, (uint32_t)UINT16_MAX + 1); + switch (typecode) { + case ARRAY_CONTAINER_TYPE: { + const array_container_t *ac = const_CAST_array(c); + actually_skipped = + minimum_uint32(ac->cardinality - it->index, skip_count); + it->index += actually_skipped; + has_value = it->index < ac->cardinality; + if (has_value) { + *value_out = ac->array[it->index]; + } + break; + } + case BITSET_CONTAINER_TYPE: { + const bitset_container_t *bc = const_CAST_bitset(c); + + uint32_t remaining_skip = skip_count; + uint32_t current_index = it->index; + uint64_t word_mask = UINT64_MAX << (current_index % 64); + has_value = false; + + for (uint32_t word_index = current_index / 64; + word_index < BITSET_CONTAINER_SIZE_IN_WORDS; word_index++) { + uint64_t word = bc->words[word_index] & word_mask; + word_mask = ~0; // Only apply mask for the first word + + uint32_t bits_in_word = roaring_hamming(word); + if (bits_in_word > remaining_skip) { + // Unset the lowest bit `remaining_skip` times + for (; remaining_skip > 0; --remaining_skip) { + word &= word - 1; + } + has_value = true; + *value_out = it->index = + roaring_trailing_zeroes(word) + word_index * 64; + break; + } + // Skip all set bits in this word + remaining_skip -= bits_in_word; + } + actually_skipped = skip_count - remaining_skip; + break; + } + case RUN_CONTAINER_TYPE: { + const run_container_t *rc = const_CAST_run(c); + + uint16_t current_value = *value_out; + uint32_t remaining_skip = skip_count; + int32_t run_index; + + // Process skips by iterating through runs + for (run_index = it->index; + remaining_skip > 0 && run_index < rc->n_runs; run_index++) { + // max value (inclusive) in current run + uint32_t run_max_inc = + rc->runs[run_index].value + rc->runs[run_index].length; + // Max to skip in this run (we can skip from the current value + // to the last value in the run, plus one to move past this run) + uint32_t max_skip_this_run = run_max_inc - current_value + 1; + uint32_t consume = + minimum_uint32(remaining_skip, max_skip_this_run); + remaining_skip -= consume; + if (consume < max_skip_this_run) { + current_value += consume; + break; + } + // Skip past the end of this run, to the next if there is one + if (run_index + 1 < rc->n_runs) { + current_value = rc->runs[run_index + 1].value; + } + } + + // Update final state + it->index = run_index; + actually_skipped = skip_count - remaining_skip; + has_value = run_index < rc->n_runs; + if (has_value) { + *value_out = current_value; + } + break; + } + default: + assert(false); + roaring_unreachable; + return false; + } + *consumed_count = actually_skipped; + return has_value; +} + +bool container_iterator_skip_backward(const container_t *c, uint8_t typecode, + roaring_container_iterator_t *it, + uint32_t skip_count, + uint32_t *consumed_count, + uint16_t *value_out) { + uint32_t actually_skipped; + bool has_value; + skip_count = minimum_uint32(skip_count, (uint32_t)UINT16_MAX + 1); + switch (typecode) { + case ARRAY_CONTAINER_TYPE: { + const array_container_t *ac = const_CAST_array(c); + // Allow skipping back to -1 + actually_skipped = minimum_uint32(it->index + 1, skip_count); + it->index -= actually_skipped; + has_value = it->index >= 0; + if (has_value) { + *value_out = ac->array[it->index]; + } + break; + } + case BITSET_CONTAINER_TYPE: { + const bitset_container_t *bc = const_CAST_bitset(c); + + uint32_t remaining_skip = skip_count; + uint32_t current_index = it->index; + uint64_t word_mask = UINT64_MAX >> (63 - (current_index % 64)); + has_value = false; + + // Start from the word containing current index and go backwards + for (int32_t word_index = current_index / 64; word_index >= 0; + word_index--) { + uint64_t word = bc->words[word_index] & word_mask; + word_mask = ~0; // Only apply mask for the first word + + uint32_t bits_in_word = roaring_hamming(word); + if (bits_in_word > remaining_skip) { + // Unset the highest bit `remaining_skip` times + for (; remaining_skip > 0; --remaining_skip) { + uint64_t high_bit = + UINT64_C(1) << (63 - roaring_leading_zeroes(word)); + // Clear the highest set bit + word &= ~high_bit; + } + has_value = true; + *value_out = it->index = + (63 - roaring_leading_zeroes(word)) + word_index * 64; + break; + } + // Skip all set bits in this word + remaining_skip -= bits_in_word; + } + actually_skipped = skip_count - remaining_skip; + break; + } + case RUN_CONTAINER_TYPE: { + const run_container_t *rc = const_CAST_run(c); + + uint16_t current_value = *value_out; + uint32_t remaining_skip = skip_count; + int32_t run_index; + + // Process skips by iterating through runs backwards + for (run_index = it->index; remaining_skip > 0 && run_index >= 0; + run_index--) { + // min value (inclusive) in current run + uint32_t run_min_inc = rc->runs[run_index].value; + // Max to skip in this run (we can skip from the current value + // back to the first value in the run, plus one to move before + // this run) + uint32_t max_skip_this_run = current_value - run_min_inc + 1; + uint32_t consume = + minimum_uint32(remaining_skip, max_skip_this_run); + remaining_skip -= consume; + if (consume < max_skip_this_run) { + current_value -= consume; + break; + } + // Skip past the beginning of this run, to the previous if there + // is one + if (run_index - 1 >= 0) { + current_value = rc->runs[run_index - 1].value + + rc->runs[run_index - 1].length; + } + } + + // Update final state + it->index = run_index; + actually_skipped = skip_count - remaining_skip; + has_value = run_index >= 0; + if (has_value) { + *value_out = current_value; + } + break; + } + default: + assert(false); + roaring_unreachable; + return false; + } + *consumed_count = actually_skipped; + return has_value; +} + #ifdef __cplusplus } } diff --git a/contrib/libs/croaring/src/containers/run.c b/contrib/libs/croaring/src/containers/run.c index 52312ea8844..47e65b3f3bd 100644 --- a/contrib/libs/croaring/src/containers/run.c +++ b/contrib/libs/croaring/src/containers/run.c @@ -939,36 +939,21 @@ static inline int _avx512_run_container_cardinality( const int32_t n_runs = run->n_runs; const rle16_t *runs = run->runs; - /* by initializing with n_runs, we omit counting the +1 for each pair. */ - int sum = n_runs; int32_t k = 0; - const int32_t step = sizeof(__m512i) / sizeof(rle16_t); - if (n_runs > step) { - __m512i total = _mm512_setzero_si512(); - for (; k + step <= n_runs; k += step) { - __m512i ymm1 = _mm512_loadu_si512((const __m512i *)(runs + k)); - __m512i justlengths = _mm512_srli_epi32(ymm1, 16); - total = _mm512_add_epi32(total, justlengths); - } - - __m256i lo = _mm512_extracti32x8_epi32(total, 0); - __m256i hi = _mm512_extracti32x8_epi32(total, 1); - - // a store might be faster than extract? - uint32_t buffer[sizeof(__m256i) / sizeof(rle16_t)]; - _mm256_storeu_si256((__m256i *)buffer, lo); - sum += (buffer[0] + buffer[1]) + (buffer[2] + buffer[3]) + - (buffer[4] + buffer[5]) + (buffer[6] + buffer[7]); - - _mm256_storeu_si256((__m256i *)buffer, hi); - sum += (buffer[0] + buffer[1]) + (buffer[2] + buffer[3]) + - (buffer[4] + buffer[5]) + (buffer[6] + buffer[7]); + const int32_t step512 = sizeof(__m512i) / sizeof(rle16_t); + __m512i total = _mm512_setzero_si512(); + for (; k + step512 <= n_runs; k += step512) { + __m512i ymm1 = _mm512_loadu_si512((const __m512i *)(runs + k)); + __m512i justlengths = _mm512_srli_epi32(ymm1, 16); + total = _mm512_add_epi32(total, justlengths); } - for (; k < n_runs; ++k) { - sum += runs[k].length; + if (k < n_runs) { + __m512i ymm1 = _mm512_maskz_loadu_epi32((1 << (n_runs - k)) - 1, + (const __m512i *)(runs + k)); + __m512i justlengths = _mm512_srli_epi32(ymm1, 16); + total = _mm512_add_epi32(total, justlengths); } - - return sum; + return _mm512_reduce_add_epi32(total) + n_runs; } CROARING_UNTARGET_AVX512 @@ -1063,7 +1048,10 @@ static inline int _scalar_run_container_cardinality( } int run_container_cardinality(const run_container_t *run) { -#if CROARING_COMPILER_SUPPORTS_AVX512 + // Empirically AVX-512 is not always faster than AVX2 +#define CROARING_ENABLE_AVX512_RUN_CONTAINER_CARDINALITY 0 +#if CROARING_COMPILER_SUPPORTS_AVX512 && \ + CROARING_ENABLE_AVX512_RUN_CONTAINER_CARDINALITY if (croaring_hardware_support() & ROARING_SUPPORTS_AVX512) { return _avx512_run_container_cardinality(run); } else diff --git a/contrib/libs/croaring/src/roaring.c b/contrib/libs/croaring/src/roaring.c index c105988cc9f..0c220a29873 100644 --- a/contrib/libs/croaring/src/roaring.c +++ b/contrib/libs/croaring/src/roaring.c @@ -416,6 +416,30 @@ void roaring_bitmap_statistics(const roaring_bitmap_t *r, } } +bool roaring_contains_shared(const roaring_bitmap_t *r) { + const roaring_array_t *ra = &r->high_low_container; + for (int i = 0; i < ra->size; ++i) { + if (ra->typecodes[i] == SHARED_CONTAINER_TYPE) { + return true; + } + } + return false; +} + +bool roaring_unshare_all(roaring_bitmap_t *r) { + const roaring_array_t *ra = &r->high_low_container; + bool unshared = false; + for (int i = 0; i < ra->size; ++i) { + uint8_t typecode = ra->typecodes[i]; + if (typecode == SHARED_CONTAINER_TYPE) { + ra->containers[i] = get_writable_copy_if_shared(ra->containers[i], + &ra->typecodes[i]); + unshared = true; + } + } + return unshared; +} + /* * Checks that: * - Array containers are sorted and contain no duplicates @@ -423,6 +447,7 @@ void roaring_bitmap_statistics(const roaring_bitmap_t *r, * - Roaring containers are sorted by key and there are no duplicate keys * - The correct container type is use for each container (e.g. bitmaps aren't * used for small containers) + * - Shared containers are only used when the bitmap is COW */ bool roaring_bitmap_internal_validate(const roaring_bitmap_t *r, const char **reason) { @@ -475,7 +500,13 @@ bool roaring_bitmap_internal_validate(const roaring_bitmap_t *r, prev_key = ra->keys[i]; } + bool cow = roaring_bitmap_get_copy_on_write(r); + for (int32_t i = 0; i < ra->size; ++i) { + if (ra->typecodes[i] == SHARED_CONTAINER_TYPE && !cow) { + *reason = "shared container in non-COW bitmap"; + return false; + } if (!container_internal_validate(ra->containers[i], ra->typecodes[i], reason)) { // reason should already be set @@ -1399,7 +1430,13 @@ void roaring_bitmap_to_uint32_array(const roaring_bitmap_t *r, uint32_t *ans) { bool roaring_bitmap_range_uint32_array(const roaring_bitmap_t *r, size_t offset, size_t limit, uint32_t *ans) { - return ra_range_uint32_array(&r->high_low_container, offset, limit, ans); + roaring_uint32_iterator_t it; + roaring_iterator_init(r, &it); + roaring_uint32_iterator_skip(&it, offset); + roaring_uint32_iterator_read(&it, ans, limit); + + // This function always succeeds + return true; } /** convert array and bitmap containers to run containers when it is more @@ -1832,15 +1869,67 @@ uint32_t roaring_uint32_iterator_read(roaring_uint32_iterator_t *it, if (has_value) { it->has_value = true; it->current_value = it->highbits | low16; + // If the container still has values, we must have stopped because + // we skipped enough values. + assert(ret == count); + return ret; + } + it->container_index++; + it->has_value = loadfirstvalue(it); + } + return ret; +} + +uint32_t roaring_uint32_iterator_skip(roaring_uint32_iterator_t *it, + uint32_t count) { + uint32_t ret = 0; + while (it->has_value && ret < count) { + uint32_t consumed; + uint16_t low16 = (uint16_t)it->current_value; + bool has_value = container_iterator_skip(it->container, it->typecode, + &it->container_it, count - ret, + &consumed, &low16); + ret += consumed; + if (has_value) { + it->has_value = true; + it->current_value = it->highbits | low16; + // If the container still has values, we must have stopped because + // we skipped enough values. assert(ret == count); return ret; } + // We have skipped over all items in the current container, so set + // ourselves at the first item of the next container. + // We do NOT need to count another item skipped here. it->container_index++; it->has_value = loadfirstvalue(it); } return ret; } +uint32_t roaring_uint32_iterator_skip_backward(roaring_uint32_iterator_t *it, + uint32_t count) { + uint32_t ret = 0; + while (it->has_value && ret < count) { + uint32_t consumed; + uint16_t low16 = (uint16_t)it->current_value; + bool has_value = container_iterator_skip_backward( + it->container, it->typecode, &it->container_it, count - ret, + &consumed, &low16); + ret += consumed; + if (has_value) { + it->has_value = true; + it->current_value = it->highbits | low16; + return ret; + } + // We have skipped over all items in the current container backwards. + // Moving to the previous container counts as consuming one more skip. + it->container_index--; + it->has_value = loadlastvalue(it); + } + return ret; +} + void roaring_uint32_iterator_free(roaring_uint32_iterator_t *it) { roaring_free(it); } diff --git a/contrib/libs/croaring/src/roaring64.c b/contrib/libs/croaring/src/roaring64.c index b48308d9039..85726db2455 100644 --- a/contrib/libs/croaring/src/roaring64.c +++ b/contrib/libs/croaring/src/roaring64.c @@ -757,6 +757,7 @@ void roaring64_bitmap_remove_bulk(roaring64_bitmap_t *r, assert(erased); (void)erased; remove_container(r, leaf); + context->leaf = NULL; } } else { // We're not positioned anywhere yet or the high bits of the key diff --git a/contrib/libs/croaring/src/roaring_array.c b/contrib/libs/croaring/src/roaring_array.c index f8c1f029e1e..423c4fe61da 100644 --- a/contrib/libs/croaring/src/roaring_array.c +++ b/contrib/libs/croaring/src/roaring_array.c @@ -433,89 +433,6 @@ void ra_to_uint32_array(const roaring_array_t *ra, uint32_t *ans) { } } -bool ra_range_uint32_array(const roaring_array_t *ra, size_t offset, - size_t limit, uint32_t *ans) { - size_t ctr = 0; - size_t dtr = 0; - - size_t t_limit = 0; - - bool first = false; - size_t first_skip = 0; - - uint32_t *t_ans = NULL; - size_t cur_len = 0; - - for (int i = 0; i < ra->size; ++i) { - const container_t *c = - container_unwrap_shared(ra->containers[i], &ra->typecodes[i]); - switch (ra->typecodes[i]) { - case BITSET_CONTAINER_TYPE: - t_limit = (const_CAST_bitset(c))->cardinality; - break; - case ARRAY_CONTAINER_TYPE: - t_limit = (const_CAST_array(c))->cardinality; - break; - case RUN_CONTAINER_TYPE: - t_limit = run_container_cardinality(const_CAST_run(c)); - break; - } - if (ctr + t_limit - 1 >= offset && ctr < offset + limit) { - if (!first) { - // first_skip = t_limit - (ctr + t_limit - offset); - first_skip = offset - ctr; - first = true; - t_ans = (uint32_t *)roaring_malloc(sizeof(*t_ans) * - (first_skip + limit)); - if (t_ans == NULL) { - return false; - } - memset(t_ans, 0, sizeof(*t_ans) * (first_skip + limit)); - cur_len = first_skip + limit; - } - if (dtr + t_limit > cur_len) { - uint32_t *append_ans = (uint32_t *)roaring_malloc( - sizeof(*append_ans) * (cur_len + t_limit)); - if (append_ans == NULL) { - if (t_ans != NULL) roaring_free(t_ans); - return false; - } - memset(append_ans, 0, - sizeof(*append_ans) * (cur_len + t_limit)); - cur_len = cur_len + t_limit; - memcpy(append_ans, t_ans, dtr * sizeof(uint32_t)); - roaring_free(t_ans); - t_ans = append_ans; - } - switch (ra->typecodes[i]) { - case BITSET_CONTAINER_TYPE: - container_to_uint32_array(t_ans + dtr, const_CAST_bitset(c), - ra->typecodes[i], - ((uint32_t)ra->keys[i]) << 16); - break; - case ARRAY_CONTAINER_TYPE: - container_to_uint32_array(t_ans + dtr, const_CAST_array(c), - ra->typecodes[i], - ((uint32_t)ra->keys[i]) << 16); - break; - case RUN_CONTAINER_TYPE: - container_to_uint32_array(t_ans + dtr, const_CAST_run(c), - ra->typecodes[i], - ((uint32_t)ra->keys[i]) << 16); - break; - } - dtr += t_limit; - } - ctr += t_limit; - if (dtr - first_skip >= limit) break; - } - if (t_ans != NULL) { - memcpy(ans, t_ans + first_skip, limit * sizeof(uint32_t)); - roaring_free(t_ans); - } - return true; -} - bool ra_has_run_container(const roaring_array_t *ra) { for (int32_t k = 0; k < ra->size; ++k) { if (get_container_type(ra->containers[k], ra->typecodes[k]) == diff --git a/contrib/libs/croaring/ya.make b/contrib/libs/croaring/ya.make index 95d95d27da2..2300d1d1817 100644 --- a/contrib/libs/croaring/ya.make +++ b/contrib/libs/croaring/ya.make @@ -10,9 +10,9 @@ LICENSE( LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -VERSION(4.3.12) +VERSION(4.4.1) -ORIGINAL_SOURCE(https://github.com/RoaringBitmap/CRoaring/archive/v4.3.12.tar.gz) +ORIGINAL_SOURCE(https://github.com/RoaringBitmap/CRoaring/archive/v4.4.1.tar.gz) ADDINCL( GLOBAL contrib/libs/croaring/include diff --git a/contrib/libs/ngtcp2/.yandex_meta/devtools.copyrights.report b/contrib/libs/ngtcp2/.yandex_meta/devtools.copyrights.report index ebb133dd1d5..5de83703fef 100644 --- a/contrib/libs/ngtcp2/.yandex_meta/devtools.copyrights.report +++ b/contrib/libs/ngtcp2/.yandex_meta/devtools.copyrights.report @@ -255,6 +255,8 @@ BELONGS ya.make Files with this license: lib/ngtcp2_callbacks.c [4:4] lib/ngtcp2_callbacks.h [4:4] + lib/ngtcp2_conn_info.c [4:4] + lib/ngtcp2_conn_info.h [4:4] lib/ngtcp2_dcidtr.c [4:4] lib/ngtcp2_dcidtr.h [4:4] lib/ngtcp2_pcg.c [4:4] diff --git a/contrib/libs/ngtcp2/.yandex_meta/devtools.licenses.report b/contrib/libs/ngtcp2/.yandex_meta/devtools.licenses.report index 0c8af1dfcc2..cd51435125c 100644 --- a/contrib/libs/ngtcp2/.yandex_meta/devtools.licenses.report +++ b/contrib/libs/ngtcp2/.yandex_meta/devtools.licenses.report @@ -116,7 +116,7 @@ BELONGS ya.make KEEP MIT a3a8f7feced3937b87cd090ba748e24b BELONGS crypto/boringssl/ya.make crypto/quictls/ya.make ya.make -FILE_INCLUDE AUTHORS found in files: crypto/boringssl/boringssl.c at line 20, crypto/includes/ngtcp2/ngtcp2_crypto.h at line 20, crypto/includes/ngtcp2/ngtcp2_crypto_boringssl.h at line 20, crypto/includes/ngtcp2/ngtcp2_crypto_quictls.h at line 20, crypto/quictls/quictls.c at line 20, crypto/shared.c at line 20, crypto/shared.h at line 20, lib/includes/ngtcp2/ngtcp2.h at line 21, lib/includes/ngtcp2/version.h at line 20, lib/ngtcp2_acktr.c at line 20, lib/ngtcp2_acktr.h at line 20, lib/ngtcp2_addr.c at line 20, lib/ngtcp2_addr.h at line 20, lib/ngtcp2_balloc.c at line 20, lib/ngtcp2_balloc.h at line 20, lib/ngtcp2_bbr.c at line 20, lib/ngtcp2_bbr.h at line 20, lib/ngtcp2_buf.c at line 20, lib/ngtcp2_buf.h at line 20, lib/ngtcp2_callbacks.c at line 20, lib/ngtcp2_callbacks.h at line 20, lib/ngtcp2_cc.c at line 20, lib/ngtcp2_cc.h at line 20, lib/ngtcp2_cid.c at line 20, lib/ngtcp2_cid.h at line 20, lib/ngtcp2_conn.c at line 20, lib/ngtcp2_conn.h at line 20, lib/ngtcp2_conn_stat.h at line 20, lib/ngtcp2_conv.c at line 20, lib/ngtcp2_conv.h at line 20, lib/ngtcp2_crypto.c at line 20, lib/ngtcp2_crypto.h at line 20, lib/ngtcp2_dcidtr.c at line 20, lib/ngtcp2_dcidtr.h at line 20, lib/ngtcp2_err.c at line 20, lib/ngtcp2_err.h at line 20, lib/ngtcp2_frame_chain.c at line 20, lib/ngtcp2_frame_chain.h at line 20, lib/ngtcp2_gaptr.c at line 20, lib/ngtcp2_gaptr.h at line 20, lib/ngtcp2_idtr.c at line 20, lib/ngtcp2_idtr.h at line 20, lib/ngtcp2_ksl.c at line 20, lib/ngtcp2_ksl.h at line 20, lib/ngtcp2_log.c at line 20, lib/ngtcp2_log.h at line 20, lib/ngtcp2_macro.h at line 20, lib/ngtcp2_map.c at line 21, lib/ngtcp2_map.h at line 21, lib/ngtcp2_mem.c at line 21, lib/ngtcp2_mem.h at line 21, lib/ngtcp2_net.h at line 20, lib/ngtcp2_objalloc.c at line 20, lib/ngtcp2_objalloc.h at line 20, lib/ngtcp2_opl.c at line 20, lib/ngtcp2_opl.h at line 20, lib/ngtcp2_path.c at line 20, lib/ngtcp2_path.h at line 20, lib/ngtcp2_pcg.c at line 20, lib/ngtcp2_pcg.h at line 20, lib/ngtcp2_pkt.c at line 20, lib/ngtcp2_pkt.h at line 20, lib/ngtcp2_pktns_id.h at line 20, lib/ngtcp2_pmtud.c at line 20, lib/ngtcp2_pmtud.h at line 20, lib/ngtcp2_ppe.c at line 20, lib/ngtcp2_ppe.h at line 20, lib/ngtcp2_pq.c at line 21, lib/ngtcp2_pq.h at line 21, lib/ngtcp2_pv.c at line 20, lib/ngtcp2_pv.h at line 20, lib/ngtcp2_qlog.c at line 20, lib/ngtcp2_qlog.h at line 20, lib/ngtcp2_range.c at line 20, lib/ngtcp2_range.h at line 20, lib/ngtcp2_ratelim.c at line 21, lib/ngtcp2_ratelim.h at line 21, lib/ngtcp2_rcvry.h at line 20, lib/ngtcp2_ringbuf.c at line 20, lib/ngtcp2_ringbuf.h at line 20, lib/ngtcp2_rob.c at line 20, lib/ngtcp2_rob.h at line 20, lib/ngtcp2_rst.c at line 20, lib/ngtcp2_rst.h at line 20, lib/ngtcp2_rtb.c at line 20, lib/ngtcp2_rtb.h at line 20, lib/ngtcp2_settings.c at line 20, lib/ngtcp2_settings.h at line 20, lib/ngtcp2_str.c at line 20, lib/ngtcp2_str.h at line 20, lib/ngtcp2_strm.c at line 20, lib/ngtcp2_strm.h at line 20, lib/ngtcp2_transport_params.c at line 20, lib/ngtcp2_transport_params.h at line 20, lib/ngtcp2_tstamp.h at line 20, lib/ngtcp2_unreachable.c at line 20, lib/ngtcp2_unreachable.h at line 20, lib/ngtcp2_vec.c at line 20, lib/ngtcp2_vec.h at line 20, lib/ngtcp2_version.c at line 20, lib/ngtcp2_window_filter.c at line 20, lib/ngtcp2_window_filter.h at line 20 +FILE_INCLUDE AUTHORS found in files: crypto/boringssl/boringssl.c at line 20, crypto/includes/ngtcp2/ngtcp2_crypto.h at line 20, crypto/includes/ngtcp2/ngtcp2_crypto_boringssl.h at line 20, crypto/includes/ngtcp2/ngtcp2_crypto_quictls.h at line 20, crypto/quictls/quictls.c at line 20, crypto/shared.c at line 20, crypto/shared.h at line 20, lib/includes/ngtcp2/ngtcp2.h at line 21, lib/includes/ngtcp2/version.h at line 20, lib/ngtcp2_acktr.c at line 20, lib/ngtcp2_acktr.h at line 20, lib/ngtcp2_addr.c at line 20, lib/ngtcp2_addr.h at line 20, lib/ngtcp2_balloc.c at line 20, lib/ngtcp2_balloc.h at line 20, lib/ngtcp2_bbr.c at line 20, lib/ngtcp2_bbr.h at line 20, lib/ngtcp2_buf.c at line 20, lib/ngtcp2_buf.h at line 20, lib/ngtcp2_callbacks.c at line 20, lib/ngtcp2_callbacks.h at line 20, lib/ngtcp2_cc.c at line 20, lib/ngtcp2_cc.h at line 20, lib/ngtcp2_cid.c at line 20, lib/ngtcp2_cid.h at line 20, lib/ngtcp2_conn.c at line 20, lib/ngtcp2_conn.h at line 20, lib/ngtcp2_conn_info.c at line 20, lib/ngtcp2_conn_info.h at line 20, lib/ngtcp2_conn_stat.h at line 20, lib/ngtcp2_conv.c at line 20, lib/ngtcp2_conv.h at line 20, lib/ngtcp2_crypto.c at line 20, lib/ngtcp2_crypto.h at line 20, lib/ngtcp2_dcidtr.c at line 20, lib/ngtcp2_dcidtr.h at line 20, lib/ngtcp2_err.c at line 20, lib/ngtcp2_err.h at line 20, lib/ngtcp2_frame_chain.c at line 20, lib/ngtcp2_frame_chain.h at line 20, lib/ngtcp2_gaptr.c at line 20, lib/ngtcp2_gaptr.h at line 20, lib/ngtcp2_idtr.c at line 20, lib/ngtcp2_idtr.h at line 20, lib/ngtcp2_ksl.c at line 20, lib/ngtcp2_ksl.h at line 20, lib/ngtcp2_log.c at line 20, lib/ngtcp2_log.h at line 20, lib/ngtcp2_macro.h at line 20, lib/ngtcp2_map.c at line 21, lib/ngtcp2_map.h at line 21, lib/ngtcp2_mem.c at line 21, lib/ngtcp2_mem.h at line 21, lib/ngtcp2_net.h at line 20, lib/ngtcp2_objalloc.c at line 20, lib/ngtcp2_objalloc.h at line 20, lib/ngtcp2_opl.c at line 20, lib/ngtcp2_opl.h at line 20, lib/ngtcp2_path.c at line 20, lib/ngtcp2_path.h at line 20, lib/ngtcp2_pcg.c at line 20, lib/ngtcp2_pcg.h at line 20, lib/ngtcp2_pkt.c at line 20, lib/ngtcp2_pkt.h at line 20, lib/ngtcp2_pktns_id.h at line 20, lib/ngtcp2_pmtud.c at line 20, lib/ngtcp2_pmtud.h at line 20, lib/ngtcp2_ppe.c at line 20, lib/ngtcp2_ppe.h at line 20, lib/ngtcp2_pq.c at line 21, lib/ngtcp2_pq.h at line 21, lib/ngtcp2_pv.c at line 20, lib/ngtcp2_pv.h at line 20, lib/ngtcp2_qlog.c at line 20, lib/ngtcp2_qlog.h at line 20, lib/ngtcp2_range.c at line 20, lib/ngtcp2_range.h at line 20, lib/ngtcp2_ratelim.c at line 21, lib/ngtcp2_ratelim.h at line 21, lib/ngtcp2_rcvry.h at line 20, lib/ngtcp2_ringbuf.c at line 20, lib/ngtcp2_ringbuf.h at line 20, lib/ngtcp2_rob.c at line 20, lib/ngtcp2_rob.h at line 20, lib/ngtcp2_rst.c at line 20, lib/ngtcp2_rst.h at line 20, lib/ngtcp2_rtb.c at line 20, lib/ngtcp2_rtb.h at line 20, lib/ngtcp2_settings.c at line 20, lib/ngtcp2_settings.h at line 20, lib/ngtcp2_str.c at line 20, lib/ngtcp2_str.h at line 20, lib/ngtcp2_strm.c at line 20, lib/ngtcp2_strm.h at line 20, lib/ngtcp2_transport_params.c at line 20, lib/ngtcp2_transport_params.h at line 20, lib/ngtcp2_tstamp.h at line 20, lib/ngtcp2_unreachable.c at line 20, lib/ngtcp2_unreachable.h at line 20, lib/ngtcp2_vec.c at line 20, lib/ngtcp2_vec.h at line 20, lib/ngtcp2_version.c at line 20, lib/ngtcp2_window_filter.c at line 20, lib/ngtcp2_window_filter.h at line 20 Note: matched license text is too long. Read it in the source files. Scancode info: Original SPDX id: MIT @@ -151,6 +151,8 @@ FILE_INCLUDE AUTHORS found in files: crypto/boringssl/boringssl.c at line 20, cr lib/ngtcp2_cid.h [6:23] lib/ngtcp2_conn.c [6:23] lib/ngtcp2_conn.h [6:23] + lib/ngtcp2_conn_info.c [6:23] + lib/ngtcp2_conn_info.h [6:23] lib/ngtcp2_conn_stat.h [6:23] lib/ngtcp2_conv.c [6:23] lib/ngtcp2_conv.h [6:23] diff --git a/contrib/libs/ngtcp2/.yandex_meta/licenses.list.txt b/contrib/libs/ngtcp2/.yandex_meta/licenses.list.txt index 56673420b33..5dfdfa781b3 100644 --- a/contrib/libs/ngtcp2/.yandex_meta/licenses.list.txt +++ b/contrib/libs/ngtcp2/.yandex_meta/licenses.list.txt @@ -135,6 +135,7 @@ Marin Rukavina Mark Chiou Martin Thomson Michael White +Mike L. Moritz Buhl NKTelnet Natris diff --git a/contrib/libs/ngtcp2/.yandex_meta/override.nix b/contrib/libs/ngtcp2/.yandex_meta/override.nix index 6b5bf9737e2..1682578e20c 100644 --- a/contrib/libs/ngtcp2/.yandex_meta/override.nix +++ b/contrib/libs/ngtcp2/.yandex_meta/override.nix @@ -1,9 +1,9 @@ pkgs: attrs: with pkgs; rec { - version = "1.15.1"; + version = "1.16.0"; src = fetchurl { url = "https://github.com/ngtcp2/ngtcp2/releases/download/v${version}/ngtcp2-${version}.tar.xz"; - hash = "sha256-BvLux8p2VSBBBQRz2ZLTBjeC4m/f9XUzy4zYyaaFmhc="; + hash = "sha256-Nny87KylOfdkU8SUVNjns47LFirPic1XFTWsSs+CorQ="; }; patches = []; diff --git a/contrib/libs/ngtcp2/AUTHORS b/contrib/libs/ngtcp2/AUTHORS index d09ff327be0..214e07037e9 100644 --- a/contrib/libs/ngtcp2/AUTHORS +++ b/contrib/libs/ngtcp2/AUTHORS @@ -37,6 +37,7 @@ Marin Rukavina Mark Chiou Martin Thomson Michael White +Mike L. Moritz Buhl NKTelnet Natris diff --git a/contrib/libs/ngtcp2/README.rst b/contrib/libs/ngtcp2/README.rst index 64495b2827e..30306a2d0bb 100644 --- a/contrib/libs/ngtcp2/README.rst +++ b/contrib/libs/ngtcp2/README.rst @@ -61,9 +61,9 @@ directory require at least one of the following TLS backends: - `quictls <https://github.com/quictls/openssl/tree/OpenSSL_1_1_1w+quic>`_ - GnuTLS >= 3.7.5 -- BoringSSL (commit 729648fb79df7bc46c145e49b0dfd8d2a24232f1); +- BoringSSL (commit fa47b1d0f9d3d30601d7e5ed158d3055cbe6ff44); or aws-lc >= 1.39.0 -- Picotls (commit f350eab60742138ac62b42ee444adf04c7898b0d) +- Picotls (commit 4e443c11eb48949e597911b1b772a9d2588b4769) - wolfSSL >= 5.5.0 - LibreSSL >= v3.9.2 - OpenSSL >= 3.5.0 (experimental) @@ -115,7 +115,7 @@ Build with BoringSSL $ git clone https://boringssl.googlesource.com/boringssl $ cd boringssl - $ git checkout 729648fb79df7bc46c145e49b0dfd8d2a24232f1 + $ git checkout fa47b1d0f9d3d30601d7e5ed158d3055cbe6ff44 $ cmake -B build -DCMAKE_POSITION_INDEPENDENT_CODE=ON $ make -j$(nproc) -C build $ cd .. @@ -142,7 +142,7 @@ Build with aws-lc .. code-block:: shell - $ git clone --depth 1 -b v1.58.1 https://github.com/aws/aws-lc + $ git clone --depth 1 -b v1.61.2 https://github.com/aws/aws-lc $ cd aws-lc $ cmake -B build -DDISABLE_GO=ON $ make -j$(nproc) -C build diff --git a/contrib/libs/ngtcp2/crypto/boringssl/.yandex_meta/licenses.list.txt b/contrib/libs/ngtcp2/crypto/boringssl/.yandex_meta/licenses.list.txt index 84f37b72207..e041fe202f3 100644 --- a/contrib/libs/ngtcp2/crypto/boringssl/.yandex_meta/licenses.list.txt +++ b/contrib/libs/ngtcp2/crypto/boringssl/.yandex_meta/licenses.list.txt @@ -42,6 +42,7 @@ Marin Rukavina Mark Chiou Martin Thomson Michael White +Mike L. Moritz Buhl NKTelnet Natris diff --git a/contrib/libs/ngtcp2/crypto/boringssl/ya.make b/contrib/libs/ngtcp2/crypto/boringssl/ya.make index 023dd779c57..b16b9b6cc06 100644 --- a/contrib/libs/ngtcp2/crypto/boringssl/ya.make +++ b/contrib/libs/ngtcp2/crypto/boringssl/ya.make @@ -2,7 +2,7 @@ LIBRARY() -VERSION(1.15.1) +VERSION(1.16.0) LICENSE(MIT) diff --git a/contrib/libs/ngtcp2/crypto/quictls/.yandex_meta/licenses.list.txt b/contrib/libs/ngtcp2/crypto/quictls/.yandex_meta/licenses.list.txt index 36ed6f02da2..dbfe8c101ca 100644 --- a/contrib/libs/ngtcp2/crypto/quictls/.yandex_meta/licenses.list.txt +++ b/contrib/libs/ngtcp2/crypto/quictls/.yandex_meta/licenses.list.txt @@ -42,6 +42,7 @@ Marin Rukavina Mark Chiou Martin Thomson Michael White +Mike L. Moritz Buhl NKTelnet Natris diff --git a/contrib/libs/ngtcp2/crypto/quictls/ya.make b/contrib/libs/ngtcp2/crypto/quictls/ya.make index 97b50d7759c..fdaa1aef8b0 100644 --- a/contrib/libs/ngtcp2/crypto/quictls/ya.make +++ b/contrib/libs/ngtcp2/crypto/quictls/ya.make @@ -2,7 +2,7 @@ LIBRARY() -VERSION(1.15.1) +VERSION(1.16.0) LICENSE(MIT) diff --git a/contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2.h b/contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2.h index 2201fcae0b2..23679da06d8 100644 --- a/contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2.h +++ b/contrib/libs/ngtcp2/lib/includes/ngtcp2/ngtcp2.h @@ -1561,7 +1561,8 @@ typedef struct ngtcp2_transport_params { } ngtcp2_transport_params; #define NGTCP2_CONN_INFO_V1 1 -#define NGTCP2_CONN_INFO_VERSION NGTCP2_CONN_INFO_V1 +#define NGTCP2_CONN_INFO_V2 2 +#define NGTCP2_CONN_INFO_VERSION NGTCP2_CONN_INFO_V2 /** * @struct @@ -1600,6 +1601,52 @@ typedef struct ngtcp2_conn_info { * packets which have not been acknowledged. */ uint64_t bytes_in_flight; + /* The following fields have been added since NGTCP2_CONN_INFO_V2. */ + /** + * :member:`pkt_sent` is the number of QUIC packets sent. This + * field has been available since v1.16.0. + */ + uint64_t pkt_sent; + /** + * :member:`bytes_sent` is the number of bytes (the sum of QUIC + * packet length) sent. This field has been available since + * v1.16.0. + */ + uint64_t bytes_sent; + /** + * :member:`pkt_recv` is the number of QUIC packets received, + * excluding discarded ones. This field has been available since + * v1.16.0. + */ + uint64_t pkt_recv; + /** + * :member:`bytes_recv` is the number of bytes (the sum of QUIC + * packet length) received, excluding discarded ones. This field + * has been available since v1.16.0. + */ + uint64_t bytes_recv; + /** + * :member:`pkt_lost` is the number of QUIC packets that are + * considered lost, excluding PMTUD packets. This field has been + * available since v1.16.0. + */ + uint64_t pkt_lost; + /** + * :member:`bytes_lost` is the number of bytes (the sum of QUIC + * packet length) lost, excluding PMTUD packets. This field has + * been available since v1.16.0. + */ + uint64_t bytes_lost; + /** + * :member:`ping_recv` is the number of PING frames received. This + * field has been available since v1.16.0. + */ + uint64_t ping_recv; + /** + * :member:`pkt_discarded` is the number of QUIC packets discarded. + * This field has been available since v1.16.0. + */ + uint64_t pkt_discarded; } ngtcp2_conn_info; /** @@ -5689,6 +5736,16 @@ NGTCP2_EXTERN ngtcp2_ssize ngtcp2_conn_write_aggregate_pkt_versioned( /** * @function * + * `ngtcp2_conn_get_timestamp` returns the latest timestamp that is + * known to |conn|. + * + * This function has been available since v1.16.0. + */ +NGTCP2_EXTERN ngtcp2_tstamp ngtcp2_conn_get_timestamp(const ngtcp2_conn *conn); + +/** + * @function + * * `ngtcp2_strerror` returns the text representation of |liberr|. * |liberr| must be one of ngtcp2 library error codes (which is * defined as :macro:`NGTCP2_ERR_* <NGTCP2_ERR_INVALID_ARGUMENT>` diff --git a/contrib/libs/ngtcp2/lib/includes/ngtcp2/version.h b/contrib/libs/ngtcp2/lib/includes/ngtcp2/version.h index e70a095ceb1..9fabd7b1797 100644 --- a/contrib/libs/ngtcp2/lib/includes/ngtcp2/version.h +++ b/contrib/libs/ngtcp2/lib/includes/ngtcp2/version.h @@ -36,7 +36,7 @@ * * Version number of the ngtcp2 library release. */ -#define NGTCP2_VERSION "1.15.1" +#define NGTCP2_VERSION "1.16.0" /** * @macro @@ -46,6 +46,6 @@ * number, 8 bits for minor and 8 bits for patch. Version 1.2.3 * becomes 0x010203. */ -#define NGTCP2_VERSION_NUM 0x010f01 +#define NGTCP2_VERSION_NUM 0x011000 #endif /* !defined(NGTCP2_VERSION_H) */ diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_bbr.c b/contrib/libs/ngtcp2/lib/ngtcp2_bbr.c index 44be1e189b8..2aa5d6fcadb 100644 --- a/contrib/libs/ngtcp2/lib/ngtcp2_bbr.c +++ b/contrib/libs/ngtcp2/lib/ngtcp2_bbr.c @@ -384,8 +384,9 @@ static void bbr_check_full_bw_reached(ngtcp2_cc_bbr *bbr, bbr->full_bw_reached = 1; - ngtcp2_log_info(bbr->cc.log, NGTCP2_LOG_EVENT_CCA, - "bbr reached full bandwidth, full_bw=%" PRIu64, bbr->full_bw); + ngtcp2_log_infof(bbr->cc.log, NGTCP2_LOG_EVENT_CCA, + "bbr reached full bandwidth, full_bw=%" PRIu64, + bbr->full_bw); } static void bbr_check_startup_high_loss(ngtcp2_cc_bbr *bbr) { @@ -1025,8 +1026,8 @@ static void bbr_update_min_rtt(ngtcp2_cc_bbr *bbr, const ngtcp2_cc_ack *ack, bbr->min_rtt = bbr->probe_rtt_min_delay; bbr->min_rtt_stamp = bbr->probe_rtt_min_stamp; - ngtcp2_log_info(bbr->cc.log, NGTCP2_LOG_EVENT_CCA, - "bbr update min_rtt=%" PRIu64, bbr->min_rtt); + ngtcp2_log_infof(bbr->cc.log, NGTCP2_LOG_EVENT_CCA, + "bbr update min_rtt=%" PRIu64, bbr->min_rtt); } } diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_cc.c b/contrib/libs/ngtcp2/lib/ngtcp2_cc.c index c16953802af..3fffef54484 100644 --- a/contrib/libs/ngtcp2/lib/ngtcp2_cc.c +++ b/contrib/libs/ngtcp2/lib/ngtcp2_cc.c @@ -92,9 +92,9 @@ void ngtcp2_cc_reno_cc_on_pkt_acked(ngtcp2_cc *cc, ngtcp2_conn_stat *cstat, if (cstat->cwnd < cstat->ssthresh) { cstat->cwnd += pkt->pktlen; - ngtcp2_log_info(reno->cc.log, NGTCP2_LOG_EVENT_CCA, - "pkn=%" PRId64 " acked, slow start cwnd=%" PRIu64, - pkt->pkt_num, cstat->cwnd); + ngtcp2_log_infof(reno->cc.log, NGTCP2_LOG_EVENT_CCA, + "pkn=%" PRId64 " acked, slow start cwnd=%" PRIu64, + pkt->pkt_num, cstat->cwnd); return; } @@ -123,9 +123,9 @@ void ngtcp2_cc_reno_cc_congestion_event(ngtcp2_cc *cc, ngtcp2_conn_stat *cstat, reno->pending_add = 0; - ngtcp2_log_info(reno->cc.log, NGTCP2_LOG_EVENT_CCA, - "reduce cwnd because of packet loss cwnd=%" PRIu64, - cstat->cwnd); + ngtcp2_log_infof(reno->cc.log, NGTCP2_LOG_EVENT_CCA, + "reduce cwnd because of packet loss cwnd=%" PRIu64, + cstat->cwnd); } void ngtcp2_cc_reno_cc_on_persistent_congestion(ngtcp2_cc *cc, @@ -291,9 +291,9 @@ void ngtcp2_cc_cubic_cc_on_ack_recv(ngtcp2_cc *cc, ngtcp2_conn_stat *cstat, cstat->cwnd += ack->bytes_delivered; } - ngtcp2_log_info(cubic->cc.log, NGTCP2_LOG_EVENT_CCA, - "%" PRIu64 " bytes acked, slow start cwnd=%" PRIu64, - ack->bytes_delivered, cstat->cwnd); + ngtcp2_log_infof(cubic->cc.log, NGTCP2_LOG_EVENT_CCA, + "%" PRIu64 " bytes acked, slow start cwnd=%" PRIu64, + ack->bytes_delivered, cstat->cwnd); } if (round_start) { @@ -398,11 +398,11 @@ void ngtcp2_cc_cubic_cc_on_ack_recv(ngtcp2_cc *cc, ngtcp2_conn_stat *cstat, cstat->cwnd += m / cstat->cwnd; } - ngtcp2_log_info(cubic->cc.log, NGTCP2_LOG_EVENT_CCA, - "%" PRIu64 " bytes acked, cubic-ca cwnd=%" PRIu64 - " k_m=%" PRIu64 " target=%" PRIu64 " w_est=%" PRIu64, - ack->bytes_delivered, cstat->cwnd, cubic->current.k_m, target, - cubic->current.w_est); + ngtcp2_log_infof(cubic->cc.log, NGTCP2_LOG_EVENT_CCA, + "%" PRIu64 " bytes acked, cubic-ca cwnd=%" PRIu64 + " k_m=%" PRIu64 " target=%" PRIu64 " w_est=%" PRIu64, + ack->bytes_delivered, cstat->cwnd, cubic->current.k_m, + target, cubic->current.w_est); } void ngtcp2_cc_cubic_cc_congestion_event(ngtcp2_cc *cc, ngtcp2_conn_stat *cstat, @@ -464,9 +464,9 @@ void ngtcp2_cc_cubic_cc_congestion_event(ngtcp2_cc *cc, ngtcp2_conn_stat *cstat, cubic->current.k_m = ngtcp2_cbrt((cwnd_delta << 30) * 10 / 4 / cstat->max_tx_udp_payload_size); - ngtcp2_log_info(cubic->cc.log, NGTCP2_LOG_EVENT_CCA, - "reduce cwnd because of packet loss cwnd=%" PRIu64, - cstat->cwnd); + ngtcp2_log_infof(cubic->cc.log, NGTCP2_LOG_EVENT_CCA, + "reduce cwnd because of packet loss cwnd=%" PRIu64, + cstat->cwnd); } void ngtcp2_cc_cubic_cc_on_spurious_congestion(ngtcp2_cc *cc, @@ -482,10 +482,10 @@ void ngtcp2_cc_cubic_cc_on_spurious_congestion(ngtcp2_cc *cc, cstat->cwnd = cubic->undo.cwnd; cstat->ssthresh = cubic->undo.ssthresh; - ngtcp2_log_info(cubic->cc.log, NGTCP2_LOG_EVENT_CCA, - "spurious congestion is detected and congestion state is " - "restored cwnd=%" PRIu64, - cstat->cwnd); + ngtcp2_log_infof(cubic->cc.log, NGTCP2_LOG_EVENT_CCA, + "spurious congestion is detected and congestion state is " + "restored cwnd=%" PRIu64, + cstat->cwnd); } cubic_vars_reset(&cubic->undo.v); diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_conn.c b/contrib/libs/ngtcp2/lib/ngtcp2_conn.c index d97ba6a71b2..13938761dd8 100644 --- a/contrib/libs/ngtcp2/lib/ngtcp2_conn.c +++ b/contrib/libs/ngtcp2/lib/ngtcp2_conn.c @@ -42,6 +42,7 @@ #include "ngtcp2_callbacks.h" #include "ngtcp2_tstamp.h" #include "ngtcp2_frame_chain.h" +#include "ngtcp2_conn_info.h" /* NGTCP2_FLOW_WINDOW_RTT_FACTOR is the factor of RTT when flow control window auto-tuning is triggered. */ @@ -1084,8 +1085,8 @@ static void conn_update_skip_pkt(ngtcp2_conn *conn, ngtcp2_pktns *pktns) { pktns->tx.skip_pkt.next_pkt_num = pktns->tx.last_pkt_num + gap; - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON, "next skip pkn=%" PRId64, - pktns->tx.skip_pkt.next_pkt_num); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_CON, "next skip pkn=%" PRId64, + pktns->tx.skip_pkt.next_pkt_num); } static int conn_handle_skip_pkt(ngtcp2_conn *conn, ngtcp2_pktns *pktns, @@ -1862,9 +1863,9 @@ static int conn_cwnd_is_zero(ngtcp2_conn *conn) { uint64_t cwnd = conn->cstat.cwnd; if (bytes_in_flight >= cwnd) { - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_LDC, - "cwnd limited bytes_in_flight=%lu cwnd=%lu", - bytes_in_flight, cwnd); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_LDC, + "cwnd limited bytes_in_flight=%lu cwnd=%lu", + bytes_in_flight, cwnd); } return bytes_in_flight >= cwnd; @@ -2735,6 +2736,9 @@ conn_write_handshake_pkt(ngtcp2_conn *conn, ngtcp2_pkt_info *pi, uint8_t *dest, conn->tx.pacing.pktlen += (size_t)spktlen; + ++conn->cstat.pkt_sent; + conn->cstat.bytes_sent += (uint64_t)spktlen; + ngtcp2_qlog_metrics_updated(&conn->qlog, &conn->cstat); ++pktns->tx.last_pkt_num; @@ -4476,8 +4480,8 @@ static ngtcp2_ssize conn_write_pkt(ngtcp2_conn *conn, ngtcp2_pkt_info *pi, (rtb_entry_flags & NGTCP2_RTB_ENTRY_FLAG_ACK_ELICITING)) { --pktns->rtb.probe_pkt_left; - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON, "probe pkt size=%td", - nwrite); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_CON, "probe pkt size=%td", + nwrite); } conn_update_keep_alive_last_ts(conn, ts); @@ -4486,6 +4490,9 @@ static ngtcp2_ssize conn_write_pkt(ngtcp2_conn *conn, ngtcp2_pkt_info *pi, conn->tx.pacing.pktlen += (size_t)nwrite; + ++conn->cstat.pkt_sent; + conn->cstat.bytes_sent += (uint64_t)nwrite; + ngtcp2_qlog_metrics_updated(&conn->qlog, &conn->cstat); ++pktns->tx.last_pkt_num; @@ -4669,8 +4676,8 @@ ngtcp2_ssize ngtcp2_conn_write_single_frame_pkt( ngtcp2_path_eq(&conn->dcid.current.ps.path, path)) { --pktns->rtb.probe_pkt_left; - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON, "probe pkt size=%td", - nwrite); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_CON, "probe pkt size=%td", + nwrite); } } } else if (pi && conn->tx.ecn.state == NGTCP2_ECN_STATE_CAPABLE) { @@ -4693,6 +4700,9 @@ ngtcp2_ssize ngtcp2_conn_write_single_frame_pkt( conn->tx.pacing.pktlen += (size_t)nwrite; } + ++conn->cstat.pkt_sent; + conn->cstat.bytes_sent += (uint64_t)nwrite; + ngtcp2_qlog_metrics_updated(&conn->qlog, &conn->cstat); ++pktns->tx.last_pkt_num; @@ -4899,8 +4909,8 @@ static ngtcp2_ssize conn_write_pmtud_probe(ngtcp2_conn *conn, return 0; } - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON, - "sending PMTUD probe packet len=%zu", probelen); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_CON, + "sending PMTUD probe packet len=%zu", probelen); lfr.type = NGTCP2_FRAME_PING; @@ -5399,8 +5409,8 @@ static int conn_on_retry(ngtcp2_conn *conn, const ngtcp2_pkt_hd *hd, uint8_t cidbuf[sizeof(retry.odcid.data) * 2 + 1]; uint8_t *token; - if (!in_pktns || conn->flags & NGTCP2_CONN_FLAG_RECV_RETRY) { - return 0; + if (!in_pktns || (conn->flags & NGTCP2_CONN_FLAG_RECV_RETRY)) { + return NGTCP2_ERR_DISCARD_PKT; } in_rtb = &in_pktns->rtb; @@ -5421,9 +5431,9 @@ static int conn_on_retry(ngtcp2_conn *conn, const ngtcp2_pkt_hd *hd, return rv; } - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_PKT, "odcid=0x%s", - (const char *)ngtcp2_encode_hex(cidbuf, retry.odcid.data, - retry.odcid.datalen)); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_PKT, "odcid=0x%s", + (const char *)ngtcp2_encode_hex(cidbuf, retry.odcid.data, + retry.odcid.datalen)); if (retry.tokenlen == 0) { return NGTCP2_ERR_PROTO; @@ -6383,8 +6393,8 @@ conn_recv_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_path *path, return 0; } - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON, - "buffering 1RTT packet len=%zu", pktlen); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_CON, + "buffering 1RTT packet len=%zu", pktlen); rv = conn_buffer_pkt(conn, &conn->pktns, path, pi, pkt, pktlen, dgramlen, ts); @@ -6531,8 +6541,8 @@ conn_recv_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_path *path, } /* Buffer re-ordered 0-RTT packet. */ - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON, - "buffering 0-RTT packet len=%zu", pktlen); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_CON, + "buffering 0-RTT packet len=%zu", pktlen); rv = conn_buffer_pkt(conn, conn->in_pktns, path, pi, pkt, pktlen, dgramlen, ts); @@ -6554,10 +6564,10 @@ conn_recv_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_path *path, if (conn->server) { if (dgramlen < NGTCP2_MAX_UDP_PAYLOAD_SIZE) { - ngtcp2_log_info( + ngtcp2_log_infof( &conn->log, NGTCP2_LOG_EVENT_PKT, "Initial packet was ignored because it is included in UDP datagram " - "less than %zu bytes: %zu bytes", + "less than %d bytes: %zu bytes", NGTCP2_MAX_UDP_PAYLOAD_SIZE, dgramlen); return NGTCP2_ERR_DISCARD_PKT; } @@ -6637,8 +6647,8 @@ conn_recv_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_path *path, "Handshake packet at this point is unexpected and discarded"); return (ngtcp2_ssize)pktlen; } - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON, - "buffering Handshake packet len=%zu", pktlen); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_CON, + "buffering Handshake packet len=%zu", pktlen); rv = conn_buffer_pkt(conn, conn->hs_pktns, path, pi, pkt, pktlen, dgramlen, ts); @@ -6692,8 +6702,8 @@ conn_recv_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_path *path, hd.pkt_num = ngtcp2_pkt_adjust_pkt_num(pktns->acktr.max_pkt_num, hd.pkt_num, hd.pkt_numlen); if (hd.pkt_num > NGTCP2_MAX_PKT_NUM) { - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_PKT, - "pkn=%" PRId64 " is greater than maximum pkn", hd.pkt_num); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_PKT, + "pkn=%" PRId64 " is greater than maximum pkn", hd.pkt_num); return NGTCP2_ERR_DISCARD_PKT; } @@ -6740,9 +6750,9 @@ conn_recv_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_path *path, !conn->negotiated_version) { conn->negotiated_version = hd.version; - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON, - "the negotiated version is 0x%08x", - conn->negotiated_version); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_CON, + "the negotiated version is 0x%08x", + conn->negotiated_version); } payload = conn->crypto.decrypt_buf.base; @@ -6845,9 +6855,9 @@ conn_recv_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_path *path, ngtcp2_vec_len(fr->stream.data, fr->stream.datacnt)) { conn->negotiated_version = hd.version; - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON, - "the negotiated version is 0x%08x", - conn->negotiated_version); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_CON, + "the negotiated version is 0x%08x", + conn->negotiated_version); } rv = conn_recv_crypto(conn, encryption_level, crypto, &fr->stream, ts); @@ -6863,6 +6873,7 @@ conn_recv_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_path *path, } break; case NGTCP2_FRAME_PING: + ++conn->cstat.ping_recv; require_ack = 1; break; default: @@ -6956,6 +6967,8 @@ static ngtcp2_ssize conn_recv_handshake_cpkt(ngtcp2_conn *conn, return nread; } + ++conn->cstat.pkt_discarded; + /* If server discards first Initial, then drop connection state. This is because SCID in packet might be corrupted and the current connection state might wrongly discard @@ -6973,11 +6986,15 @@ static ngtcp2_ssize conn_recv_handshake_cpkt(ngtcp2_conn *conn, unrecoverable, therefore drop connection. */ return nread; } + + ++conn->cstat.pkt_discarded; + return (ngtcp2_ssize)dgramlen; } } if (nread == NGTCP2_ERR_DISCARD_PKT) { + ++conn->cstat.pkt_discarded; return (ngtcp2_ssize)dgramlen; } @@ -6993,8 +7010,11 @@ static ngtcp2_ssize conn_recv_handshake_cpkt(ngtcp2_conn *conn, pkt += nread; pktlen -= (size_t)nread; - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_PKT, - "read packet %td left %zu", nread, pktlen); + ++conn->cstat.pkt_recv; + conn->cstat.bytes_recv += (uint64_t)nread; + + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_PKT, + "read packet %td left %zu", nread, pktlen); } return (ngtcp2_ssize)dgramlen; @@ -9022,8 +9042,10 @@ conn_recv_delayed_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_pkt_info *pi, return rv; } break; - case NGTCP2_FRAME_CRYPTO: case NGTCP2_FRAME_PING: + ++conn->cstat.ping_recv; + /* fall through */ + case NGTCP2_FRAME_CRYPTO: require_ack = 1; break; default: @@ -9193,8 +9215,8 @@ static ngtcp2_ssize conn_recv_pkt(ngtcp2_conn *conn, const ngtcp2_path *path, break; default: ngtcp2_log_rx_pkt_hd(&conn->log, &hd); - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_PKT, - "packet type 0x%02x was ignored", hd.type); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_PKT, + "packet type 0x%02x was ignored", hd.type); return (ngtcp2_ssize)pktlen; } } else { @@ -9241,8 +9263,8 @@ static ngtcp2_ssize conn_recv_pkt(ngtcp2_conn *conn, const ngtcp2_path *path, hd.pkt_num = ngtcp2_pkt_adjust_pkt_num(pktns->acktr.max_pkt_num, hd.pkt_num, hd.pkt_numlen); if (hd.pkt_num > NGTCP2_MAX_PKT_NUM) { - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_PKT, - "pkn=%" PRId64 " is greater than maximum pkn", hd.pkt_num); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_PKT, + "pkn=%" PRId64 " is greater than maximum pkn", hd.pkt_num); return NGTCP2_ERR_DISCARD_PKT; } @@ -9253,7 +9275,7 @@ static ngtcp2_ssize conn_recv_pkt(ngtcp2_conn *conn, const ngtcp2_path *path, conn->rx.preferred_addr.pkt_num < hd.pkt_num && ngtcp2_sockaddr_eq((const ngtcp2_sockaddr *)&conn->hs_local_addr, path->local.addr)) { - ngtcp2_log_info( + ngtcp2_log_infof( &conn->log, NGTCP2_LOG_EVENT_PKT, "pkt=%" PRId64 " is discarded because it was received on handshake local " @@ -9545,6 +9567,7 @@ static ngtcp2_ssize conn_recv_pkt(ngtcp2_conn *conn, const ngtcp2_path *path, } break; case NGTCP2_FRAME_PING: + ++conn->cstat.ping_recv; non_probing_pkt = 1; break; case NGTCP2_FRAME_PATH_CHALLENGE: @@ -9743,6 +9766,7 @@ static int conn_process_buffered_protected_pkt(ngtcp2_conn *conn, *ppc = next; if (nread < 0) { if (nread == NGTCP2_ERR_DISCARD_PKT) { + ++conn->cstat.pkt_discarded; continue; } return (int)nread; @@ -9777,6 +9801,7 @@ static int conn_process_buffered_handshake_pkt(ngtcp2_conn *conn, *ppc = next; if (nread < 0) { if (nread == NGTCP2_ERR_DISCARD_PKT) { + ++conn->cstat.pkt_discarded; continue; } return (int)nread; @@ -9922,6 +9947,7 @@ static int conn_recv_cpkt(ngtcp2_conn *conn, const ngtcp2_path *path, } } if (nread == NGTCP2_ERR_DISCARD_PKT) { + ++conn->cstat.pkt_discarded; return 0; } return (int)nread; @@ -9931,8 +9957,11 @@ static int conn_recv_cpkt(ngtcp2_conn *conn, const ngtcp2_path *path, pkt += nread; pktlen -= (size_t)nread; - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_PKT, - "read packet %td left %zu", nread, pktlen); + ++conn->cstat.pkt_recv; + conn->cstat.bytes_recv += (uint64_t)nread; + + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_PKT, + "read packet %td left %zu", nread, pktlen); } return 0; @@ -10104,9 +10133,9 @@ static ngtcp2_ssize conn_read_handshake(ngtcp2_conn *conn, if ((size_t)nread < pktlen) { /* We have 1RTT packet and application rx key, but the handshake has not completed yet. */ - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON, - "buffering 1RTT packet len=%zu", - pktlen - (size_t)nread); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_CON, + "buffering 1RTT packet len=%zu", + pktlen - (size_t)nread); rv = conn_buffer_pkt(conn, &conn->pktns, path, pi, pkt + nread, pktlen - (size_t)nread, pktlen, ts); @@ -10185,8 +10214,8 @@ int ngtcp2_conn_read_pkt_versioned(ngtcp2_conn *conn, const ngtcp2_path *path, conn_update_timestamp(conn, ts); - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON, "recv packet len=%zu", - pktlen); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_CON, "recv packet len=%zu", + pktlen); if (pktlen == 0) { return 0; @@ -10198,6 +10227,8 @@ int ngtcp2_conn_read_pkt_versioned(ngtcp2_conn *conn, const ngtcp2_path *path, !ngtcp2_dcidtr_check_path_retired(&conn->dcid.dtr, path)) { ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON, "ignore packet from unknown path"); + ++conn->cstat.pkt_discarded; + return 0; } @@ -11516,9 +11547,9 @@ int ngtcp2_conn_set_remote_transport_params( conn->local.transport_params.version_info.chosen_version = conn->negotiated_version; - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON, - "the negotiated version is 0x%08x", - conn->negotiated_version); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_CON, + "the negotiated version is 0x%08x", + conn->negotiated_version); } else { rv = conn_client_validate_transport_params(conn, params); if (rv != 0) { @@ -12306,9 +12337,9 @@ ngtcp2_ssize ngtcp2_conn_write_vmsg(ngtcp2_conn *conn, ngtcp2_path *path, } if (conn->pktns.rtb.probe_pkt_left) { - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_CON, - "transmit probe pkt left=%zu", - conn->pktns.rtb.probe_pkt_left); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_CON, + "transmit probe pkt left=%zu", + conn->pktns.rtb.probe_pkt_left); nwrite = conn_write_pkt(conn, pi, dest, destlen, (size_t)res, vmsg, NGTCP2_PKT_1RTT, wflags, ts); @@ -13011,7 +13042,7 @@ int ngtcp2_conn_update_rtt(ngtcp2_conn *conn, ngtcp2_duration rtt, rtt < cstat->min_rtt + ack_delay) { /* Ignore RTT sample if adjusting ack_delay causes the sample less than min_rtt before handshake confirmation. */ - ngtcp2_log_info( + ngtcp2_log_infof( &conn->log, NGTCP2_LOG_EVENT_LDC, "ignore rtt sample because ack_delay is too large latest_rtt=%" PRIu64 " min_rtt=%" PRIu64 " ack_delay=%" PRIu64, @@ -13034,7 +13065,7 @@ int ngtcp2_conn_update_rtt(ngtcp2_conn *conn, ngtcp2_duration rtt, cstat->smoothed_rtt = (cstat->smoothed_rtt * 7 + rtt) / 8; } - ngtcp2_log_info( + ngtcp2_log_infof( &conn->log, NGTCP2_LOG_EVENT_LDC, "latest_rtt=%" PRIu64 " min_rtt=%" PRIu64 " smoothed_rtt=%" PRIu64 " rttvar=%" PRIu64 " ack_delay=%" PRIu64, @@ -13049,16 +13080,7 @@ int ngtcp2_conn_update_rtt(ngtcp2_conn *conn, ngtcp2_duration rtt, void ngtcp2_conn_get_conn_info_versioned(ngtcp2_conn *conn, int conn_info_version, ngtcp2_conn_info *cinfo) { - const ngtcp2_conn_stat *cstat = &conn->cstat; - (void)conn_info_version; - - cinfo->latest_rtt = cstat->latest_rtt; - cinfo->min_rtt = cstat->min_rtt; - cinfo->smoothed_rtt = cstat->smoothed_rtt; - cinfo->rttvar = cstat->rttvar; - cinfo->cwnd = cstat->cwnd; - cinfo->ssthresh = cstat->ssthresh; - cinfo->bytes_in_flight = cstat->bytes_in_flight; + ngtcp2_conn_info_init_versioned(conn_info_version, cinfo, &conn->cstat); } static void conn_get_loss_time_and_pktns(ngtcp2_conn *conn, @@ -13140,9 +13162,10 @@ void ngtcp2_conn_set_loss_detection_timer(ngtcp2_conn *conn, ngtcp2_tstamp ts) { if (earliest_loss_time != UINT64_MAX) { cstat->loss_detection_timer = earliest_loss_time; - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_LDC, - "loss_detection_timer=%" PRIu64 " nonzero crypto loss time", - cstat->loss_detection_timer); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_LDC, + "loss_detection_timer=%" PRIu64 + " nonzero crypto loss time", + cstat->loss_detection_timer); return; } @@ -13166,9 +13189,9 @@ void ngtcp2_conn_set_loss_detection_timer(ngtcp2_conn *conn, ngtcp2_tstamp ts) { timeout = cstat->loss_detection_timer > ts ? cstat->loss_detection_timer - ts : 0; - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_LDC, - "loss_detection_timer=%" PRIu64 " timeout=%" PRIu64, - cstat->loss_detection_timer, timeout / NGTCP2_MILLISECONDS); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_LDC, + "loss_detection_timer=%" PRIu64 " timeout=%" PRIu64, + cstat->loss_detection_timer, timeout / NGTCP2_MILLISECONDS); } void ngtcp2_conn_cancel_loss_detection_timer(ngtcp2_conn *conn) { @@ -13240,8 +13263,8 @@ int ngtcp2_conn_on_loss_detection_timer(ngtcp2_conn *conn, ngtcp2_tstamp ts) { ++cstat->pto_count; - ngtcp2_log_info(&conn->log, NGTCP2_LOG_EVENT_LDC, "pto_count=%zu", - cstat->pto_count); + ngtcp2_log_infof(&conn->log, NGTCP2_LOG_EVENT_LDC, "pto_count=%zu", + cstat->pto_count); ngtcp2_conn_set_loss_detection_timer(conn, ts); @@ -13967,6 +13990,10 @@ ngtcp2_ssize ngtcp2_conn_write_aggregate_pkt_versioned( return nwrite; } +ngtcp2_tstamp ngtcp2_conn_get_timestamp(const ngtcp2_conn *conn) { + return conn->log.last_ts; +} + const ngtcp2_path_history_entry * ngtcp2_conn_find_path_history(ngtcp2_conn *conn, const ngtcp2_path *path, ngtcp2_tstamp ts) { diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_conn.h b/contrib/libs/ngtcp2/lib/ngtcp2_conn.h index 2d607d379fc..30a44e72664 100644 --- a/contrib/libs/ngtcp2/lib/ngtcp2_conn.h +++ b/contrib/libs/ngtcp2/lib/ngtcp2_conn.h @@ -77,10 +77,6 @@ typedef enum { unreceived data. */ #define NGTCP2_MAX_REORDERED_CRYPTO_DATA 65536 -/* NGTCP2_MAX_RETRIES is the number of Retry packet which client can - accept. */ -#define NGTCP2_MAX_RETRIES 3 - /* NGTCP2_MAX_SCID_POOL_SIZE is the maximum number of source connection ID the local endpoint provides to the remote endpoint. The chosen value was described in old draft. Now a remote endpoint diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_conn_info.c b/contrib/libs/ngtcp2/lib/ngtcp2_conn_info.c new file mode 100644 index 00000000000..84bb8820f50 --- /dev/null +++ b/contrib/libs/ngtcp2/lib/ngtcp2_conn_info.c @@ -0,0 +1,50 @@ +/* + * ngtcp2 + * + * Copyright (c) 2025 ngtcp2 contributors + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include "ngtcp2_conn_info.h" +#include "ngtcp2_conn_stat.h" + +void ngtcp2_conn_info_init_versioned(int conn_info_version, + ngtcp2_conn_info *cinfo, + const ngtcp2_conn_stat *cstat) { + cinfo->latest_rtt = cstat->latest_rtt; + cinfo->min_rtt = cstat->min_rtt; + cinfo->smoothed_rtt = cstat->smoothed_rtt; + cinfo->rttvar = cstat->rttvar; + cinfo->cwnd = cstat->cwnd; + cinfo->ssthresh = cstat->ssthresh; + cinfo->bytes_in_flight = cstat->bytes_in_flight; + + switch (conn_info_version) { + case NGTCP2_CONN_INFO_V2: + cinfo->pkt_sent = cstat->pkt_sent; + cinfo->bytes_sent = cstat->bytes_sent; + cinfo->pkt_recv = cstat->pkt_recv; + cinfo->bytes_recv = cstat->bytes_recv; + cinfo->pkt_lost = cstat->pkt_lost; + cinfo->bytes_lost = cstat->bytes_lost; + cinfo->ping_recv = cstat->ping_recv; + cinfo->pkt_discarded = cstat->pkt_discarded; + } +} diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_conn_info.h b/contrib/libs/ngtcp2/lib/ngtcp2_conn_info.h new file mode 100644 index 00000000000..161309df304 --- /dev/null +++ b/contrib/libs/ngtcp2/lib/ngtcp2_conn_info.h @@ -0,0 +1,45 @@ +/* + * ngtcp2 + * + * Copyright (c) 2025 ngtcp2 contributors + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#ifndef NGTCP2_CONN_INFO_H +#define NGTCP2_CONN_INFO_H + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif /* defined(HAVE_CONFIG_H) */ + +#include <ngtcp2/ngtcp2.h> + +typedef struct ngtcp2_conn_stat ngtcp2_conn_stat; + +/* + * ngtcp2_conn_info_init_versioned initializes |cinfo| of version + * |conn_info_version| from |cstat|. This function only fills the + * fields of |cinfo| that are available in the specified version. + */ +void ngtcp2_conn_info_init_versioned(int conn_info_version, + ngtcp2_conn_info *cinfo, + const ngtcp2_conn_stat *cstat); + +#endif /* !defined(NGTCP2_CONN_INFO_H) */ diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_conn_stat.h b/contrib/libs/ngtcp2/lib/ngtcp2_conn_stat.h index be041b90860..b5fea473910 100644 --- a/contrib/libs/ngtcp2/lib/ngtcp2_conn_stat.h +++ b/contrib/libs/ngtcp2/lib/ngtcp2_conn_stat.h @@ -31,6 +31,8 @@ #include <ngtcp2/ngtcp2.h> +#include "ngtcp2_pktns_id.h" + /** * @struct * @@ -128,6 +130,43 @@ typedef struct ngtcp2_conn_stat { * scheduled and transmitted together. */ size_t send_quantum; + /* + * pkt_sent is the number of QUIC packets sent. + */ + uint64_t pkt_sent; + /* + * bytes_sent is the number of bytes (the sum of QUIC packet length) + * sent. + */ + uint64_t bytes_sent; + /* + * pkt_recv is the number of QUIC packets received, excluding + * discarded ones. + */ + uint64_t pkt_recv; + /* + * bytes_recv is the number of bytes (the sum of QUIC packet length) + * received, excluding discarded ones. + */ + uint64_t bytes_recv; + /* + * pkt_lost is the number of QUIC packets that are considered lost, + * excluding PMTUD packets. + */ + uint64_t pkt_lost; + /* + * bytes_lost is the number of bytes (the sum of QUIC packet length) + * lost, excluding PMTUD packets. + */ + uint64_t bytes_lost; + /* + * ping_recv is the number of PING frames received. + */ + uint64_t ping_recv; + /* + * pkt_discarded is the number of QUIC packets discarded. + */ + uint64_t pkt_discarded; } ngtcp2_conn_stat; #endif /* !defined(NGTCP2_CONN_STAT_H) */ diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_log.c b/contrib/libs/ngtcp2/lib/ngtcp2_log.c index e006c22e4e7..5c31f44a734 100644 --- a/contrib/libs/ngtcp2/lib/ngtcp2_log.c +++ b/contrib/libs/ngtcp2/lib/ngtcp2_log.c @@ -90,23 +90,10 @@ void ngtcp2_log_init(ngtcp2_log *log, const ngtcp2_cid *scid, * Frame type in hex string. */ -#define NGTCP2_LOG_BUFLEN 4096 +#define NGTCP2_LOG_PKT "%s %" PRId64 " %s" +#define NGTCP2_LOG_TP "remote transport_parameters" -/* TODO Split second and remaining fraction with comma */ -#define NGTCP2_LOG_HD "I%08" PRIu64 " 0x%s %s" -#define NGTCP2_LOG_PKT NGTCP2_LOG_HD " %s %" PRId64 " %s" -#define NGTCP2_LOG_TP NGTCP2_LOG_HD " remote transport_parameters" - -#define NGTCP2_LOG_FRM_HD_FIELDS(DIR) \ - timestamp_cast(log->last_ts - log->ts), (const char *)log->scid, "frm", \ - (DIR), hd->pkt_num, strpkttype(hd) - -#define NGTCP2_LOG_PKT_HD_FIELDS(DIR) \ - timestamp_cast(log->last_ts - log->ts), (const char *)log->scid, "pkt", \ - (DIR), hd->pkt_num, strpkttype(hd) - -#define NGTCP2_LOG_TP_HD_FIELDS \ - timestamp_cast(log->last_ts - log->ts), (const char *)log->scid, "cry" +#define NGTCP2_LOG_PKT_HD_FIELDS(DIR) (DIR), hd->pkt_num, strpkttype(hd) static const char *strerrorcode(uint64_t error_code) { switch (error_code) { @@ -188,45 +175,19 @@ static const char *strpkttype(const ngtcp2_pkt_hd *hd) { } static const char *strpkttype_type_flags(uint8_t type, uint8_t flags) { - ngtcp2_pkt_hd hd = {0}; - - hd.type = type; - hd.flags = flags; - - return strpkttype(&hd); + return strpkttype(&(ngtcp2_pkt_hd){ + .type = type, + .flags = flags, + }); } -static const char *strevent(ngtcp2_log_event ev) { - switch (ev) { - case NGTCP2_LOG_EVENT_CON: - return "con"; - case NGTCP2_LOG_EVENT_PKT: - return "pkt"; - case NGTCP2_LOG_EVENT_FRM: - return "frm"; - case NGTCP2_LOG_EVENT_LDC: - return "ldc"; - case NGTCP2_LOG_EVENT_CRY: - return "cry"; - case NGTCP2_LOG_EVENT_PTV: - return "ptv"; - case NGTCP2_LOG_EVENT_CCA: - return "cca"; - case NGTCP2_LOG_EVENT_NONE: - default: - return "non"; - } -} - -static uint64_t timestamp_cast(uint64_t ns) { return ns / NGTCP2_MILLISECONDS; } - static void log_fr_stream(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_stream *fr, const char *dir) { - log->log_printf( - log->user_data, - (NGTCP2_LOG_PKT " STREAM(0x%02" PRIx64 ") id=0x%" PRIx64 - " fin=%d offset=%" PRIu64 " len=%" PRIu64 " uni=%d"), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type | fr->flags, fr->stream_id, fr->fin, + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " STREAM(0x%02" PRIx64 ") id=0x%" PRIx64 + " fin=%d offset=%" PRIu64 " len=%" PRIu64 " uni=%d", + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type | fr->flags, fr->stream_id, fr->fin, fr->offset, ngtcp2_vec_len(fr->data, fr->datacnt), (fr->stream_id & 0x2) != 0); } @@ -236,58 +197,58 @@ static void log_fr_ack(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, int64_t largest_ack, min_ack; size_t i; - log->log_printf( - log->user_data, - (NGTCP2_LOG_PKT " ACK(0x%02" PRIx64 ") largest_ack=%" PRId64 - " ack_delay=%" PRIu64 "(%" PRIu64 ") ack_range_count=%zu"), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, fr->largest_ack, + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " ACK(0x%02" PRIx64 ") largest_ack=%" PRId64 + " ack_delay=%" PRIu64 "(%" PRIu64 ") ack_range_count=%zu", + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->largest_ack, fr->ack_delay_unscaled / NGTCP2_MILLISECONDS, fr->ack_delay, fr->rangecnt); largest_ack = fr->largest_ack; min_ack = fr->largest_ack - (int64_t)fr->first_ack_range; - log->log_printf(log->user_data, - (NGTCP2_LOG_PKT " ACK(0x%02" PRIx64 ") range=[%" PRId64 - "..%" PRId64 "] len=%" PRIu64), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, largest_ack, min_ack, - fr->first_ack_range); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " ACK(0x%02" PRIx64 ") range=[%" PRId64 + "..%" PRId64 "] len=%" PRIu64, + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, largest_ack, + min_ack, fr->first_ack_range); for (i = 0; i < fr->rangecnt; ++i) { const ngtcp2_ack_range *range = &fr->ranges[i]; largest_ack = min_ack - (int64_t)range->gap - 2; min_ack = largest_ack - (int64_t)range->len; - log->log_printf(log->user_data, - (NGTCP2_LOG_PKT " ACK(0x%02" PRIx64 ") range=[%" PRId64 - "..%" PRId64 "] gap=%" PRIu64 - " len=%" PRIu64), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, largest_ack, - min_ack, range->gap, range->len); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " ACK(0x%02" PRIx64 ") range=[%" PRId64 + "..%" PRId64 "] gap=%" PRIu64 + " len=%" PRIu64, + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, largest_ack, + min_ack, range->gap, range->len); } if (fr->type == NGTCP2_FRAME_ACK_ECN) { - log->log_printf(log->user_data, - (NGTCP2_LOG_PKT " ACK(0x%02" PRIx64 ") ect0=%" PRIu64 - " ect1=%" PRIu64 " ce=%" PRIu64), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, fr->ecn.ect0, - fr->ecn.ect1, fr->ecn.ce); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " ACK(0x%02" PRIx64 ") ect0=%" PRIu64 + " ect1=%" PRIu64 " ce=%" PRIu64, + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->ecn.ect0, + fr->ecn.ect1, fr->ecn.ce); } } static void log_fr_padding(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_padding *fr, const char *dir) { - log->log_printf(log->user_data, - (NGTCP2_LOG_PKT " PADDING(0x%02" PRIx64 ") len=%zu"), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, fr->len); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " PADDING(0x%02" PRIx64 ") len=%zu", + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->len); } static void log_fr_reset_stream(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_reset_stream *fr, const char *dir) { - log->log_printf( - log->user_data, - (NGTCP2_LOG_PKT " RESET_STREAM(0x%02" PRIx64 ") id=0x%" PRIx64 - " app_error_code=%s(0x%" PRIx64 ") final_size=%" PRIu64), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, fr->stream_id, + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " RESET_STREAM(0x%02" PRIx64 ") id=0x%" PRIx64 + " app_error_code=%s(0x%" PRIx64 ") final_size=%" PRIu64, + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->stream_id, strapperrorcode(fr->app_error_code), fr->app_error_code, fr->final_size); } @@ -297,12 +258,12 @@ static void log_fr_connection_close(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, char reason[256]; size_t reasonlen = ngtcp2_min_size(sizeof(reason) - 1, fr->reasonlen); - log->log_printf( - log->user_data, - (NGTCP2_LOG_PKT " CONNECTION_CLOSE(0x%02" PRIx64 - ") error_code=%s(0x%" PRIx64 ") " - "frame_type=%" PRIx64 " reason_len=%zu reason=[%s]"), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " CONNECTION_CLOSE(0x%02" PRIx64 ") error_code=%s(0x%" PRIx64 + ") " + "frame_type=%" PRIx64 " reason_len=%zu reason=[%s]", + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->type == NGTCP2_FRAME_CONNECTION_CLOSE ? strerrorcode(fr->error_code) : strapperrorcode(fr->error_code), fr->error_code, fr->frame_type, fr->reasonlen, @@ -311,63 +272,64 @@ static void log_fr_connection_close(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, static void log_fr_max_data(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_max_data *fr, const char *dir) { - log->log_printf( - log->user_data, - (NGTCP2_LOG_PKT " MAX_DATA(0x%02" PRIx64 ") max_data=%" PRIu64), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, fr->max_data); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " MAX_DATA(0x%02" PRIx64 + ") max_data=%" PRIu64, + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->max_data); } static void log_fr_max_stream_data(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_max_stream_data *fr, const char *dir) { - log->log_printf(log->user_data, - (NGTCP2_LOG_PKT " MAX_STREAM_DATA(0x%02" PRIx64 - ") id=0x%" PRIx64 - " max_stream_data=%" PRIu64), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, fr->stream_id, - fr->max_stream_data); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " MAX_STREAM_DATA(0x%02" PRIx64 + ") id=0x%" PRIx64 + " max_stream_data=%" PRIu64, + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->stream_id, + fr->max_stream_data); } static void log_fr_max_streams(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_max_streams *fr, const char *dir) { - log->log_printf( - log->user_data, - (NGTCP2_LOG_PKT " MAX_STREAMS(0x%02" PRIx64 ") max_streams=%" PRIu64), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, fr->max_streams); + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " MAX_STREAMS(0x%02" PRIx64 ") max_streams=%" PRIu64, + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->max_streams); } static void log_fr_ping(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_ping *fr, const char *dir) { - log->log_printf(log->user_data, (NGTCP2_LOG_PKT " PING(0x%02" PRIx64 ")"), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " PING(0x%02" PRIx64 ")", + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type); } static void log_fr_data_blocked(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_data_blocked *fr, const char *dir) { - log->log_printf( - log->user_data, - (NGTCP2_LOG_PKT " DATA_BLOCKED(0x%02" PRIx64 ") offset=%" PRIu64), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, fr->offset); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " DATA_BLOCKED(0x%02" PRIx64 + ") offset=%" PRIu64, + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->offset); } static void log_fr_stream_data_blocked(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_stream_data_blocked *fr, const char *dir) { - log->log_printf(log->user_data, - (NGTCP2_LOG_PKT " STREAM_DATA_BLOCKED(0x%02" PRIx64 - ") id=0x%" PRIx64 " offset=%" PRIu64), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, fr->stream_id, - fr->offset); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " STREAM_DATA_BLOCKED(0x%02" PRIx64 + ") id=0x%" PRIx64 " offset=%" PRIu64, + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->stream_id, + fr->offset); } static void log_fr_streams_blocked(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_streams_blocked *fr, const char *dir) { - log->log_printf( - log->user_data, - (NGTCP2_LOG_PKT " STREAMS_BLOCKED(0x%02" PRIx64 ") max_streams=%" PRIu64), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, fr->max_streams); + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " STREAMS_BLOCKED(0x%02" PRIx64 ") max_streams=%" PRIu64, + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->max_streams); } static void log_fr_new_connection_id(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, @@ -376,12 +338,12 @@ static void log_fr_new_connection_id(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, uint8_t buf[sizeof(fr->stateless_reset_token) * 2 + 1]; uint8_t cid[sizeof(fr->cid.data) * 2 + 1]; - log->log_printf( - log->user_data, - (NGTCP2_LOG_PKT " NEW_CONNECTION_ID(0x%02" PRIx64 ") seq=%" PRIu64 - " cid=0x%s retire_prior_to=%" PRIu64 - " stateless_reset_token=0x%s"), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, fr->seq, + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " NEW_CONNECTION_ID(0x%02" PRIx64 ") seq=%" PRIu64 + " cid=0x%s retire_prior_to=%" PRIu64 + " stateless_reset_token=0x%s", + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->seq, (const char *)ngtcp2_encode_hex(cid, fr->cid.data, fr->cid.datalen), fr->retire_prior_to, (const char *)ngtcp2_encode_hex(buf, fr->stateless_reset_token, @@ -391,11 +353,12 @@ static void log_fr_new_connection_id(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, static void log_fr_stop_sending(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_stop_sending *fr, const char *dir) { - log->log_printf(log->user_data, - (NGTCP2_LOG_PKT " STOP_SENDING(0x%02" PRIx64 ") id=0x%" PRIx64 - " app_error_code=%s(0x%" PRIx64 ")"), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, fr->stream_id, - strapperrorcode(fr->app_error_code), fr->app_error_code); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " STOP_SENDING(0x%02" PRIx64 + ") id=0x%" PRIx64 + " app_error_code=%s(0x%" PRIx64 ")", + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->stream_id, + strapperrorcode(fr->app_error_code), fr->app_error_code); } static void log_fr_path_challenge(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, @@ -403,10 +366,10 @@ static void log_fr_path_challenge(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const char *dir) { uint8_t buf[sizeof(fr->data) * 2 + 1]; - log->log_printf( - log->user_data, - (NGTCP2_LOG_PKT " PATH_CHALLENGE(0x%02" PRIx64 ") data=0x%s"), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " PATH_CHALLENGE(0x%02" PRIx64 ") data=0x%s", + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, (const char *)ngtcp2_encode_hex(buf, fr->data, sizeof(fr->data))); } @@ -415,20 +378,20 @@ static void log_fr_path_response(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const char *dir) { uint8_t buf[sizeof(fr->data) * 2 + 1]; - log->log_printf( - log->user_data, - (NGTCP2_LOG_PKT " PATH_RESPONSE(0x%02" PRIx64 ") data=0x%s"), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " PATH_RESPONSE(0x%02" PRIx64 ") data=0x%s", + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, (const char *)ngtcp2_encode_hex(buf, fr->data, sizeof(fr->data))); } static void log_fr_crypto(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_stream *fr, const char *dir) { - log->log_printf( - log->user_data, - (NGTCP2_LOG_PKT " CRYPTO(0x%02" PRIx64 ") offset=%" PRIu64 " len=%" PRIu64), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, fr->offset, - ngtcp2_vec_len(fr->data, fr->datacnt)); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " CRYPTO(0x%02" PRIx64 ") offset=%" PRIu64 + " len=%" PRIu64, + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->offset, + ngtcp2_vec_len(fr->data, fr->datacnt)); } static void log_fr_new_token(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, @@ -445,36 +408,37 @@ static void log_fr_new_token(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, } else { p = ngtcp2_encode_hex(buf, fr->token, fr->tokenlen); } - log->log_printf( - log->user_data, - (NGTCP2_LOG_PKT " NEW_TOKEN(0x%02" PRIx64 ") token=0x%s len=%zu"), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, (const char *)p, fr->tokenlen); + + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " NEW_TOKEN(0x%02" PRIx64 ") token=0x%s len=%zu", + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, (const char *)p, fr->tokenlen); } static void log_fr_retire_connection_id(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_retire_connection_id *fr, const char *dir) { - log->log_printf( - log->user_data, - (NGTCP2_LOG_PKT " RETIRE_CONNECTION_ID(0x%02" PRIx64 ") seq=%" PRIu64), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, fr->seq); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " RETIRE_CONNECTION_ID(0x%02" PRIx64 + ") seq=%" PRIu64, + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, fr->seq); } static void log_fr_handshake_done(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_handshake_done *fr, const char *dir) { - log->log_printf(log->user_data, - (NGTCP2_LOG_PKT " HANDSHAKE_DONE(0x%02" PRIx64 ")"), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " HANDSHAKE_DONE(0x%02" PRIx64 ")", + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type); } static void log_fr_datagram(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, const ngtcp2_datagram *fr, const char *dir) { - log->log_printf(log->user_data, - (NGTCP2_LOG_PKT " DATAGRAM(0x%02" PRIx64 ") len=%" PRIu64), - NGTCP2_LOG_FRM_HD_FIELDS(dir), fr->type, - ngtcp2_vec_len(fr->data, fr->datacnt)); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_FRM, + NGTCP2_LOG_PKT " DATAGRAM(0x%02" PRIx64 ") len=%" PRIu64, + NGTCP2_LOG_PKT_HD_FIELDS(dir), fr->type, + ngtcp2_vec_len(fr->data, fr->datacnt)); } static void log_fr(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, @@ -580,8 +544,8 @@ void ngtcp2_log_rx_vn(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, } for (i = 0; i < nsv; ++i) { - log->log_printf(log->user_data, (NGTCP2_LOG_PKT " v=0x%08x"), - NGTCP2_LOG_PKT_HD_FIELDS("rx"), sv[i]); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_PKT, NGTCP2_LOG_PKT " v=0x%08x", + NGTCP2_LOG_PKT_HD_FIELDS("rx"), sv[i]); } } @@ -598,8 +562,8 @@ void ngtcp2_log_rx_sr(ngtcp2_log *log, const ngtcp2_pkt_stateless_reset *sr) { .type = NGTCP2_PKT_STATELESS_RESET, }; - log->log_printf( - log->user_data, (NGTCP2_LOG_PKT " token=0x%s randlen=%zu"), + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_PKT, NGTCP2_LOG_PKT " token=0x%s randlen=%zu", NGTCP2_LOG_PKT_HD_FIELDS("rx"), (const char *)ngtcp2_encode_hex(buf, sr->stateless_reset_token, sizeof(sr->stateless_reset_token)), @@ -622,9 +586,8 @@ void ngtcp2_log_remote_tp(ngtcp2_log *log, } if (params->stateless_reset_token_present) { - log->log_printf( - log->user_data, (NGTCP2_LOG_TP " stateless_reset_token=0x%s"), - NGTCP2_LOG_TP_HD_FIELDS, + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_CRY, NGTCP2_LOG_TP " stateless_reset_token=0x%s", (const char *)ngtcp2_encode_hex(token, params->stateless_reset_token, sizeof(params->stateless_reset_token))); } @@ -633,116 +596,113 @@ void ngtcp2_log_remote_tp(ngtcp2_log *log, if (params->preferred_addr.ipv4_present) { sa_in = ¶ms->preferred_addr.ipv4; - log->log_printf(log->user_data, - (NGTCP2_LOG_TP " preferred_address.ipv4_addr=%s"), - NGTCP2_LOG_TP_HD_FIELDS, - (const char *)ngtcp2_encode_ipv4( - addr, (const uint8_t *)&sa_in->sin_addr)); - log->log_printf(log->user_data, - (NGTCP2_LOG_TP " preferred_address.ipv4_port=%u"), - NGTCP2_LOG_TP_HD_FIELDS, ngtcp2_ntohs(sa_in->sin_port)); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " preferred_address.ipv4_addr=%s", + (const char *)ngtcp2_encode_ipv4( + addr, (const uint8_t *)&sa_in->sin_addr)); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " preferred_address.ipv4_port=%u", + ngtcp2_ntohs(sa_in->sin_port)); } if (params->preferred_addr.ipv6_present) { sa_in6 = ¶ms->preferred_addr.ipv6; - log->log_printf(log->user_data, - (NGTCP2_LOG_TP " preferred_address.ipv6_addr=%s"), - NGTCP2_LOG_TP_HD_FIELDS, - (const char *)ngtcp2_encode_ipv6( - addr, (const uint8_t *)&sa_in6->sin6_addr)); - log->log_printf(log->user_data, - (NGTCP2_LOG_TP " preferred_address.ipv6_port=%u"), - NGTCP2_LOG_TP_HD_FIELDS, ngtcp2_ntohs(sa_in6->sin6_port)); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " preferred_address.ipv6_addr=%s", + (const char *)ngtcp2_encode_ipv6( + addr, (const uint8_t *)&sa_in6->sin6_addr)); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " preferred_address.ipv6_port=%u", + ngtcp2_ntohs(sa_in6->sin6_port)); } - log->log_printf( - log->user_data, (NGTCP2_LOG_TP " preferred_address.cid=0x%s"), - NGTCP2_LOG_TP_HD_FIELDS, + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_CRY, NGTCP2_LOG_TP " preferred_address.cid=0x%s", (const char *)ngtcp2_encode_hex(cid, params->preferred_addr.cid.data, params->preferred_addr.cid.datalen)); - log->log_printf( - log->user_data, - (NGTCP2_LOG_TP " preferred_address.stateless_reset_token=0x%s"), - NGTCP2_LOG_TP_HD_FIELDS, + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " preferred_address.stateless_reset_token=0x%s", (const char *)ngtcp2_encode_hex( token, params->preferred_addr.stateless_reset_token, sizeof(params->preferred_addr.stateless_reset_token))); } if (params->original_dcid_present) { - log->log_printf( - log->user_data, - (NGTCP2_LOG_TP " original_destination_connection_id=0x%s"), - NGTCP2_LOG_TP_HD_FIELDS, + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " original_destination_connection_id=0x%s", (const char *)ngtcp2_encode_hex(cid, params->original_dcid.data, params->original_dcid.datalen)); } if (params->retry_scid_present) { - log->log_printf( - log->user_data, (NGTCP2_LOG_TP " retry_source_connection_id=0x%s"), - NGTCP2_LOG_TP_HD_FIELDS, + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " retry_source_connection_id=0x%s", (const char *)ngtcp2_encode_hex(cid, params->retry_scid.data, params->retry_scid.datalen)); } if (params->initial_scid_present) { - log->log_printf( - log->user_data, (NGTCP2_LOG_TP " initial_source_connection_id=0x%s"), - NGTCP2_LOG_TP_HD_FIELDS, + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " initial_source_connection_id=0x%s", (const char *)ngtcp2_encode_hex(cid, params->initial_scid.data, params->initial_scid.datalen)); } - log->log_printf( - log->user_data, - (NGTCP2_LOG_TP " initial_max_stream_data_bidi_local=%" PRIu64), - NGTCP2_LOG_TP_HD_FIELDS, params->initial_max_stream_data_bidi_local); - log->log_printf( - log->user_data, - (NGTCP2_LOG_TP " initial_max_stream_data_bidi_remote=%" PRIu64), - NGTCP2_LOG_TP_HD_FIELDS, params->initial_max_stream_data_bidi_remote); - log->log_printf(log->user_data, - (NGTCP2_LOG_TP " initial_max_stream_data_uni=%" PRIu64), - NGTCP2_LOG_TP_HD_FIELDS, params->initial_max_stream_data_uni); - log->log_printf(log->user_data, (NGTCP2_LOG_TP " initial_max_data=%" PRIu64), - NGTCP2_LOG_TP_HD_FIELDS, params->initial_max_data); - log->log_printf(log->user_data, - (NGTCP2_LOG_TP " initial_max_streams_bidi=%" PRIu64), - NGTCP2_LOG_TP_HD_FIELDS, params->initial_max_streams_bidi); - log->log_printf(log->user_data, - (NGTCP2_LOG_TP " initial_max_streams_uni=%" PRIu64), - NGTCP2_LOG_TP_HD_FIELDS, params->initial_max_streams_uni); - log->log_printf(log->user_data, (NGTCP2_LOG_TP " max_idle_timeout=%" PRIu64), - NGTCP2_LOG_TP_HD_FIELDS, - params->max_idle_timeout / NGTCP2_MILLISECONDS); - log->log_printf(log->user_data, - (NGTCP2_LOG_TP " max_udp_payload_size=%" PRIu64), - NGTCP2_LOG_TP_HD_FIELDS, params->max_udp_payload_size); - log->log_printf(log->user_data, - (NGTCP2_LOG_TP " ack_delay_exponent=%" PRIu64), - NGTCP2_LOG_TP_HD_FIELDS, params->ack_delay_exponent); - log->log_printf(log->user_data, (NGTCP2_LOG_TP " max_ack_delay=%" PRIu64), - NGTCP2_LOG_TP_HD_FIELDS, - params->max_ack_delay / NGTCP2_MILLISECONDS); - log->log_printf(log->user_data, - (NGTCP2_LOG_TP " active_connection_id_limit=%" PRIu64), - NGTCP2_LOG_TP_HD_FIELDS, params->active_connection_id_limit); - log->log_printf(log->user_data, - (NGTCP2_LOG_TP " disable_active_migration=%d"), - NGTCP2_LOG_TP_HD_FIELDS, params->disable_active_migration); - log->log_printf(log->user_data, - (NGTCP2_LOG_TP " max_datagram_frame_size=%" PRIu64), - NGTCP2_LOG_TP_HD_FIELDS, params->max_datagram_frame_size); - log->log_printf(log->user_data, (NGTCP2_LOG_TP " grease_quic_bit=%d"), - NGTCP2_LOG_TP_HD_FIELDS, params->grease_quic_bit); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP + " initial_max_stream_data_bidi_local=%" PRIu64, + params->initial_max_stream_data_bidi_local); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP + " initial_max_stream_data_bidi_remote=%" PRIu64, + params->initial_max_stream_data_bidi_remote); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " initial_max_stream_data_uni=%" PRIu64, + params->initial_max_stream_data_uni); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " initial_max_data=%" PRIu64, + params->initial_max_data); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " initial_max_streams_bidi=%" PRIu64, + params->initial_max_streams_bidi); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " initial_max_streams_uni=%" PRIu64, + params->initial_max_streams_uni); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " max_idle_timeout=%" PRIu64, + params->max_idle_timeout / NGTCP2_MILLISECONDS); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " max_udp_payload_size=%" PRIu64, + params->max_udp_payload_size); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " ack_delay_exponent=%" PRIu64, + params->ack_delay_exponent); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " max_ack_delay=%" PRIu64, + params->max_ack_delay / NGTCP2_MILLISECONDS); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " active_connection_id_limit=%" PRIu64, + params->active_connection_id_limit); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " disable_active_migration=%d", + params->disable_active_migration); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " max_datagram_frame_size=%" PRIu64, + params->max_datagram_frame_size); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " grease_quic_bit=%d", + params->grease_quic_bit); if (params->version_info_present) { - log->log_printf( - log->user_data, - (NGTCP2_LOG_TP " version_information.chosen_version=0x%08x"), - NGTCP2_LOG_TP_HD_FIELDS, params->version_info.chosen_version); + ngtcp2_log_infof_raw(log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP + " version_information.chosen_version=0x%08x", + params->version_info.chosen_version); assert(!(params->version_info.available_versionslen & 0x3)); @@ -751,10 +711,10 @@ void ngtcp2_log_remote_tp(ngtcp2_log *log, i += sizeof(uint32_t)) { p = ngtcp2_get_uint32be(&version, p); - log->log_printf( - log->user_data, - (NGTCP2_LOG_TP " version_information.available_versions[%zu]=0x%08x"), - NGTCP2_LOG_TP_HD_FIELDS, i >> 2, version); + ngtcp2_log_infof_raw( + log, NGTCP2_LOG_EVENT_CRY, + NGTCP2_LOG_TP " version_information.available_versions[%zu]=0x%08x", + i >> 2, version); } } } @@ -765,9 +725,9 @@ void ngtcp2_log_pkt_lost(ngtcp2_log *log, int64_t pkt_num, uint8_t type, return; } - ngtcp2_log_info(log, NGTCP2_LOG_EVENT_LDC, - "pkn=%" PRId64 " lost type=%s sent_ts=%" PRIu64, pkt_num, - strpkttype_type_flags(type, flags), sent_ts); + ngtcp2_log_infof(log, NGTCP2_LOG_EVENT_LDC, + "pkn=%" PRId64 " lost type=%s sent_ts=%" PRIu64, pkt_num, + strpkttype_type_flags(type, flags), sent_ts); } static void log_pkt_hd(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, @@ -780,13 +740,13 @@ static void log_pkt_hd(ngtcp2_log *log, const ngtcp2_pkt_hd *hd, } if (hd->type == NGTCP2_PKT_1RTT) { - ngtcp2_log_info( + ngtcp2_log_infof( log, NGTCP2_LOG_EVENT_PKT, "%s pkn=%" PRId64 " dcid=0x%s type=%s k=%d", dir, hd->pkt_num, (const char *)ngtcp2_encode_hex(dcid, hd->dcid.data, hd->dcid.datalen), strpkttype(hd), (hd->flags & NGTCP2_PKT_FLAG_KEY_PHASE) != 0); } else { - ngtcp2_log_info( + ngtcp2_log_infof( log, NGTCP2_LOG_EVENT_PKT, "%s pkn=%" PRId64 " dcid=0x%s scid=0x%s version=0x%08x type=%s len=%zu", dir, hd->pkt_num, @@ -804,31 +764,12 @@ void ngtcp2_log_tx_pkt_hd(ngtcp2_log *log, const ngtcp2_pkt_hd *hd) { log_pkt_hd(log, hd, "tx"); } -void ngtcp2_log_info(ngtcp2_log *log, ngtcp2_log_event ev, const char *fmt, - ...) { - va_list ap; - int n; - char buf[NGTCP2_LOG_BUFLEN]; - - if (!log->log_printf || !(log->events & ev)) { - return; - } - - va_start(ap, fmt); - n = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - - if (n < 0 || (size_t)n >= sizeof(buf)) { - return; - } - - log->log_printf(log->user_data, (NGTCP2_LOG_HD " %s"), - timestamp_cast(log->last_ts - log->ts), log->scid, - strevent(ev), buf); +void ngtcp2_log_tx_cancel(ngtcp2_log *log, const ngtcp2_pkt_hd *hd) { + ngtcp2_log_infof(log, NGTCP2_LOG_EVENT_PKT, + "cancel tx pkn=%" PRId64 " type=%s", hd->pkt_num, + strpkttype(hd)); } -void ngtcp2_log_tx_cancel(ngtcp2_log *log, const ngtcp2_pkt_hd *hd) { - ngtcp2_log_info(log, NGTCP2_LOG_EVENT_PKT, - "cancel tx pkn=%" PRId64 " type=%s", hd->pkt_num, - strpkttype(hd)); +uint64_t ngtcp2_log_timestamp(const ngtcp2_log *log) { + return (log->last_ts - log->ts) / NGTCP2_MILLISECONDS; } diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_log.h b/contrib/libs/ngtcp2/lib/ngtcp2_log.h index 13fb81a72e1..707cd3089e5 100644 --- a/contrib/libs/ngtcp2/lib/ngtcp2_log.h +++ b/contrib/libs/ngtcp2/lib/ngtcp2_log.h @@ -121,12 +121,71 @@ void ngtcp2_log_tx_pkt_hd(ngtcp2_log *log, const ngtcp2_pkt_hd *hd); void ngtcp2_log_tx_cancel(ngtcp2_log *log, const ngtcp2_pkt_hd *hd); +#define NGTCP2_LOG_HD "I%08" PRIu64 " 0x%s %s" + +uint64_t ngtcp2_log_timestamp(const ngtcp2_log *log); + +static inline const char *ngtcp2_log_event_str(ngtcp2_log_event ev) { + switch (ev) { + case NGTCP2_LOG_EVENT_CON: + return "con"; + case NGTCP2_LOG_EVENT_PKT: + return "pkt"; + case NGTCP2_LOG_EVENT_FRM: + return "frm"; + case NGTCP2_LOG_EVENT_LDC: + return "ldc"; + case NGTCP2_LOG_EVENT_CRY: + return "cry"; + case NGTCP2_LOG_EVENT_PTV: + return "ptv"; + case NGTCP2_LOG_EVENT_CCA: + return "cca"; + case NGTCP2_LOG_EVENT_NONE: + default: + return "non"; + } +} + +#define ngtcp2_log_infof_raw(LOG, EV, FMT, ...) \ + (LOG)->log_printf((LOG)->user_data, NGTCP2_LOG_HD " " FMT, \ + ngtcp2_log_timestamp(LOG), (LOG)->scid, \ + ngtcp2_log_event_str(EV), __VA_ARGS__); + +/** + * @function + * + * `ngtcp2_log_infof` writes info level log with printf like + * formatting. + */ +#define ngtcp2_log_infof(LOG, EV, FMT, ...) \ + do { \ + if (!(LOG)->log_printf || !((LOG)->events & (EV))) { \ + break; \ + } \ + \ + ngtcp2_log_infof_raw((LOG), (EV), FMT, __VA_ARGS__); \ + } while (0) + +#define ngtcp2_log_info_raw(LOG, EV, FMT) \ + (LOG)->log_printf((LOG)->user_data, NGTCP2_LOG_HD " " FMT, \ + ngtcp2_log_timestamp(LOG), (LOG)->scid, \ + ngtcp2_log_event_str(EV)) + /** * @function * - * `ngtcp2_log_info` writes info level log. + * `ngtcp2_log_info` writes info level log. FMT should not contain + * formatting directive. This function exists to workaround the issue + * that __VA_ARGS__ cannot be empty. */ -void ngtcp2_log_info(ngtcp2_log *log, ngtcp2_log_event ev, const char *fmt, - ...); +#define ngtcp2_log_info(LOG, EV, FMT) \ + do { \ + if (!(LOG)->log_printf || !((LOG)->events & (EV))) { \ + break; \ + } \ + \ + ngtcp2_log_info_raw((LOG), (EV), FMT); \ + } while (0) #endif /* !defined(NGTCP2_LOG_H) */ diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_qlog.c b/contrib/libs/ngtcp2/lib/ngtcp2_qlog.c index c0f920746a4..19667e17dba 100644 --- a/contrib/libs/ngtcp2/lib/ngtcp2_qlog.c +++ b/contrib/libs/ngtcp2/lib/ngtcp2_qlog.c @@ -227,13 +227,11 @@ void ngtcp2_qlog_start(ngtcp2_qlog *qlog, const ngtcp2_cid *odcid, int server) { } void ngtcp2_qlog_end(ngtcp2_qlog *qlog) { - uint8_t buf[1] = {0}; - if (!qlog->write) { return; } - qlog->write(qlog->user_data, NGTCP2_QLOG_WRITE_FLAG_FIN, &buf, 0); + qlog->write(qlog->user_data, NGTCP2_QLOG_WRITE_FLAG_FIN, "", 0); } static ngtcp2_vec vec_pkt_type_initial = ngtcp2_make_vec_lit("initial"); @@ -1095,7 +1093,6 @@ void ngtcp2_qlog_metrics_updated(ngtcp2_qlog *qlog, void ngtcp2_qlog_pkt_lost(ngtcp2_qlog *qlog, ngtcp2_rtb_entry *ent) { uint8_t buf[256]; uint8_t *p = buf; - ngtcp2_pkt_hd hd = {0}; if (!qlog->write) { return; @@ -1107,11 +1104,11 @@ void ngtcp2_qlog_pkt_lost(ngtcp2_qlog *qlog, ngtcp2_rtb_entry *ent) { p = write_verbatim( p, ",\"name\":\"recovery:packet_lost\",\"data\":{\"header\":"); - hd.type = ent->hd.type; - hd.flags = ent->hd.flags; - hd.pkt_num = ent->hd.pkt_num; - - p = write_pkt_hd(p, &hd); + p = write_pkt_hd(p, &(ngtcp2_pkt_hd){ + .pkt_num = ent->hd.pkt_num, + .type = ent->hd.type, + .flags = ent->hd.flags, + }); p = write_verbatim(p, "}}\n"); qlog->write(qlog->user_data, NGTCP2_QLOG_WRITE_FLAG_NONE, buf, @@ -1154,20 +1151,19 @@ void ngtcp2_qlog_stateless_reset_pkt_received( ngtcp2_qlog *qlog, const ngtcp2_pkt_stateless_reset *sr) { uint8_t buf[256]; uint8_t *p = buf; - ngtcp2_pkt_hd hd = {0}; if (!qlog->write) { return; } - hd.type = NGTCP2_PKT_STATELESS_RESET; - *p++ = '\x1e'; *p++ = '{'; p = qlog_write_time(qlog, p); p = write_verbatim( p, ",\"name\":\"transport:packet_received\",\"data\":{\"header\":"); - p = write_pkt_hd(p, &hd); + p = write_pkt_hd(p, &(ngtcp2_pkt_hd){ + .type = NGTCP2_PKT_STATELESS_RESET, + }); *p++ = ','; p = write_pair_hex(p, "stateless_reset_token", sr->stateless_reset_token, NGTCP2_STATELESS_RESET_TOKENLEN); diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_range.c b/contrib/libs/ngtcp2/lib/ngtcp2_range.c index e8989153293..15f393b85d3 100644 --- a/contrib/libs/ngtcp2/lib/ngtcp2_range.c +++ b/contrib/libs/ngtcp2/lib/ngtcp2_range.c @@ -32,12 +32,14 @@ void ngtcp2_range_init(ngtcp2_range *r, uint64_t begin, uint64_t end) { ngtcp2_range ngtcp2_range_intersect(const ngtcp2_range *a, const ngtcp2_range *b) { - ngtcp2_range r = {0}; + ngtcp2_range r; uint64_t begin = ngtcp2_max_uint64(a->begin, b->begin); uint64_t end = ngtcp2_min_uint64(a->end, b->end); if (begin < end) { ngtcp2_range_init(&r, begin, end); + } else { + r = (ngtcp2_range){0}; } return r; diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_ratelim.c b/contrib/libs/ngtcp2/lib/ngtcp2_ratelim.c index efedc3daa76..d13ed9a14aa 100644 --- a/contrib/libs/ngtcp2/lib/ngtcp2_ratelim.c +++ b/contrib/libs/ngtcp2/lib/ngtcp2_ratelim.c @@ -41,7 +41,7 @@ void ngtcp2_ratelim_init(ngtcp2_ratelim *rlim, uint64_t burst, uint64_t rate, /* ratelim_update updates rlim->tokens with the current |ts|. */ static void ratelim_update(ngtcp2_ratelim *rlim, ngtcp2_tstamp ts) { - uint64_t d, gain; + uint64_t d, gain, gps; assert(ts >= rlim->ts); @@ -52,16 +52,23 @@ static void ratelim_update(ngtcp2_ratelim *rlim, ngtcp2_tstamp ts) { d = ts - rlim->ts; rlim->ts = ts; - gain = rlim->rate * d + rlim->carry; + if (rlim->rate > (UINT64_MAX - rlim->carry) / d) { + gain = UINT64_MAX; + } else { + gain = rlim->rate * d + rlim->carry; + } - rlim->tokens += gain / NGTCP2_SECONDS; + gps = gain / NGTCP2_SECONDS; - if (rlim->tokens < rlim->burst) { + if (gps < rlim->burst && rlim->tokens < rlim->burst - gps) { + rlim->tokens += gps; rlim->carry = gain % NGTCP2_SECONDS; - } else { - rlim->tokens = rlim->burst; - rlim->carry = 0; + + return; } + + rlim->tokens = rlim->burst; + rlim->carry = 0; } int ngtcp2_ratelim_drain(ngtcp2_ratelim *rlim, uint64_t n, ngtcp2_tstamp ts) { diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_ratelim.h b/contrib/libs/ngtcp2/lib/ngtcp2_ratelim.h index 14485c562d4..231f5d1b018 100644 --- a/contrib/libs/ngtcp2/lib/ngtcp2_ratelim.h +++ b/contrib/libs/ngtcp2/lib/ngtcp2_ratelim.h @@ -28,7 +28,7 @@ #ifdef HAVE_CONFIG_H # include <config.h> -#endif /* HAVE_CONFIG_H */ +#endif /* defined(HAVE_CONFIG_H) */ #include <ngtcp2/ngtcp2.h> diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_rtb.c b/contrib/libs/ngtcp2/lib/ngtcp2_rtb.c index 7df1c197db7..f51c0f14ef9 100644 --- a/contrib/libs/ngtcp2/lib/ngtcp2_rtb.c +++ b/contrib/libs/ngtcp2/lib/ngtcp2_rtb.c @@ -454,23 +454,28 @@ static int rtb_on_pkt_lost(ngtcp2_rtb *rtb, ngtcp2_rtb_entry *ent, if (ent->flags & (NGTCP2_RTB_ENTRY_FLAG_PMTUD_PROBE | NGTCP2_RTB_ENTRY_FLAG_SKIP)) { ++rtb->num_lost_ignore_pkts; - } else if (ent->hd.pkt_num >= rtb->cc_pkt_num) { - rtb->rst->lost += ent->pktlen; + } else { + ++cstat->pkt_lost; + cstat->bytes_lost += ent->pktlen; + + if (ent->hd.pkt_num >= rtb->cc_pkt_num) { + rtb->rst->lost += ent->pktlen; - if (rtb->cc->on_pkt_lost) { - cc->on_pkt_lost(cc, cstat, - ngtcp2_cc_pkt_init(&pkt, ent->hd.pkt_num, ent->pktlen, - pktns->id, ent->ts, ent->rst.lost, - ent->rst.tx_in_flight, - ent->rst.is_app_limited), - ts); + if (rtb->cc->on_pkt_lost) { + cc->on_pkt_lost(cc, cstat, + ngtcp2_cc_pkt_init(&pkt, ent->hd.pkt_num, ent->pktlen, + pktns->id, ent->ts, ent->rst.lost, + ent->rst.tx_in_flight, + ent->rst.is_app_limited), + ts); + } } } if (ent->flags & NGTCP2_RTB_ENTRY_FLAG_PTO_RECLAIMED) { - ngtcp2_log_info(rtb->log, NGTCP2_LOG_EVENT_LDC, - "pkn=%" PRId64 " has already been reclaimed on PTO", - ent->hd.pkt_num); + ngtcp2_log_infof(rtb->log, NGTCP2_LOG_EVENT_LDC, + "pkn=%" PRId64 " has already been reclaimed on PTO", + ent->hd.pkt_num); assert(!(ent->flags & NGTCP2_RTB_ENTRY_FLAG_LOST_RETRANSMITTED)); assert(UINT64_MAX == ent->lost_ts); } else { @@ -793,12 +798,12 @@ ngtcp2_ssize ngtcp2_rtb_recv_ack(ngtcp2_rtb *rtb, const ngtcp2_ack *fr, int ack_eliciting_pkt_acked = 0; size_t ecn_acked = 0; int verify_ecn = 0; - ngtcp2_cc_ack cc_ack = {0}; + ngtcp2_cc_ack cc_ack = { + .prior_bytes_in_flight = cstat->bytes_in_flight, + .rtt = UINT64_MAX, + }; size_t num_lost_pkts = rtb->num_lost_pkts - rtb->num_lost_ignore_pkts; - cc_ack.prior_bytes_in_flight = cstat->bytes_in_flight; - cc_ack.rtt = UINT64_MAX; - if (conn && (conn->flags & NGTCP2_CONN_FLAG_KEY_UPDATE_NOT_CONFIRMED) && (conn->flags & NGTCP2_CONN_FLAG_KEY_UPDATE_INITIATOR) && largest_ack >= conn->pktns.crypto.tx.ckm->pkt_num) { @@ -1153,10 +1158,10 @@ static int rtb_detect_lost_pkt(ngtcp2_rtb *rtb, uint64_t *ppkt_lost, */ if (pktns->id == NGTCP2_PKTNS_ID_APPLICATION && loss_window && loss_window >= congestion_period) { - ngtcp2_log_info(rtb->log, NGTCP2_LOG_EVENT_LDC, - "persistent congestion loss_window=%" PRIu64 - " congestion_period=%" PRIu64, - loss_window, congestion_period); + ngtcp2_log_infof(rtb->log, NGTCP2_LOG_EVENT_LDC, + "persistent congestion loss_window=%" PRIu64 + " congestion_period=%" PRIu64, + loss_window, congestion_period); /* Reset min_rtt, srtt, and rttvar here. Next new RTT sample will be used to recalculate these values. */ @@ -1203,8 +1208,8 @@ void ngtcp2_rtb_remove_excessive_lost_pkt(ngtcp2_rtb *rtb, size_t n) { assert(ent->flags & NGTCP2_RTB_ENTRY_FLAG_LOST_RETRANSMITTED); - ngtcp2_log_info(rtb->log, NGTCP2_LOG_EVENT_LDC, - "removing stale lost pkn=%" PRId64, ent->hd.pkt_num); + ngtcp2_log_infof(rtb->log, NGTCP2_LOG_EVENT_LDC, + "removing stale lost pkn=%" PRId64, ent->hd.pkt_num); --rtb->num_lost_pkts; @@ -1245,8 +1250,8 @@ void ngtcp2_rtb_remove_expired_lost_pkt(ngtcp2_rtb *rtb, return; } - ngtcp2_log_info(rtb->log, NGTCP2_LOG_EVENT_LDC, - "removing stale lost pkn=%" PRId64, ent->hd.pkt_num); + ngtcp2_log_infof(rtb->log, NGTCP2_LOG_EVENT_LDC, + "removing stale lost pkn=%" PRId64, ent->hd.pkt_num); --rtb->num_lost_pkts; @@ -1398,9 +1403,9 @@ int ngtcp2_rtb_reclaim_on_retry(ngtcp2_rtb *rtb, ngtcp2_conn *conn, assert(!(ent->flags & NGTCP2_RTB_ENTRY_FLAG_PMTUD_PROBE)); if (ent->flags & NGTCP2_RTB_ENTRY_FLAG_PTO_RECLAIMED) { - ngtcp2_log_info(rtb->log, NGTCP2_LOG_EVENT_LDC, - "pkn=%" PRId64 " has already been reclaimed on PTO", - ent->hd.pkt_num); + ngtcp2_log_infof(rtb->log, NGTCP2_LOG_EVENT_LDC, + "pkn=%" PRId64 " has already been reclaimed on PTO", + ent->hd.pkt_num); continue; } diff --git a/contrib/libs/ngtcp2/ya.make b/contrib/libs/ngtcp2/ya.make index 4d4b5371037..e63e57d95de 100644 --- a/contrib/libs/ngtcp2/ya.make +++ b/contrib/libs/ngtcp2/ya.make @@ -2,9 +2,9 @@ LIBRARY() -VERSION(1.15.1) +VERSION(1.16.0) -ORIGINAL_SOURCE(https://github.com/ngtcp2/ngtcp2/releases/download/v1.15.1/ngtcp2-1.15.1.tar.xz) +ORIGINAL_SOURCE(https://github.com/ngtcp2/ngtcp2/releases/download/v1.16.0/ngtcp2-1.16.0.tar.xz) LICENSE( "(Apache-2.0 OR MIT)" AND @@ -41,6 +41,7 @@ SRCS( lib/ngtcp2_cc.c lib/ngtcp2_cid.c lib/ngtcp2_conn.c + lib/ngtcp2_conn_info.c lib/ngtcp2_conv.c lib/ngtcp2_crypto.c lib/ngtcp2_dcidtr.c diff --git a/contrib/libs/opentelemetry-cpp/.yandex_meta/__init__.py b/contrib/libs/opentelemetry-cpp/.yandex_meta/__init__.py index f9e4c58bf1f..0a541943159 100644 --- a/contrib/libs/opentelemetry-cpp/.yandex_meta/__init__.py +++ b/contrib/libs/opentelemetry-cpp/.yandex_meta/__init__.py @@ -6,7 +6,9 @@ def post_install(self): with self.yamakes["."] as m: m.CFLAGS.remove("-DOPENTELEMETRY_STL_VERSION=2023") m.CFLAGS.remove("-DPROTOBUF_USE_DLLS") + m.CFLAGS.remove("-DOPENTELEMETRY_ABI_VERSION_NO=1") m.CFLAGS.append(GLOBAL("-DOPENTELEMETRY_STL_VERSION=2023")) + m.CFLAGS.append(GLOBAL("-DOPENTELEMETRY_ABI_VERSION_NO=2")) self.yamakes["api"] = self.module( Library, diff --git a/contrib/libs/opentelemetry-cpp/api/ya.make b/contrib/libs/opentelemetry-cpp/api/ya.make index 3180db79551..0bc6779bd08 100644 --- a/contrib/libs/opentelemetry-cpp/api/ya.make +++ b/contrib/libs/opentelemetry-cpp/api/ya.make @@ -19,8 +19,8 @@ NO_COMPILER_WARNINGS() NO_UTIL() CFLAGS( - -DOPENTELEMETRY_ABI_VERSION_NO=1 GLOBAL -DOPENTELEMETRY_STL_VERSION=2023 + GLOBAL -DOPENTELEMETRY_ABI_VERSION_NO=2 ) END() diff --git a/contrib/libs/opentelemetry-cpp/ya.make b/contrib/libs/opentelemetry-cpp/ya.make index 7294049588b..c9979e3bae6 100644 --- a/contrib/libs/opentelemetry-cpp/ya.make +++ b/contrib/libs/opentelemetry-cpp/ya.make @@ -33,8 +33,8 @@ NO_COMPILER_WARNINGS() NO_UTIL() CFLAGS( - -DOPENTELEMETRY_ABI_VERSION_NO=1 GLOBAL -DOPENTELEMETRY_STL_VERSION=2023 + GLOBAL -DOPENTELEMETRY_ABI_VERSION_NO=2 ) SRCS( diff --git a/contrib/libs/opentelemetry-proto/.yandex_meta/__init__.py b/contrib/libs/opentelemetry-proto/.yandex_meta/__init__.py index 350ecd71a9f..34a3f3fd550 100644 --- a/contrib/libs/opentelemetry-proto/.yandex_meta/__init__.py +++ b/contrib/libs/opentelemetry-proto/.yandex_meta/__init__.py @@ -14,7 +14,6 @@ def post_install(self): PROTO_NAMESPACE=ArcPath(self.arcdir, GLOBAL=True), PY_NAMESPACE=".", ) - self.yamakes["."].before("END", "EXCLUDE_TAGS(GO_PROTO)\n") opentelemetry_proto = NixSourceProject( diff --git a/contrib/libs/opentelemetry-proto/CHANGELOG.md b/contrib/libs/opentelemetry-proto/CHANGELOG.md index b9d67b09eb2..337663e39b8 100644 --- a/contrib/libs/opentelemetry-proto/CHANGELOG.md +++ b/contrib/libs/opentelemetry-proto/CHANGELOG.md @@ -4,6 +4,10 @@ The full list of changes can be found in the compare view for the respective release at <https://github.com/open-telemetry/opentelemetry-proto/releases>. +### Removed + +- profiles: remove aggregation temporality enum and field. [#710](https://github.com/open-telemetry/opentelemetry-proto/pull/710) + ## 1.8.0 - 2025-09-02 ### Changed diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/logs/v1/logs_service.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/logs/v1/logs_service.proto index 8be5cf75ef1..0dbac7fda01 100644 --- a/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/logs/v1/logs_service.proto +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/logs/v1/logs_service.proto @@ -22,7 +22,7 @@ option csharp_namespace = "OpenTelemetry.Proto.Collector.Logs.V1"; option java_multiple_files = true; option java_package = "io.opentelemetry.proto.collector.logs.v1"; option java_outer_classname = "LogsServiceProto"; -option go_package = "go.opentelemetry.io/proto/otlp/collector/logs/v1"; +option go_package = "a.yandex-team.ru/contrib/libs/opentelemetry-proto"; // Service that can be used to push logs between one Application instrumented with // OpenTelemetry and an collector, or between an collector and a central collector (in this diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto index bc024284415..5cee87b17c4 100644 --- a/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto @@ -22,7 +22,7 @@ option csharp_namespace = "OpenTelemetry.Proto.Collector.Metrics.V1"; option java_multiple_files = true; option java_package = "io.opentelemetry.proto.collector.metrics.v1"; option java_outer_classname = "MetricsServiceProto"; -option go_package = "go.opentelemetry.io/proto/otlp/collector/metrics/v1"; +option go_package = "a.yandex-team.ru/contrib/libs/opentelemetry-proto"; // Service that can be used to push metrics between one Application // instrumented with OpenTelemetry and a collector, or between a collector and a diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/profiles/v1development/profiles_service.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/profiles/v1development/profiles_service.proto index 81bb210646f..33a5c185adf 100644 --- a/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/profiles/v1development/profiles_service.proto +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/profiles/v1development/profiles_service.proto @@ -22,7 +22,7 @@ option csharp_namespace = "OpenTelemetry.Proto.Collector.Profiles.V1Development" option java_multiple_files = true; option java_package = "io.opentelemetry.proto.collector.profiles.v1development"; option java_outer_classname = "ProfilesServiceProto"; -option go_package = "go.opentelemetry.io/proto/otlp/collector/profiles/v1development"; +option go_package = "a.yandex-team.ru/contrib/libs/opentelemetry-proto"; // Service that can be used to push profiles between one Application instrumented with // OpenTelemetry and a collector, or between a collector and a central collector. diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto index efbbedbe454..aa1345345a4 100644 --- a/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto @@ -22,7 +22,7 @@ option csharp_namespace = "OpenTelemetry.Proto.Collector.Trace.V1"; option java_multiple_files = true; option java_package = "io.opentelemetry.proto.collector.trace.v1"; option java_outer_classname = "TraceServiceProto"; -option go_package = "go.opentelemetry.io/proto/otlp/collector/trace/v1"; +option go_package = "a.yandex-team.ru/contrib/libs/opentelemetry-proto"; // Service that can be used to push spans between one Application instrumented with // OpenTelemetry and a collector, or between a collector and a central collector (in this diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto index 57c9f86e006..c8111692363 100644 --- a/contrib/libs/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto @@ -20,7 +20,7 @@ option csharp_namespace = "OpenTelemetry.Proto.Common.V1"; option java_multiple_files = true; option java_package = "io.opentelemetry.proto.common.v1"; option java_outer_classname = "CommonProto"; -option go_package = "go.opentelemetry.io/proto/otlp/common/v1"; +option go_package = "a.yandex-team.ru/contrib/libs/opentelemetry-proto"; // AnyValue is used to represent any type of attribute value. AnyValue may contain a // primitive value such as a string or integer or it may contain an arbitrary nested diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/logs/v1/logs.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/logs/v1/logs.proto index 4fe11308618..5243794390a 100644 --- a/contrib/libs/opentelemetry-proto/opentelemetry/proto/logs/v1/logs.proto +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/logs/v1/logs.proto @@ -23,7 +23,7 @@ option csharp_namespace = "OpenTelemetry.Proto.Logs.V1"; option java_multiple_files = true; option java_package = "io.opentelemetry.proto.logs.v1"; option java_outer_classname = "LogsProto"; -option go_package = "go.opentelemetry.io/proto/otlp/logs/v1"; +option go_package = "a.yandex-team.ru/contrib/libs/opentelemetry-proto"; // LogsData represents the logs data that can be stored in a persistent storage, // OR can be embedded by other protocols that transfer OTLP logs data but do not diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/metrics/v1/metrics.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/metrics/v1/metrics.proto index 8915e3c16b6..7f5c016ccf4 100644 --- a/contrib/libs/opentelemetry-proto/opentelemetry/proto/metrics/v1/metrics.proto +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/metrics/v1/metrics.proto @@ -23,7 +23,7 @@ option csharp_namespace = "OpenTelemetry.Proto.Metrics.V1"; option java_multiple_files = true; option java_package = "io.opentelemetry.proto.metrics.v1"; option java_outer_classname = "MetricsProto"; -option go_package = "go.opentelemetry.io/proto/otlp/metrics/v1"; +option go_package = "a.yandex-team.ru/contrib/libs/opentelemetry-proto"; // MetricsData represents the metrics data that can be stored in a persistent // storage, OR can be embedded by other protocols that transfer OTLP metrics diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/profiles/v1development/profiles.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/profiles/v1development/profiles.proto index dc101770dc3..cd90faa57c9 100644 --- a/contrib/libs/opentelemetry-proto/opentelemetry/proto/profiles/v1development/profiles.proto +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/profiles/v1development/profiles.proto @@ -39,7 +39,7 @@ option csharp_namespace = "OpenTelemetry.Proto.Profiles.V1Development"; option java_multiple_files = true; option java_package = "io.opentelemetry.proto.profiles.v1development"; option java_outer_classname = "ProfilesProto"; -option go_package = "go.opentelemetry.io/proto/otlp/profiles/v1development"; +option go_package = "a.yandex-team.ru/contrib/libs/opentelemetry-proto"; // Relationships Diagram // @@ -308,80 +308,10 @@ message Link { bytes span_id = 2; } -// Specifies the method of aggregating metric values, either DELTA (change since last report) -// or CUMULATIVE (total since a fixed start time). -enum AggregationTemporality { - /* UNSPECIFIED is the default AggregationTemporality, it MUST not be used. */ - AGGREGATION_TEMPORALITY_UNSPECIFIED = 0; - - /** DELTA is an AggregationTemporality for a profiler which reports - changes since last report time. Successive metrics contain aggregation of - values from continuous and non-overlapping intervals. - - The values for a DELTA metric are based only on the time interval - associated with one measurement cycle. There is no dependency on - previous measurements like is the case for CUMULATIVE metrics. - - For example, consider a system measuring the number of requests that - it receives and reports the sum of these requests every second as a - DELTA metric: - - 1. The system starts receiving at time=t_0. - 2. A request is received, the system measures 1 request. - 3. A request is received, the system measures 1 request. - 4. A request is received, the system measures 1 request. - 5. The 1 second collection cycle ends. A metric is exported for the - number of requests received over the interval of time t_0 to - t_0+1 with a value of 3. - 6. A request is received, the system measures 1 request. - 7. A request is received, the system measures 1 request. - 8. The 1 second collection cycle ends. A metric is exported for the - number of requests received over the interval of time t_0+1 to - t_0+2 with a value of 2. */ - AGGREGATION_TEMPORALITY_DELTA = 1; - - /** CUMULATIVE is an AggregationTemporality for a profiler which - reports changes since a fixed start time. This means that current values - of a CUMULATIVE metric depend on all previous measurements since the - start time. Because of this, the sender is required to retain this state - in some form. If this state is lost or invalidated, the CUMULATIVE metric - values MUST be reset and a new fixed start time following the last - reported measurement time sent MUST be used. - - For example, consider a system measuring the number of requests that - it receives and reports the sum of these requests every second as a - CUMULATIVE metric: - - 1. The system starts receiving at time=t_0. - 2. A request is received, the system measures 1 request. - 3. A request is received, the system measures 1 request. - 4. A request is received, the system measures 1 request. - 5. The 1 second collection cycle ends. A metric is exported for the - number of requests received over the interval of time t_0 to - t_0+1 with a value of 3. - 6. A request is received, the system measures 1 request. - 7. A request is received, the system measures 1 request. - 8. The 1 second collection cycle ends. A metric is exported for the - number of requests received over the interval of time t_0 to - t_0+2 with a value of 5. - 9. The system experiences a fault and loses state. - 10. The system recovers and resumes receiving at time=t_1. - 11. A request is received, the system measures 1 request. - 12. The 1 second collection cycle ends. A metric is exported for the - number of requests received over the interval of time t_1 to - t_1+1 with a value of 1. - - Note: Even though, when reporting changes since last report time, using - CUMULATIVE is valid, it is not recommended. */ - AGGREGATION_TEMPORALITY_CUMULATIVE = 2; -} - -// ValueType describes the type and units of a value, with an optional aggregation temporality. +// ValueType describes the type and units of a value. message ValueType { int32 type_strindex = 1; // Index into ProfilesDictionary.string_table. int32 unit_strindex = 2; // Index into ProfilesDictionary.string_table. - - AggregationTemporality aggregation_temporality = 3; } // Each Sample records values encountered in some program context. The program diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto index 8affbe3326d..78ca19ae1e9 100644 --- a/contrib/libs/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto @@ -22,7 +22,7 @@ option csharp_namespace = "OpenTelemetry.Proto.Resource.V1"; option java_multiple_files = true; option java_package = "io.opentelemetry.proto.resource.v1"; option java_outer_classname = "ResourceProto"; -option go_package = "go.opentelemetry.io/proto/otlp/resource/v1"; +option go_package = "a.yandex-team.ru/contrib/libs/opentelemetry-proto"; // Resource information. message Resource { diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto index fec6f9e3a9d..4f403b28c9a 100644 --- a/contrib/libs/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto @@ -23,7 +23,7 @@ option csharp_namespace = "OpenTelemetry.Proto.Trace.V1"; option java_multiple_files = true; option java_package = "io.opentelemetry.proto.trace.v1"; option java_outer_classname = "TraceProto"; -option go_package = "go.opentelemetry.io/proto/otlp/trace/v1"; +option go_package = "a.yandex-team.ru/contrib/libs/opentelemetry-proto"; // TracesData represents the traces data that can be stored in a persistent storage, // OR can be embedded by other protocols that transfer OTLP traces data but do diff --git a/contrib/libs/opentelemetry-proto/patches/01_make_go_proto_generation.sh b/contrib/libs/opentelemetry-proto/patches/01_make_go_proto_generation.sh new file mode 100644 index 00000000000..082c3011bda --- /dev/null +++ b/contrib/libs/opentelemetry-proto/patches/01_make_go_proto_generation.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -euo pipefail + +find . -path "*/opentelemetry/proto/*" -name "*.proto" -type f -exec sed -i ' + # Заменяем go_package с go.opentelemetry.io на a.yandex-team.ru + s|option go_package = "go\.opentelemetry\.io/proto/otlp/[^"]*";|option go_package = "a.yandex-team.ru/contrib/libs/opentelemetry-proto";|g +' {} \; diff --git a/contrib/libs/opentelemetry-proto/patches/a59a58f1860a1ca2caa751c03b7b4a49c2a529c9.patch b/contrib/libs/opentelemetry-proto/patches/a59a58f1860a1ca2caa751c03b7b4a49c2a529c9.patch new file mode 100644 index 00000000000..e61e9ab522e --- /dev/null +++ b/contrib/libs/opentelemetry-proto/patches/a59a58f1860a1ca2caa751c03b7b4a49c2a529c9.patch @@ -0,0 +1,111 @@ +From a59a58f1860a1ca2caa751c03b7b4a49c2a529c9 Mon Sep 17 00:00:00 2001 +From: Alexey Alexandrov <[email protected]> +Date: Fri, 5 Sep 2025 12:10:17 -0700 +Subject: [PATCH] Remove aggregation temporality enum and field. (#710) + +--- + CHANGELOG.md | 4 ++ + .../profiles/v1development/profiles.proto | 72 +------------------ + 2 files changed, 5 insertions(+), 71 deletions(-) + +diff --git a/CHANGELOG.md b/CHANGELOG.md +index b9d67b09..337663e3 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -4,6 +4,10 @@ + + The full list of changes can be found in the compare view for the respective release at <https://github.com/open-telemetry/opentelemetry-proto/releases>. + ++### Removed ++ ++- profiles: remove aggregation temporality enum and field. [#710](https://github.com/open-telemetry/opentelemetry-proto/pull/710) ++ + ## 1.8.0 - 2025-09-02 + + ### Changed +diff --git a/opentelemetry/proto/profiles/v1development/profiles.proto b/opentelemetry/proto/profiles/v1development/profiles.proto +index dc101770..e05c847d 100644 +--- a/opentelemetry/proto/profiles/v1development/profiles.proto ++++ b/opentelemetry/proto/profiles/v1development/profiles.proto +@@ -308,80 +308,10 @@ message Link { + bytes span_id = 2; + } + +-// Specifies the method of aggregating metric values, either DELTA (change since last report) +-// or CUMULATIVE (total since a fixed start time). +-enum AggregationTemporality { +- /* UNSPECIFIED is the default AggregationTemporality, it MUST not be used. */ +- AGGREGATION_TEMPORALITY_UNSPECIFIED = 0; +- +- /** DELTA is an AggregationTemporality for a profiler which reports +- changes since last report time. Successive metrics contain aggregation of +- values from continuous and non-overlapping intervals. +- +- The values for a DELTA metric are based only on the time interval +- associated with one measurement cycle. There is no dependency on +- previous measurements like is the case for CUMULATIVE metrics. +- +- For example, consider a system measuring the number of requests that +- it receives and reports the sum of these requests every second as a +- DELTA metric: +- +- 1. The system starts receiving at time=t_0. +- 2. A request is received, the system measures 1 request. +- 3. A request is received, the system measures 1 request. +- 4. A request is received, the system measures 1 request. +- 5. The 1 second collection cycle ends. A metric is exported for the +- number of requests received over the interval of time t_0 to +- t_0+1 with a value of 3. +- 6. A request is received, the system measures 1 request. +- 7. A request is received, the system measures 1 request. +- 8. The 1 second collection cycle ends. A metric is exported for the +- number of requests received over the interval of time t_0+1 to +- t_0+2 with a value of 2. */ +- AGGREGATION_TEMPORALITY_DELTA = 1; +- +- /** CUMULATIVE is an AggregationTemporality for a profiler which +- reports changes since a fixed start time. This means that current values +- of a CUMULATIVE metric depend on all previous measurements since the +- start time. Because of this, the sender is required to retain this state +- in some form. If this state is lost or invalidated, the CUMULATIVE metric +- values MUST be reset and a new fixed start time following the last +- reported measurement time sent MUST be used. +- +- For example, consider a system measuring the number of requests that +- it receives and reports the sum of these requests every second as a +- CUMULATIVE metric: +- +- 1. The system starts receiving at time=t_0. +- 2. A request is received, the system measures 1 request. +- 3. A request is received, the system measures 1 request. +- 4. A request is received, the system measures 1 request. +- 5. The 1 second collection cycle ends. A metric is exported for the +- number of requests received over the interval of time t_0 to +- t_0+1 with a value of 3. +- 6. A request is received, the system measures 1 request. +- 7. A request is received, the system measures 1 request. +- 8. The 1 second collection cycle ends. A metric is exported for the +- number of requests received over the interval of time t_0 to +- t_0+2 with a value of 5. +- 9. The system experiences a fault and loses state. +- 10. The system recovers and resumes receiving at time=t_1. +- 11. A request is received, the system measures 1 request. +- 12. The 1 second collection cycle ends. A metric is exported for the +- number of requests received over the interval of time t_1 to +- t_1+1 with a value of 1. +- +- Note: Even though, when reporting changes since last report time, using +- CUMULATIVE is valid, it is not recommended. */ +- AGGREGATION_TEMPORALITY_CUMULATIVE = 2; +-} +- +-// ValueType describes the type and units of a value, with an optional aggregation temporality. ++// ValueType describes the type and units of a value. + message ValueType { + int32 type_strindex = 1; // Index into ProfilesDictionary.string_table. + int32 unit_strindex = 2; // Index into ProfilesDictionary.string_table. +- +- AggregationTemporality aggregation_temporality = 3; + } + + // Each Sample records values encountered in some program context. The program diff --git a/contrib/libs/opentelemetry-proto/ya.make b/contrib/libs/opentelemetry-proto/ya.make index 976ddf34fa3..f5d1a9fc312 100644 --- a/contrib/libs/opentelemetry-proto/ya.make +++ b/contrib/libs/opentelemetry-proto/ya.make @@ -32,6 +32,4 @@ SRCS( opentelemetry/proto/trace/v1/trace.proto ) -EXCLUDE_TAGS(GO_PROTO) - END() diff --git a/contrib/python/textual/.dist-info/METADATA b/contrib/python/textual/.dist-info/METADATA index 92fb26a5660..3b7b1b59077 100644 --- a/contrib/python/textual/.dist-info/METADATA +++ b/contrib/python/textual/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: textual -Version: 0.89.1 +Version: 1.0.0 Summary: Modern Text User Interface framework Home-page: https://github.com/Textualize/textual License: MIT @@ -62,10 +62,56 @@ Description-Content-Type: text/markdown # Textual -Build cross-platform user interfaces with a simple Python API. +<img align="right" width="250" alt="clock" src="https://github.com/user-attachments/assets/63e839c3-5b8e-478d-b78e-cf7647eb85e8" /> -Run your apps in the terminal *or* a web browser. +Build cross-platform user interfaces with a simple Python API. Run your apps in the terminal *or* a web browser. +Textual's API combines modern Python with the best of developments from the web world, for a lean app development experience. +De-coupled components and an advanced [testing](https://textual.textualize.io/guide/testing/) framework ensure you can maintain your app for the long-term. + +Want some more examples? See the [examples](https://github.com/Textualize/textual/tree/main/examples) directory. + +```python +""" +An App to show the current time. +""" + +from datetime import datetime + +from textual.app import App, ComposeResult +from textual.widgets import Digits + + +class ClockApp(App): + CSS = """ + Screen { align: center middle; } + Digits { width: auto; } + """ + + def compose(self) -> ComposeResult: + yield Digits("") + + def on_ready(self) -> None: + self.update_clock() + self.set_interval(1, self.update_clock) + + def update_clock(self) -> None: + clock = datetime.now().time() + self.query_one(Digits).update(f"{clock:%T}") + + +if __name__ == "__main__": + app = ClockApp() + app.run() +``` + +> [!TIP] +> Textual is an asynchronous framework under the hood. Which means you can integrate your apps with async libraries — if you want to. +> If you don't want or need to use async, Textual won't force it on you. + + + +<img src="https://img.spacergif.org/spacer.gif" width="1" height="64"/> ## Widgets @@ -129,6 +175,7 @@ Predefined themes ensure your apps will look good out of the box. </table> +<img src="https://img.spacergif.org/spacer.gif" width="1" height="32"/> ## Installing @@ -141,6 +188,8 @@ pip install textual textual-dev See [getting started](https://textual.textualize.io/getting_started/) for details. +<img src="https://img.spacergif.org/spacer.gif" width="1" height="32"/> + ## Demo @@ -156,32 +205,57 @@ Or try the [textual demo](https://github.com/textualize/textual-demo) *without* uvx --python 3.12 textual-demo ``` +<img src="https://img.spacergif.org/spacer.gif" width="1" height="32"/> -## Textual ❤️ Web +## Dev Console -<img align="right" width="40%" alt="textual-serve" src="https://github.com/user-attachments/assets/a25820fb-87ae-433a-858b-ac3940169242"> +<img align="right" width="40%" alt="devtools" src="https://github.com/user-attachments/assets/12c60d65-e342-4b2f-9372-bae0459a7552" /> + + +How do you debug an app in the terminal that is also running in the terminal? + +The `textual-dev` package supplies a dev console that connects to your application from another terminal. +In addition to system messages and events, your logged messages and print statements will appear in the dev console. + +See [the guide](https://textual.textualize.io/guide/devtools/) for other helpful tools provided by the `textual-dev` package. + +<img src="https://img.spacergif.org/spacer.gif" width="1" height="32"/> + +## Command Palette -Textual apps are equally at home in the browser as they are the terminal. +Textual apps have a *fuzzy search* command palette. +Hit `ctrl+p` to open the command palette. -Any Textual app may be served with `textual serve` — so you can share your creations on the web. +It is easy to extend the command palette with [custom commands](https://textual.textualize.io/guide/command_palette/) for your application. + + + +<img src="https://img.spacergif.org/spacer.gif" width="1" height="32"/> + +# Textual ❤️ Web + +<img align="right" width="40%" alt="textual-serve" src="https://github.com/user-attachments/assets/a25820fb-87ae-433a-858b-ac3940169242"> + + +Textual apps are equally at home in the browser as they are the terminal. Any Textual app may be served with `textual serve` — so you can share your creations on the web. Here's how to serve the demo app: ``` textual serve "python -m textual" ``` -In addition to serving your apps locally, you can serve apps with [Textual-Web](https://github.com/Textualize/textual-web). +In addition to serving your apps locally, you can serve apps with [Textual Web](https://github.com/Textualize/textual-web). Textual Web's firewall-busting technology can serve an unlimited number of applications. Since Textual apps have low system requirements, you can install them anywhere Python also runs. Turning any device in to a connected device. No desktop required! -## Documentation -Head over to the [Textual documentation](http://textual.textualize.io/) to start building. +<img src="https://img.spacergif.org/spacer.gif" width="1" height="32"/> + ## Join us on Discord diff --git a/contrib/python/textual/README.md b/contrib/python/textual/README.md index ea086dc588f..5514aaa5352 100644 --- a/contrib/python/textual/README.md +++ b/contrib/python/textual/README.md @@ -11,10 +11,56 @@ # Textual -Build cross-platform user interfaces with a simple Python API. +<img align="right" width="250" alt="clock" src="https://github.com/user-attachments/assets/63e839c3-5b8e-478d-b78e-cf7647eb85e8" /> -Run your apps in the terminal *or* a web browser. +Build cross-platform user interfaces with a simple Python API. Run your apps in the terminal *or* a web browser. +Textual's API combines modern Python with the best of developments from the web world, for a lean app development experience. +De-coupled components and an advanced [testing](https://textual.textualize.io/guide/testing/) framework ensure you can maintain your app for the long-term. + +Want some more examples? See the [examples](https://github.com/Textualize/textual/tree/main/examples) directory. + +```python +""" +An App to show the current time. +""" + +from datetime import datetime + +from textual.app import App, ComposeResult +from textual.widgets import Digits + + +class ClockApp(App): + CSS = """ + Screen { align: center middle; } + Digits { width: auto; } + """ + + def compose(self) -> ComposeResult: + yield Digits("") + + def on_ready(self) -> None: + self.update_clock() + self.set_interval(1, self.update_clock) + + def update_clock(self) -> None: + clock = datetime.now().time() + self.query_one(Digits).update(f"{clock:%T}") + + +if __name__ == "__main__": + app = ClockApp() + app.run() +``` + +> [!TIP] +> Textual is an asynchronous framework under the hood. Which means you can integrate your apps with async libraries — if you want to. +> If you don't want or need to use async, Textual won't force it on you. + + + +<img src="https://img.spacergif.org/spacer.gif" width="1" height="64"/> ## Widgets @@ -78,6 +124,7 @@ Predefined themes ensure your apps will look good out of the box. </table> +<img src="https://img.spacergif.org/spacer.gif" width="1" height="32"/> ## Installing @@ -90,6 +137,8 @@ pip install textual textual-dev See [getting started](https://textual.textualize.io/getting_started/) for details. +<img src="https://img.spacergif.org/spacer.gif" width="1" height="32"/> + ## Demo @@ -105,32 +154,57 @@ Or try the [textual demo](https://github.com/textualize/textual-demo) *without* uvx --python 3.12 textual-demo ``` +<img src="https://img.spacergif.org/spacer.gif" width="1" height="32"/> -## Textual ❤️ Web +## Dev Console -<img align="right" width="40%" alt="textual-serve" src="https://github.com/user-attachments/assets/a25820fb-87ae-433a-858b-ac3940169242"> +<img align="right" width="40%" alt="devtools" src="https://github.com/user-attachments/assets/12c60d65-e342-4b2f-9372-bae0459a7552" /> + + +How do you debug an app in the terminal that is also running in the terminal? + +The `textual-dev` package supplies a dev console that connects to your application from another terminal. +In addition to system messages and events, your logged messages and print statements will appear in the dev console. + +See [the guide](https://textual.textualize.io/guide/devtools/) for other helpful tools provided by the `textual-dev` package. + +<img src="https://img.spacergif.org/spacer.gif" width="1" height="32"/> + +## Command Palette -Textual apps are equally at home in the browser as they are the terminal. +Textual apps have a *fuzzy search* command palette. +Hit `ctrl+p` to open the command palette. -Any Textual app may be served with `textual serve` — so you can share your creations on the web. +It is easy to extend the command palette with [custom commands](https://textual.textualize.io/guide/command_palette/) for your application. + + + +<img src="https://img.spacergif.org/spacer.gif" width="1" height="32"/> + +# Textual ❤️ Web + +<img align="right" width="40%" alt="textual-serve" src="https://github.com/user-attachments/assets/a25820fb-87ae-433a-858b-ac3940169242"> + + +Textual apps are equally at home in the browser as they are the terminal. Any Textual app may be served with `textual serve` — so you can share your creations on the web. Here's how to serve the demo app: ``` textual serve "python -m textual" ``` -In addition to serving your apps locally, you can serve apps with [Textual-Web](https://github.com/Textualize/textual-web). +In addition to serving your apps locally, you can serve apps with [Textual Web](https://github.com/Textualize/textual-web). Textual Web's firewall-busting technology can serve an unlimited number of applications. Since Textual apps have low system requirements, you can install them anywhere Python also runs. Turning any device in to a connected device. No desktop required! -## Documentation -Head over to the [Textual documentation](http://textual.textualize.io/) to start building. +<img src="https://img.spacergif.org/spacer.gif" width="1" height="32"/> + ## Join us on Discord diff --git a/contrib/python/textual/textual/_layout_resolve.py b/contrib/python/textual/textual/_layout_resolve.py index d94cfec7fd4..902e8476cbd 100644 --- a/contrib/python/textual/textual/_layout_resolve.py +++ b/contrib/python/textual/textual/_layout_resolve.py @@ -1,6 +1,5 @@ from __future__ import annotations -from dataclasses import dataclass from fractions import Fraction from typing import Sequence, cast @@ -18,13 +17,6 @@ class EdgeProtocol(Protocol): min_size: int -@dataclass -class Edge: - size: int | None = None - fraction: int | None = 1 - min_size: int = 1 - - def layout_resolve(total: int, edges: Sequence[EdgeProtocol]) -> list[int]: """Divide total space to satisfy size, fraction, and min_size, constraints. diff --git a/contrib/python/textual/textual/_node_list.py b/contrib/python/textual/textual/_node_list.py index 1ee2a3bddb5..48bb2bea538 100644 --- a/contrib/python/textual/textual/_node_list.py +++ b/contrib/python/textual/textual/_node_list.py @@ -15,7 +15,7 @@ if TYPE_CHECKING: class DuplicateIds(Exception): - pass + """Raised when attempting to add a widget with an id that already exists.""" @rich.repr.auto(angular=True) @@ -138,6 +138,14 @@ class NodeList(Sequence["Widget"]): self.updated() def _ensure_unique_id(self, widget_id: str) -> None: + """Ensure a new widget ID would be unique. + + Args: + widget_id: New widget ID. + + Raises: + DuplicateIds: If the given ID is not unique. + """ if widget_id in self._nodes_by_id: raise DuplicateIds( f"Tried to insert a widget with ID {widget_id!r}, but a widget {self._nodes_by_id[widget_id]!r} " diff --git a/contrib/python/textual/textual/app.py b/contrib/python/textual/textual/app.py index d54f5f49f74..6c0c10e8d20 100644 --- a/contrib/python/textual/textual/app.py +++ b/contrib/python/textual/textual/app.py @@ -437,8 +437,20 @@ class App(Generic[ReturnType], DOMNode): ALLOW_IN_MAXIMIZED_VIEW: ClassVar[str] = "Footer" """The default value of [Screen.ALLOW_IN_MAXIMIZED_VIEW][textual.screen.Screen.ALLOW_IN_MAXIMIZED_VIEW].""" + CLICK_CHAIN_TIME_THRESHOLD: ClassVar[float] = 0.5 + """The maximum number of seconds between clicks to upgrade a single click to a double click, + a double click to a triple click, etc.""" + BINDINGS: ClassVar[list[BindingType]] = [ - Binding("ctrl+c", "quit", "Quit", show=False, priority=True) + Binding( + "ctrl+q", + "quit", + "Quit", + tooltip="Quit the app and return to the command prompt.", + show=False, + priority=True, + ), + Binding("ctrl+c", "help_quit", show=False, system=True), ] """The default key bindings.""" @@ -582,6 +594,15 @@ class App(Generic[ReturnType], DOMNode): self._mouse_down_widget: Widget | None = None """The widget that was most recently mouse downed (used to create click events).""" + self._click_chain_last_offset: Offset | None = None + """The last offset at which a Click occurred, in screen-space.""" + + self._click_chain_last_time: float | None = None + """The last time at which a Click occurred.""" + + self._chained_clicks: int = 1 + """Counter which tracks the number of clicks received in a row.""" + self._previous_cursor_position = Offset(0, 0) """The previous cursor position""" @@ -759,14 +780,15 @@ class App(Generic[ReturnType], DOMNode): self._previous_inline_height: int | None = None """Size of previous inline update.""" - self._hover_effects_timer: Timer | None = None - self._resize_event: events.Resize | None = None """A pending resize event, sent on idle.""" self._css_update_count: int = 0 """Incremented when CSS is invalidated.""" + self._clipboard: str = "" + """Contents of local clipboard.""" + if self.ENABLE_COMMAND_PALETTE: for _key, binding in self._bindings: if binding.action in {"command_palette", "app.command_palette"}: @@ -866,6 +888,15 @@ class App(Generic[ReturnType], DOMNode): except StopIteration: return () + @property + def clipboard(self) -> str: + """The value of the local clipboard. + + Note, that this only contains text copied in the app, and not + text copied from elsewhere in the OS. + """ + return self._clipboard + @contextmanager def batch_update(self) -> Generator[None, None, None]: """A context manager to suspend all repaints until the end of the batch.""" @@ -1497,6 +1528,7 @@ class App(Generic[ReturnType], DOMNode): Args: text: Text you wish to copy to the clipboard. """ + self._clipboard = text if self._driver is None: return @@ -1891,7 +1923,7 @@ class App(Generic[ReturnType], DOMNode): """Called when app is ready to process events.""" app_ready_event.set() - async def run_app(app: App) -> None: + async def run_app(app: App[ReturnType]) -> None: """Run the apps message loop. Args: @@ -1965,7 +1997,7 @@ class App(Generic[ReturnType], DOMNode): if auto_pilot is None and constants.PRESS: keys = constants.PRESS.split(",") - async def press_keys(pilot: Pilot) -> None: + async def press_keys(pilot: Pilot[ReturnType]) -> None: """Auto press keys.""" await pilot.press(*keys) @@ -3605,6 +3637,20 @@ class App(Generic[ReturnType], DOMNode): return True return False + def action_help_quit(self) -> None: + """Bound to ctrl+C to alert the user that it no longer quits.""" + # Doing this because users will reflexively hit ctrl+C to exit + # Ctrl+C is now bound to copy if an input / textarea is focused. + # This makes is possible, even likely, that a user may do it accidentally -- which would be maddening. + # Rather than do nothing, we can make an educated guess the user was trying + # to quit, and inform them how you really quit. + for key, active_binding in self.active_bindings.items(): + if active_binding.binding.action in ("quit", "app.quit"): + self.notify( + f"Press [b]{key}[/b] to quit the app", title="Do you want to quit?" + ) + return + def set_keymap(self, keymap: Keymap) -> None: """Set the keymap, a mapping of binding IDs to key strings. @@ -3656,14 +3702,12 @@ class App(Generic[ReturnType], DOMNode): if isinstance(event, events.Compose): await self._init_mode(self._current_mode) await super().on_event(event) - elif isinstance(event, events.InputEvent) and not event.is_forwarded: if not self.app_focus and isinstance(event, (events.Key, events.MouseDown)): self.app_focus = True if isinstance(event, events.MouseEvent): # Record current mouse position on App self.mouse_position = Offset(event.x, event.y) - if isinstance(event, events.MouseDown): try: self._mouse_down_widget, _ = self.get_widget_at( @@ -3675,18 +3719,39 @@ class App(Generic[ReturnType], DOMNode): self.screen._forward_event(event) + # If a MouseUp occurs at the same widget as a MouseDown, then we should + # consider it a click, and produce a Click event. if ( isinstance(event, events.MouseUp) and self._mouse_down_widget is not None ): try: - if ( - self.get_widget_at(event.x, event.y)[0] - is self._mouse_down_widget - ): + screen_offset = event.screen_offset + mouse_down_widget = self._mouse_down_widget + mouse_up_widget, _ = self.get_widget_at(*screen_offset) + if mouse_up_widget is mouse_down_widget: + same_offset = ( + self._click_chain_last_offset is not None + and self._click_chain_last_offset == screen_offset + ) + within_time_threshold = ( + self._click_chain_last_time is not None + and event.time - self._click_chain_last_time + <= self.CLICK_CHAIN_TIME_THRESHOLD + ) + + if same_offset and within_time_threshold: + self._chained_clicks += 1 + else: + self._chained_clicks = 1 + click_event = events.Click.from_event( - self._mouse_down_widget, event + mouse_down_widget, event, chain=self._chained_clicks ) + + self._click_chain_last_time = event.time + self._click_chain_last_offset = screen_offset + self.screen._forward_event(click_event) except NoWidget: pass diff --git a/contrib/python/textual/textual/binding.py b/contrib/python/textual/textual/binding.py index 09e0b3b892d..a04bb5cf60e 100644 --- a/contrib/python/textual/textual/binding.py +++ b/contrib/python/textual/textual/binding.py @@ -81,6 +81,8 @@ class Binding: If specified in the App's keymap then Textual will use this ID to lookup the binding, and substitute the `key` property of the Binding with the key specified in the keymap. """ + system: bool = False + """Make this binding a system binding, which removes it from the key panel.""" def parse_key(self) -> tuple[list[str], str]: """Parse a key in to a list of modifiers, and the actual key. @@ -148,6 +150,7 @@ class Binding: priority=binding.priority, tooltip=binding.tooltip, id=binding.id, + system=binding.system, ) diff --git a/contrib/python/textual/textual/command.py b/contrib/python/textual/textual/command.py index 9e28eddb318..24ad46c8df2 100644 --- a/contrib/python/textual/textual/command.py +++ b/contrib/python/textual/textual/command.py @@ -20,6 +20,7 @@ from asyncio import ( from dataclasses import dataclass from functools import total_ordering from inspect import isclass +from operator import attrgetter from time import monotonic from typing import ( TYPE_CHECKING, @@ -455,9 +456,9 @@ class CommandList(OptionList, can_focus=False): } CommandList > .option-list--option-highlighted { - color: $block-cursor-foreground; - background: $block-cursor-background; - text-style: $block-cursor-text-style; + color: $block-cursor-blurred-foreground; + background: $block-cursor-blurred-background; + text-style: $block-cursor-blurred-text-style; } CommandList:nocolor > .option-list--option-highlighted { @@ -1014,26 +1015,12 @@ class CommandPalette(SystemModalScreen[None]): commands: The commands to show in the widget. clear_current: Should the current content of the list be cleared first? """ - # For the moment, this is a fairly naive approach to populating the - # command list with a list of commands. Every time we add a - # new one we're nuking the list of options and populating them - # again. If this turns out to not be a great approach, we may try - # and get a lot smarter with this (ideally OptionList will grow a - # method to sort its content in an efficient way; but for now we'll - # go with "worse is better" wisdom). - highlighted = ( - command_list.get_option_at_index(command_list.highlighted) - if command_list.highlighted is not None and not clear_current - else None - ) - - def sort_key(command: Command) -> float: - return -command.hit.score - sorted_commands = sorted(commands, key=sort_key) + sorted_commands = sorted(commands, key=attrgetter("hit.score"), reverse=True) command_list.clear_options().add_options(sorted_commands) - if highlighted is not None and highlighted.id: - command_list.highlighted = command_list.get_option_index(highlighted.id) + + if sorted_commands: + command_list.highlighted = 0 self._list_visible = bool(command_list.option_count) self._hit_count = command_list.option_count diff --git a/contrib/python/textual/textual/containers.py b/contrib/python/textual/textual/containers.py index 18a46d14553..a6f655a177e 100644 --- a/contrib/python/textual/textual/containers.py +++ b/contrib/python/textual/textual/containers.py @@ -267,7 +267,7 @@ class ItemGrid(Widget, inherit_bindings=False): stretch_height: bool = True, regular: bool = False, ) -> None: - """Initialize a Widget. + """ Args: *children: Child widgets. diff --git a/contrib/python/textual/textual/design.py b/contrib/python/textual/textual/design.py index f782b8803d4..33d0e6c3e47 100644 --- a/contrib/python/textual/textual/design.py +++ b/contrib/python/textual/textual/design.py @@ -321,9 +321,6 @@ class ColorSystem: "input-selection-background", Color.parse(colors["primary-lighten-1"]).with_alpha(0.4).hex, ) - colors["input-selection-foreground"] = get( - "input-selection-foreground", background.hex - ) # Markdown header styles colors["markdown-h1-color"] = get("markdown-h1-color", primary.hex) diff --git a/contrib/python/textual/textual/events.py b/contrib/python/textual/textual/events.py index fd4dea3eddc..b977c1edf4c 100644 --- a/contrib/python/textual/textual/events.py +++ b/contrib/python/textual/textual/events.py @@ -16,6 +16,7 @@ from __future__ import annotations from dataclasses import dataclass from pathlib import Path from typing import TYPE_CHECKING, Type, TypeVar +from typing_extensions import Self import rich.repr from rich.style import Style @@ -556,8 +557,88 @@ class Click(MouseEvent, bubble=True): - [X] Bubbles - [ ] Verbose + + Args: + chain: The number of clicks in the chain. 2 is a double click, 3 is a triple click, etc. """ + def __init__( + self, + widget: Widget | None, + x: int, + y: int, + delta_x: int, + delta_y: int, + button: int, + shift: bool, + meta: bool, + ctrl: bool, + screen_x: int | None = None, + screen_y: int | None = None, + style: Style | None = None, + chain: int = 1, + ) -> None: + super().__init__( + widget, + x, + y, + delta_x, + delta_y, + button, + shift, + meta, + ctrl, + screen_x, + screen_y, + style, + ) + self.chain = chain + + @classmethod + def from_event( + cls: Type[Self], + widget: Widget, + event: MouseEvent, + chain: int = 1, + ) -> Self: + new_event = cls( + widget, + event.x, + event.y, + event.delta_x, + event.delta_y, + event.button, + event.shift, + event.meta, + event.ctrl, + event.screen_x, + event.screen_y, + event._style, + chain=chain, + ) + return new_event + + def _apply_offset(self, x: int, y: int) -> Self: + return self.__class__( + self.widget, + x=self.x + x, + y=self.y + y, + delta_x=self.delta_x, + delta_y=self.delta_y, + button=self.button, + shift=self.shift, + meta=self.meta, + ctrl=self.ctrl, + screen_x=self.screen_x, + screen_y=self.screen_y, + style=self.style, + chain=self.chain, + ) + + def __rich_repr__(self) -> rich.repr.Result: + yield from super().__rich_repr__() + yield "chain", self.chain + @rich.repr.auto class Timer(Event, bubble=False, verbose=True): diff --git a/contrib/python/textual/textual/fuzzy.py b/contrib/python/textual/textual/fuzzy.py index 1f88feb742b..337ad29b4d5 100644 --- a/contrib/python/textual/textual/fuzzy.py +++ b/contrib/python/textual/textual/fuzzy.py @@ -7,13 +7,151 @@ This class is used by the [command palette](/guide/command_palette) to match sea from __future__ import annotations -from re import IGNORECASE, compile, escape +from operator import itemgetter +from re import IGNORECASE, escape, finditer, search +from typing import Iterable, NamedTuple import rich.repr from rich.style import Style from rich.text import Text -from textual.cache import LRUCache + +class _Search(NamedTuple): + """Internal structure to keep track of a recursive search.""" + + candidate_offset: int = 0 + query_offset: int = 0 + offsets: tuple[int, ...] = () + + def branch(self, offset: int) -> tuple[_Search, _Search]: + """Branch this search when an offset is found. + + Args: + offset: Offset of a matching letter in the query. + + Returns: + A pair of search objects. + """ + _, query_offset, offsets = self + return ( + _Search(offset + 1, query_offset + 1, offsets + (offset,)), + _Search(offset + 1, query_offset, offsets), + ) + + @property + def groups(self) -> int: + """Number of groups in offsets.""" + groups = 1 + last_offset = self.offsets[0] + for offset in self.offsets[1:]: + if offset != last_offset + 1: + groups += 1 + last_offset = offset + return groups + + +class FuzzySearch: + """Performs a fuzzy search. + + Unlike a regex solution, this will finds all possible matches. + """ + + def __init__(self, case_sensitive: bool = False) -> None: + """Initialize fuzzy search. + + Args: + case_sensitive: Is the match case sensitive? + """ + self.cache: dict[tuple[str, str, bool], tuple[float, tuple[int, ...]]] = {} + self.case_sensitive = case_sensitive + + def match(self, query: str, candidate: str) -> tuple[float, tuple[int, ...]]: + """Match against a query. + + Args: + query: The fuzzy query. + candidate: A candidate to check,. + + Returns: + A pair of (score, tuple of offsets). `(0, ())` for no result. + """ + + query_regex = ".*?".join(f"({escape(character)})" for character in query) + if not search( + query_regex, candidate, flags=0 if self.case_sensitive else IGNORECASE + ): + # Bail out early if there is no possibility of a match + return (0.0, ()) + + cache_key = (query, candidate, self.case_sensitive) + if cache_key in self.cache: + return self.cache[cache_key] + result = max( + self._match(query, candidate), key=itemgetter(0), default=(0.0, ()) + ) + self.cache[cache_key] = result + return result + + def _match( + self, query: str, candidate: str + ) -> Iterable[tuple[float, tuple[int, ...]]]: + """Generator to do the matching. + + Args: + query: Query to match. + candidate: Candidate to check against. + + Yields: + Pairs of score and tuple of offsets. + """ + if not self.case_sensitive: + query = query.lower() + candidate = candidate.lower() + + # We need this to give a bonus to first letters. + first_letters = {match.start() for match in finditer(r"\w+", candidate)} + + def score(search: _Search) -> float: + """Sore a search. + + Args: + search: Search object. + + Returns: + Score. + + """ + # This is a heuristic, and can be tweaked for better results + # Boost first letter matches + score: float = sum( + (2.0 if offset in first_letters else 1.0) for offset in search.offsets + ) + # Boost to favor less groups + offset_count = len(search.offsets) + normalized_groups = (offset_count - (search.groups - 1)) / offset_count + score *= 1 + (normalized_groups**2) + return score + + stack: list[_Search] = [_Search()] + push = stack.append + pop = stack.pop + query_size = len(query) + find = candidate.find + # Limit the number of loops out of an abundance of caution. + # This would be hard to reach without contrived data. + remaining_loops = 200 + + while stack and (remaining_loops := remaining_loops - 1): + search = pop() + offset = find(query[search.query_offset], search.candidate_offset) + if offset != -1: + advance_branch, branch = search.branch(offset) + if advance_branch.query_offset == query_size: + yield score(advance_branch), advance_branch.offsets + push(branch) + else: + push(advance_branch) + push(branch) @rich.repr.auto @@ -36,11 +174,8 @@ class Matcher: """ self._query = query self._match_style = Style(reverse=True) if match_style is None else match_style - self._query_regex = compile( - ".*?".join(f"({escape(character)})" for character in query), - flags=0 if case_sensitive else IGNORECASE, - ) - self._cache: LRUCache[str, float] = LRUCache(1024 * 4) + self._case_sensitive = case_sensitive + self.fuzzy_search = FuzzySearch() @property def query(self) -> str: @@ -53,14 +188,9 @@ class Matcher: return self._match_style @property - def query_pattern(self) -> str: - """The regular expression pattern built from the query.""" - return self._query_regex.pattern - - @property def case_sensitive(self) -> bool: """Is this matcher case sensitive?""" - return not bool(self._query_regex.flags & IGNORECASE) + return self._case_sensitive def match(self, candidate: str) -> float: """Match the candidate against the query. @@ -71,27 +201,7 @@ class Matcher: Returns: Strength of the match from 0 to 1. """ - cached = self._cache.get(candidate) - if cached is not None: - return cached - match = self._query_regex.search(candidate) - if match is None: - score = 0.0 - else: - assert match.lastindex is not None - offsets = [ - match.span(group_no)[0] for group_no in range(1, match.lastindex + 1) - ] - group_count = 0 - last_offset = -2 - for offset in offsets: - if offset > last_offset + 1: - group_count += 1 - last_offset = offset - - score = 1.0 - ((group_count - 1) / len(candidate)) - self._cache[candidate] = score - return score + return self.fuzzy_search.match(self.query, candidate)[0] def highlight(self, candidate: str) -> Text: """Highlight the candidate with the fuzzy match. @@ -102,20 +212,11 @@ class Matcher: Returns: A [rich.text.Text][`Text`] object with highlighted matches. """ - match = self._query_regex.search(candidate) text = Text.from_markup(candidate) - if match is None: + score, offsets = self.fuzzy_search.match(self.query, candidate) + if not score: return text - assert match.lastindex is not None - if self._query in text.plain: - # Favor complete matches - offset = text.plain.index(self._query) - text.stylize(self._match_style, offset, offset + len(self._query)) - else: - offsets = [ - match.span(group_no)[0] for group_no in range(1, match.lastindex + 1) - ] - for offset in offsets: + for offset in offsets: + if not candidate[offset].isspace(): text.stylize(self._match_style, offset, offset + 1) - return text diff --git a/contrib/python/textual/textual/layout.py b/contrib/python/textual/textual/layout.py index a3ef9ec006d..5f55448ca69 100644 --- a/contrib/python/textual/textual/layout.py +++ b/contrib/python/textual/textual/layout.py @@ -256,22 +256,11 @@ class Layout(ABC): Returns: Content height (in lines). """ - if not widget._nodes: - height = 0 - else: - # Use a height of zero to ignore relative heights - styles_height = widget.styles.height - if widget._parent and len(widget._nodes) == 1: - # If it is an only child with height auto we want it to expand - height = ( - container.height - if styles_height is not None and styles_height.is_auto - else 0 - ) - else: - height = 0 - arrangement = widget._arrange(Size(width, height)) + if widget._nodes: + arrangement = widget._arrange(Size(width, 0)) height = arrangement.total_region.bottom + else: + height = 0 return height diff --git a/contrib/python/textual/textual/lazy.py b/contrib/python/textual/textual/lazy.py index 58ab6a3e2e9..262c867a97f 100644 --- a/contrib/python/textual/textual/lazy.py +++ b/contrib/python/textual/textual/lazy.py @@ -83,7 +83,7 @@ class Reveal(Widget): yield Logs() yield Sparklines() yield Footer() - ``` + ``` """ DEFAULT_CSS = """ diff --git a/contrib/python/textual/textual/message_pump.py b/contrib/python/textual/textual/message_pump.py index d47c51cf1cc..9ec49f90472 100644 --- a/contrib/python/textual/textual/message_pump.py +++ b/contrib/python/textual/textual/message_pump.py @@ -810,7 +810,7 @@ class MessagePump(metaclass=_MessagePumpMeta): message: A message (including Event). Returns: - `True` if the messages was processed, `False` if it wasn't. + `True` if the message was queued for processing, otherwise `False`. """ _rich_traceback_omit = True if not hasattr(message, "_prevent"): diff --git a/contrib/python/textual/textual/pilot.py b/contrib/python/textual/textual/pilot.py index e7362ea4e64..473341b7e9d 100644 --- a/contrib/python/textual/textual/pilot.py +++ b/contrib/python/textual/textual/pilot.py @@ -194,12 +194,15 @@ class Pilot(Generic[ReturnType]): shift: bool = False, meta: bool = False, control: bool = False, + times: int = 1, ) -> bool: """Simulate clicking with the mouse at a specified position. The final position to be clicked is computed based on the selector provided and the offset specified and it must be within the visible area of the screen. + Implementation note: This method bypasses the normal event processing in `App.on_event`. + Example: The code below runs an app and clicks its only button right in the middle: ```py @@ -218,6 +221,7 @@ class Pilot(Generic[ReturnType]): shift: Click with the shift key held down. meta: Click with the meta key held down. control: Click with the control key held down. + times: The number of times to click. 2 will double-click, 3 will triple-click, etc. Raises: OutOfBounds: If the position to be clicked is outside of the (visible) screen. @@ -235,10 +239,101 @@ class Pilot(Generic[ReturnType]): shift=shift, meta=meta, control=control, + times=times, ) except OutOfBounds as error: raise error from None + async def double_click( + self, + widget: Widget | type[Widget] | str | None = None, + offset: tuple[int, int] = (0, 0), + shift: bool = False, + meta: bool = False, + control: bool = False, + ) -> bool: + """Simulate double clicking with the mouse at a specified position. + + Alias for `pilot.click(..., times=2)`. + + The final position to be clicked is computed based on the selector provided and + the offset specified and it must be within the visible area of the screen. + + Implementation note: This method bypasses the normal event processing in `App.on_event`. + + Example: + The code below runs an app and double-clicks its only button right in the middle: + ```py + async with SingleButtonApp().run_test() as pilot: + await pilot.double_click(Button, offset=(8, 1)) + ``` + + Args: + widget: A widget or selector used as an origin + for the click offset. If this is not specified, the offset is interpreted + relative to the screen. You can use this parameter to try to click on a + specific widget. However, if the widget is currently hidden or obscured by + another widget, the click may not land on the widget you specified. + offset: The offset to click. The offset is relative to the widget / selector provided + or to the screen, if no selector is provided. + shift: Click with the shift key held down. + meta: Click with the meta key held down. + control: Click with the control key held down. + + Raises: + OutOfBounds: If the position to be clicked is outside of the (visible) screen. + + Returns: + True if no selector was specified or if the clicks landed on the selected + widget, False otherwise. + """ + await self.click(widget, offset, shift, meta, control, times=2) + + async def triple_click( + self, + widget: Widget | type[Widget] | str | None = None, + offset: tuple[int, int] = (0, 0), + shift: bool = False, + meta: bool = False, + control: bool = False, + ) -> bool: + """Simulate triple clicking with the mouse at a specified position. + + Alias for `pilot.click(..., times=3)`. + + The final position to be clicked is computed based on the selector provided and + the offset specified and it must be within the visible area of the screen. + + Implementation note: This method bypasses the normal event processing in `App.on_event`. + + Example: + The code below runs an app and triple-clicks its only button right in the middle: + ```py + async with SingleButtonApp().run_test() as pilot: + await pilot.triple_click(Button, offset=(8, 1)) + ``` + + Args: + widget: A widget or selector used as an origin + for the click offset. If this is not specified, the offset is interpreted + relative to the screen. You can use this parameter to try to click on a + specific widget. However, if the widget is currently hidden or obscured by + another widget, the click may not land on the widget you specified. + offset: The offset to click. The offset is relative to the widget / selector provided + or to the screen, if no selector is provided. + shift: Click with the shift key held down. + meta: Click with the meta key held down. + control: Click with the control key held down. + + Raises: + OutOfBounds: If the position to be clicked is outside of the (visible) screen. + + Returns: + True if no selector was specified or if the clicks landed on the selected + widget, False otherwise. + """ + await self.click(widget, offset, shift, meta, control, times=3) + async def hover( self, widget: Widget | type[Widget] | str | None | None = None, @@ -282,6 +377,7 @@ class Pilot(Generic[ReturnType]): shift: bool = False, meta: bool = False, control: bool = False, + times: int = 1, ) -> bool: """Simulate a series of mouse events to be fired at a given position. @@ -302,7 +398,7 @@ class Pilot(Generic[ReturnType]): shift: Simulate the events with the shift key held down. meta: Simulate the events with the meta key held down. control: Simulate the events with the control key held down. - + times: The number of times to click. 2 will double-click, 3 will triple-click, etc. Raises: OutOfBounds: If the position for the events is outside of the (visible) screen. @@ -336,22 +432,26 @@ class Pilot(Generic[ReturnType]): ) widget_at = None - for mouse_event_cls in events: - # Get the widget under the mouse before the event because the app might - # react to the event and move things around. We override on each iteration - # because we assume the final event in `events` is the actual event we care - # about and that all the preceding events are just setup. - # E.g., the click event is preceded by MouseDown/MouseUp to emulate how - # the driver works and emits a click event. - widget_at, _ = app.get_widget_at(*offset) - event = mouse_event_cls(**message_arguments) - # Bypass event processing in App.on_event. Because App.on_event - # is responsible for updating App.mouse_position, and because - # that's useful to other things (tooltip handling, for example), - # we patch the offset in there as well. - app.mouse_position = offset - app.screen._forward_event(event) - await self.pause() + for chain in range(1, times + 1): + for mouse_event_cls in events: + # Get the widget under the mouse before the event because the app might + # react to the event and move things around. We override on each iteration + # because we assume the final event in `events` is the actual event we care + # about and that all the preceding events are just setup. + # E.g., the click event is preceded by MouseDown/MouseUp to emulate how + # the driver works and emits a click event. + kwargs = message_arguments + if mouse_event_cls is Click: + kwargs["chain"] = chain + widget_at, _ = app.get_widget_at(*offset) + event = mouse_event_cls(**kwargs) + # Bypass event processing in App.on_event. Because App.on_event + # is responsible for updating App.mouse_position, and because + # that's useful to other things (tooltip handling, for example), + # we patch the offset in there as well. + app.mouse_position = offset + screen._forward_event(event) + await self.pause() return widget is None or widget_at is target_widget diff --git a/contrib/python/textual/textual/theme.py b/contrib/python/textual/textual/theme.py index f3ff5045dfc..af36369b8fc 100644 --- a/contrib/python/textual/textual/theme.py +++ b/contrib/python/textual/textual/theme.py @@ -171,7 +171,6 @@ BUILTIN_THEMES: dict[str, Theme] = { "block-cursor-text-style": "b", "block-cursor-blurred-text-style": "i", "input-selection-background": "ansi_blue", - "input-selection-foreground": "ansi_white", "input-cursor-text-style": "reverse", "scrollbar": "ansi_blue", "border-blurred": "ansi_blue", diff --git a/contrib/python/textual/textual/timer.py b/contrib/python/textual/textual/timer.py index 2470453c294..60053161b14 100644 --- a/contrib/python/textual/textual/timer.py +++ b/contrib/python/textual/textual/timer.py @@ -85,12 +85,7 @@ class Timer: self._task = create_task(self._run_timer(), name=self.name) def stop(self) -> None: - """Stop the timer. - - Returns: - A Task object. Await this to wait until the timer has completed. - - """ + """Stop the timer.""" if self._task is None: return diff --git a/contrib/python/textual/textual/widget.py b/contrib/python/textual/textual/widget.py index a543aee836b..5112a132d02 100644 --- a/contrib/python/textual/textual/widget.py +++ b/contrib/python/textual/textual/widget.py @@ -3733,12 +3733,12 @@ class Widget(DOMNode): height - self.scrollbar_size_horizontal ) if self.vertical_scrollbar._repaint_required: - self.call_later(self.vertical_scrollbar.refresh) + self.vertical_scrollbar.refresh() if self.show_horizontal_scrollbar: self.horizontal_scrollbar.window_virtual_size = virtual_size.width self.horizontal_scrollbar.window_size = width - self.scrollbar_size_vertical if self.horizontal_scrollbar._repaint_required: - self.call_later(self.horizontal_scrollbar.refresh) + self.horizontal_scrollbar.refresh() self.scroll_x = self.validate_scroll_x(self.scroll_x) self.scroll_y = self.validate_scroll_y(self.scroll_y) diff --git a/contrib/python/textual/textual/widgets/_input.py b/contrib/python/textual/textual/widgets/_input.py index b25ac0af36a..8f343b1df35 100644 --- a/contrib/python/textual/textual/widgets/_input.py +++ b/contrib/python/textual/textual/widgets/_input.py @@ -2,32 +2,31 @@ from __future__ import annotations import re from dataclasses import dataclass -from typing import TYPE_CHECKING, ClassVar, Iterable +from typing import TYPE_CHECKING, ClassVar, Iterable, NamedTuple from rich.cells import cell_len, get_character_cell_size -from rich.console import Console, ConsoleOptions, RenderableType -from rich.console import RenderResult as RichRenderResult +from rich.console import RenderableType from rich.highlighter import Highlighter -from rich.segment import Segment from rich.text import Text from typing_extensions import Literal from textual import events -from textual._segment_tools import line_crop +from textual.expand_tabs import expand_tabs_inline +from textual.scroll_view import ScrollView +from textual.strip import Strip if TYPE_CHECKING: - from textual.app import RenderResult + pass from textual.binding import Binding, BindingType from textual.css._error_tools import friendly_list from textual.events import Blur, Focus, Mount -from textual.geometry import Offset, Size +from textual.geometry import Offset, Region, Size, clamp from textual.message import Message from textual.reactive import Reactive, reactive, var from textual.suggester import Suggester, SuggestionReady from textual.timer import Timer from textual.validation import ValidationResult, Validator -from textual.widget import Widget InputValidationOn = Literal["blur", "changed", "submitted"] """Possible messages that trigger input validation.""" @@ -42,66 +41,70 @@ _RESTRICT_TYPES = { InputType = Literal["integer", "number", "text"] -class _InputRenderable: - """Render the input content.""" +class Selection(NamedTuple): + """A range of selected text within the Input. - def __init__(self, input: Input, cursor_visible: bool) -> None: - self.input = input - self.cursor_visible = cursor_visible + Text can be selected by clicking and dragging the mouse, or by pressing + shift+arrow keys. - def __rich_console__( - self, console: "Console", options: "ConsoleOptions" - ) -> RichRenderResult: - input = self.input - result = input._value - width = input.content_size.width - - # Add the completion with a faded style. - value = input.value - value_length = len(value) - suggestion = input._suggestion - show_suggestion = len(suggestion) > value_length and input.has_focus - if show_suggestion: - result += Text( - suggestion[value_length:], - input.get_component_rich_style("input--suggestion"), - ) + Attributes: + start: The start index of the selection. + end: The end index of the selection. + """ - if self.cursor_visible and input.has_focus: - if not show_suggestion and input._cursor_at_end: - result.pad_right(1) - cursor_style = input.get_component_rich_style("input--cursor") - cursor = input.cursor_position - result.stylize(cursor_style, cursor, cursor + 1) + start: int + end: int - segments = list(result.render(console)) - line_length = Segment.get_line_length(segments) - if line_length < width: - segments = Segment.adjust_line_length(segments, width) - line_length = width + @classmethod + def cursor(cls, cursor_position: int) -> Selection: + """Create a selection from a cursor position.""" + return cls(cursor_position, cursor_position) - line = line_crop( - list(segments), - input.view_position, - input.view_position + width, - line_length, - ) - yield from line + @property + def is_empty(self) -> bool: + """Return True if the selection is empty.""" + return self.start == self.end -class Input(Widget, can_focus=True): +class Input(ScrollView): """A text input widget.""" BINDINGS: ClassVar[list[BindingType]] = [ Binding("left", "cursor_left", "Move cursor left", show=False), + Binding( + "shift+left", + "cursor_left(True)", + "Move cursor left and select", + show=False, + ), Binding("ctrl+left", "cursor_left_word", "Move cursor left a word", show=False), + Binding( + "ctrl+shift+left", + "cursor_left_word(True)", + "Move cursor left a word and select", + show=False, + ), Binding("right", "cursor_right", "Move cursor right", show=False), Binding( + "shift+right", + "cursor_right(True)", + "Move cursor right and select", + show=False, + ), + Binding( "ctrl+right", "cursor_right_word", "Move cursor right a word", show=False ), + Binding( + "ctrl+shift+right", + "cursor_right_word(True)", + "Move cursor right a word and select", + show=False, + ), Binding("backspace", "delete_left", "Delete character left", show=False), Binding("home,ctrl+a", "home", "Go to start", show=False), Binding("end,ctrl+e", "end", "Go to end", show=False), + Binding("shift+home", "home(True)", "Select line start", show=False), + Binding("shift+end", "end(True)", "Select line end", show=False), Binding("delete,ctrl+d", "delete_right", "Delete character right", show=False), Binding("enter", "submit", "Submit", show=False), Binding( @@ -112,6 +115,9 @@ class Input(Widget, can_focus=True): "ctrl+f", "delete_right_word", "Delete right to start of word", show=False ), Binding("ctrl+k", "delete_right_all", "Delete all to the right", show=False), + Binding("ctrl+x", "cut", "Cut selected text", show=False), + Binding("ctrl+c", "copy", "Copy selected text", show=False), + Binding("ctrl+v", "paste", "Paste text from the clipboard", show=False), ] """ | Key(s) | Description | @@ -135,6 +141,7 @@ class Input(Widget, can_focus=True): "input--cursor", "input--placeholder", "input--suggestion", + "input--selection", } """ | Class | Description | @@ -142,6 +149,7 @@ class Input(Widget, can_focus=True): | `input--cursor` | Target the cursor. | | `input--placeholder` | Target the placeholder text (when it exists). | | `input--suggestion` | Target the auto-completion suggestion (when it exists). | + | `input--selection` | Target the selected text. | """ DEFAULT_CSS = """ @@ -152,6 +160,7 @@ class Input(Widget, can_focus=True): border: tall $border-blurred; width: 100%; height: 3; + scrollbar-size-horizontal: 0; &:focus { border: tall $border; @@ -162,6 +171,9 @@ class Input(Widget, can_focus=True): color: $input-cursor-foreground; text-style: $input-cursor-text-style; } + &>.input--selection { + background: $input-selection-background; + } &>.input--placeholder, &>.input--suggestion { color: $text-disabled; } @@ -195,13 +207,23 @@ class Input(Widget, can_focus=True): """ cursor_blink = reactive(True, init=False) - value = reactive("", layout=True, init=False) - input_scroll_offset = reactive(0) - cursor_position: Reactive[int] = reactive(0) - view_position = reactive(0) + # TODO - check with width: auto to see if layout=True is needed + value: Reactive[str] = reactive("", init=False) + + @property + def cursor_position(self) -> int: + """The current position of the cursor, corresponding to the end of the selection.""" + return self.selection.end + + @cursor_position.setter + def cursor_position(self, position: int) -> None: + """Set the current position of the cursor.""" + self.selection = Selection.cursor(position) + + selection: Reactive[Selection] = reactive(Selection.cursor(0)) + """The currently selected range of text.""" + placeholder = reactive("") - complete = reactive("") - width = reactive(1) _cursor_visible = reactive(True) password = reactive(False) suggester: Suggester | None @@ -276,6 +298,7 @@ class Input(Widget, can_focus=True): validators: Validator | Iterable[Validator] | None = None, validate_on: Iterable[InputValidationOn] | None = None, valid_empty: bool = False, + select_on_focus: bool = True, name: str | None = None, id: str | None = None, classes: str | None = None, @@ -299,6 +322,7 @@ class Input(Widget, can_focus=True): which determine when to do input validation. The default is to do validation for all messages. valid_empty: Empty values are valid. + select_on_focus: Whether to select all text on focus. name: Optional name for the input widget. id: Optional ID for the widget. classes: Optional initial classes for the widget. @@ -358,6 +382,9 @@ class Input(Widget, can_focus=True): elif self.type == "number": self.validators.append(Number()) + self._selecting = False + """True if the user is selecting text with the mouse.""" + self._initial_value = True """Indicates if the value has been set for the first time yet.""" if value is not None: @@ -366,10 +393,18 @@ class Input(Widget, can_focus=True): if tooltip is not None: self.tooltip = tooltip + self.select_on_focus = select_on_focus + def _position_to_cell(self, position: int) -> int: - """Convert an index within the value to cell position.""" - cell_offset = cell_len(self.value[:position]) - return cell_offset + """Convert an index within the value to cell position. + + Args: + position: The index within the value to convert. + + Returns: + The cell position corresponding to the index. + """ + return cell_len(expand_tabs_inline(self.value[:position], 4)) @property def _cursor_offset(self) -> int: @@ -382,7 +417,7 @@ class Input(Widget, can_focus=True): @property def _cursor_at_end(self) -> bool: """Flag to indicate if the cursor is at the end""" - return self.cursor_position >= len(self.value) + return self.cursor_position == len(self.value) def check_consume_key(self, key: str, character: str | None) -> bool: """Check if the widget may consume the given key. @@ -398,32 +433,19 @@ class Input(Widget, can_focus=True): """ return character is not None and character.isprintable() - def validate_cursor_position(self, cursor_position: int) -> int: - return min(max(0, cursor_position), len(self.value)) - - def validate_view_position(self, view_position: int) -> int: - width = self.content_size.width - new_view_position = max(0, min(view_position, self.cursor_width - width)) - return new_view_position - - def _watch_cursor_position(self) -> None: - width = self.content_size.width - if width == 0: - # If the input has no width the view position can't be elsewhere. - self.view_position = 0 - return - - view_start = self.view_position - view_end = view_start + width - cursor_offset = self._cursor_offset - - if cursor_offset >= view_end or cursor_offset < view_start: - view_position = cursor_offset - width // 2 - self.view_position = view_position - else: - self.view_position = self.view_position + def validate_selection(self, selection: Selection) -> Selection: + start, end = selection + value_length = len(self.value) + return Selection(clamp(start, 0, value_length), clamp(end, 0, value_length)) + def _watch_selection(self, selection: Selection) -> None: self.app.cursor_position = self.cursor_screen_offset + if not self._initial_value: + self.scroll_to_region( + Region(self._cursor_offset, 0, width=1, height=1), + force=True, + animate=False, + ) def _watch_cursor_blink(self, blink: bool) -> None: """Ensure we handle updating the cursor blink at runtime.""" @@ -431,16 +453,19 @@ class Input(Widget, can_focus=True): if blink: self._blink_timer.resume() else: - self._pause_blink_cycle() + self._pause_blink() self._cursor_visible = True @property def cursor_screen_offset(self) -> Offset: """The offset of the cursor of this input in screen-space. (x, y)/(column, row)""" x, y, _width, _height = self.content_region - return Offset(x + self._cursor_offset - self.view_position, y) + scroll_x, _ = self.scroll_offset + return Offset(x + self._cursor_offset - scroll_x, y) def _watch_value(self, value: str) -> None: + """Update the virtual size and suggestion when the value changes.""" + self.virtual_size = Size(self.content_width, 1) self._suggestion = "" if self.suggester and value: self.run_worker(self.suggester._get_suggestion(self, value)) @@ -507,17 +532,15 @@ class Input(Widget, can_focus=True): """Check if the value has passed validation.""" return self._valid - @property - def cursor_width(self) -> int: - """The width of the input (with extra space for cursor at the end).""" - if self.placeholder and not self.value: - return cell_len(self.placeholder) - return self._position_to_cell(len(self.value)) + 1 + def render_line(self, y: int) -> Strip: + if y != 0: + return Strip.blank(self.size.width) + + console = self.app.console + max_content_width = self.scrollable_content_region.width - def render(self) -> RenderResult: - self.view_position = self.view_position if not self.value: - placeholder = Text(self.placeholder, justify="left") + placeholder = Text(self.placeholder, justify="left", end="") placeholder.stylize(self.get_component_rich_style("input--placeholder")) if self.has_focus: cursor_style = self.get_component_rich_style("input--cursor") @@ -525,24 +548,77 @@ class Input(Widget, can_focus=True): # If the placeholder is empty, there's no characters to stylise # to make the cursor flash, so use a single space character if len(placeholder) == 0: - placeholder = Text(" ") + placeholder = Text(" ", end="") placeholder.stylize(cursor_style, 0, 1) - return placeholder - return _InputRenderable(self, self._cursor_visible) + + strip = Strip( + console.render( + placeholder, console.options.update_width(max_content_width + 1) + ) + ) + else: + result = self._value + + # Add the completion with a faded style. + value = self.value + value_length = len(value) + suggestion = self._suggestion + show_suggestion = len(suggestion) > value_length and self.has_focus + if show_suggestion: + result += Text( + suggestion[value_length:], + self.get_component_rich_style("input--suggestion"), + end="", + ) + + if self.has_focus: + if not self.selection.is_empty: + start, end = self.selection + start, end = sorted((start, end)) + selection_style = self.get_component_rich_style("input--selection") + result.stylize_before(selection_style, start, end) + + if self._cursor_visible: + cursor_style = self.get_component_rich_style("input--cursor") + cursor = self.cursor_position + if not show_suggestion and self._cursor_at_end: + result.pad_right(1) + result.stylize(cursor_style, cursor, cursor + 1) + + segments = list( + console.render(result, console.options.update_width(self.content_width)) + ) + + strip = Strip(segments) + scroll_x, _ = self.scroll_offset + strip = strip.crop(scroll_x, scroll_x + max_content_width + 1) + strip = strip.extend_cell_length(max_content_width + 1) + + return strip.apply_style(self.rich_style) @property def _value(self) -> Text: """Value rendered as text.""" if self.password: - return Text("•" * len(self.value), no_wrap=True, overflow="ignore") + return Text("•" * len(self.value), no_wrap=True, overflow="ignore", end="") else: - text = Text(self.value, no_wrap=True, overflow="ignore") + text = Text(self.value, no_wrap=True, overflow="ignore", end="") if self.highlighter is not None: text = self.highlighter(text) return text + @property + def content_width(self) -> int: + """The width of the content.""" + if self.placeholder and not self.value: + return cell_len(self.placeholder) + + # Extra space for cursor at the end. + return self._value.cell_len + 1 + def get_content_width(self, container: Size, viewport: Size) -> int: - return self.cursor_width + """Get the widget of the content.""" + return self.content_width def get_content_height(self, container: Size, viewport: Size, width: int) -> int: return 1 @@ -559,67 +635,97 @@ class Input(Widget, can_focus=True): ) def _on_blur(self, event: Blur) -> None: - self._pause_blink_cycle() + self._pause_blink() if "blur" in self.validate_on: self.validate(self.value) def _on_focus(self, event: Focus) -> None: - self._restart_blink_cycle() + self._restart_blink() + if self.select_on_focus: + self.selection = Selection(0, len(self.value)) self.app.cursor_position = self.cursor_screen_offset self._suggestion = "" async def _on_key(self, event: events.Key) -> None: - self._restart_blink_cycle() + self._restart_blink() if event.is_printable: event.stop() assert event.character is not None - self.insert_text_at_cursor(event.character) + selection = self.selection + if selection.is_empty: + self.insert_text_at_cursor(event.character) + else: + self.replace(event.character, *selection) event.prevent_default() def _on_paste(self, event: events.Paste) -> None: if event.text: line = event.text.splitlines()[0] - self.insert_text_at_cursor(line) + selection = self.selection + if selection.is_empty: + self.insert_text_at_cursor(line) + else: + self.replace(line, *selection) event.stop() - async def _on_click(self, event: events.Click) -> None: - offset = event.get_content_offset(self) - if offset is None: - return - event.stop() - click_x = offset.x + self.view_position + def _cell_offset_to_index(self, offset: int) -> int: + """Convert a cell offset to a character index, accounting for character width. + + Args: + offset: The cell offset to convert. + + Returns: + The character index corresponding to the cell offset. + """ cell_offset = 0 _cell_size = get_character_cell_size + scroll_x, _ = self.scroll_offset + offset += scroll_x for index, char in enumerate(self.value): cell_width = _cell_size(char) - if cell_offset <= click_x < (cell_offset + cell_width): - self.cursor_position = index - break + if cell_offset <= offset < (cell_offset + cell_width): + return index cell_offset += cell_width - else: - self.cursor_position = len(self.value) + return clamp(offset, 0, len(self.value)) async def _on_mouse_down(self, event: events.MouseDown) -> None: - self._pause_blink_cycle() + self._pause_blink(visible=True) + offset_x, _ = event.get_content_offset_capture(self) + self.selection = Selection.cursor(self._cell_offset_to_index(offset_x)) + self._selecting = True + self.capture_mouse() async def _on_mouse_up(self, event: events.MouseUp) -> None: - self._restart_blink_cycle() + if self._selecting: + self._selecting = False + self.release_mouse() + self._restart_blink() + + async def _on_mouse_move(self, event: events.MouseMove) -> None: + if self._selecting: + # As we drag the mouse, we update the end position of the selection, + # keeping the start position fixed. + offset = event.get_content_offset_capture(self) + selection_start, _ = self.selection + self.selection = Selection( + selection_start, self._cell_offset_to_index(offset.x) + ) async def _on_suggestion_ready(self, event: SuggestionReady) -> None: """Handle suggestion messages and set the suggestion when relevant.""" if event.value == self.value: self._suggestion = event.suggestion - def _restart_blink_cycle(self) -> None: + def _restart_blink(self) -> None: """Restart the cursor blink cycle.""" self._cursor_visible = True if self.cursor_blink and self._blink_timer: self._blink_timer.reset() - def _pause_blink_cycle(self) -> None: + def _pause_blink(self, visible: bool = False) -> None: """Hide the blinking cursor and pause the blink cycle.""" - self._cursor_visible = False + self._cursor_visible = visible if self._blink_timer: self._blink_timer.pause() @@ -629,43 +735,7 @@ class Input(Widget, can_focus=True): Args: text: New text to insert. """ - - def check_allowed_value(value: str) -> bool: - """Check if new value is restricted.""" - # Check max length - if self.max_length and len(value) > self.max_length: - return False - # Check explicit restrict - if self.restrict and re.fullmatch(self.restrict, value) is None: - return False - # Check type restrict - if self.type: - type_restrict = _RESTRICT_TYPES.get(self.type, None) - if ( - type_restrict is not None - and re.fullmatch(type_restrict, value) is None - ): - return False - # Character is allowed - return True - - if self.cursor_position >= len(self.value): - new_value = self.value + text - if check_allowed_value(new_value): - self.value = new_value - self.cursor_position = len(self.value) - else: - self.restricted() - else: - value = self.value - before = value[: self.cursor_position] - after = value[self.cursor_position :] - new_value = f"{before}{text}{after}" - if check_allowed_value(new_value): - self.value = new_value - self.cursor_position += len(text) - else: - self.restricted() + self.insert(text, self.cursor_position) def restricted(self) -> None: """Called when a character has been restricted. @@ -679,68 +749,187 @@ class Input(Widget, can_focus=True): """Clear the input.""" self.value = "" - def action_cursor_left(self) -> None: - """Move the cursor one position to the left.""" - self.cursor_position -= 1 + @property + def selected_text(self) -> str: + """The text between the start and end points of the current selection.""" + start, end = sorted(self.selection) + return self.value[start:end] - def action_cursor_right(self) -> None: - """Accept an auto-completion or move the cursor one position to the right.""" - if self._cursor_at_end and self._suggestion: - self.value = self._suggestion - self.cursor_position = len(self.value) + def action_cursor_left(self, select: bool = False) -> None: + """Move the cursor one position to the left. + + Args: + select: If `True`, select the text to the left of the cursor. + """ + if select: + start, end = self.selection + self.selection = Selection(start, end - 1) else: - self.cursor_position += 1 + self.cursor_position -= 1 - def action_home(self) -> None: - """Move the cursor to the start of the input.""" - self.cursor_position = 0 + def action_cursor_right(self, select: bool = False) -> None: + """Accept an auto-completion or move the cursor one position to the right. - def action_end(self) -> None: - """Move the cursor to the end of the input.""" - self.cursor_position = len(self.value) + Args: + select: If `True`, select the text to the right of the cursor. + """ + if select: + start, end = self.selection + self.selection = Selection(start, end + 1) + else: + if self._cursor_at_end and self._suggestion: + self.value = self._suggestion + self.cursor_position = len(self.value) + else: + self.cursor_position += 1 + + def action_home(self, select: bool = False) -> None: + """Move the cursor to the start of the input. + + Args: + select: If `True`, select the text between the old and new cursor positions. + """ + if select: + self.selection = Selection(self.cursor_position, 0) + else: + self.cursor_position = 0 + + def action_end(self, select: bool = False) -> None: + """Move the cursor to the end of the input. + + Args: + select: If `True`, select the text between the old and new cursor positions. + """ + if select: + self.selection = Selection(self.cursor_position, len(self.value)) + else: + self.cursor_position = len(self.value) _WORD_START = re.compile(r"(?<=\W)\w") - def action_cursor_left_word(self) -> None: - """Move the cursor left to the start of a word.""" + def action_cursor_left_word(self, select: bool = False) -> None: + """Move the cursor left to the start of a word. + + Args: + select: If `True`, select the text between the old and new cursor positions. + """ if self.password: # This is a password field so don't give any hints about word # boundaries, even during movement. - self.action_home() + self.action_home(select) else: + start, _ = self.selection try: *_, hit = re.finditer( self._WORD_START, self.value[: self.cursor_position] ) except ValueError: - self.cursor_position = 0 + target = 0 + else: + target = hit.start() + + if select: + self.selection = Selection(start, target) else: - self.cursor_position = hit.start() + self.cursor_position = target + + def action_cursor_right_word(self, select: bool = False) -> None: + """Move the cursor right to the start of a word. - def action_cursor_right_word(self) -> None: - """Move the cursor right to the start of a word.""" + Args: + select: If `True`, select the text between the old and new cursor positions. + """ if self.password: # This is a password field so don't give any hints about word # boundaries, even during movement. - self.action_end() + self.action_end(select) else: hit = re.search(self._WORD_START, self.value[self.cursor_position :]) + + start, end = self.selection if hit is None: - self.cursor_position = len(self.value) + target = len(self.value) else: - self.cursor_position += hit.start() + target = end + hit.start() + + if select: + self.selection = Selection(start, target) + else: + self.cursor_position = target + + def replace(self, text: str, start: int, end: int) -> None: + """Replace the text between the start and end locations with the given text. + + Args: + text: Text to replace the existing text with. + start: Start index to replace (inclusive). + end: End index to replace (inclusive). + """ + + def check_allowed_value(value: str) -> bool: + """Check if new value is restricted.""" + + # Check max length + if self.max_length and len(value) > self.max_length: + return False + # Check explicit restrict + if self.restrict and re.fullmatch(self.restrict, value) is None: + return False + # Check type restrict + if self.type: + type_restrict = _RESTRICT_TYPES.get(self.type, None) + if ( + type_restrict is not None + and re.fullmatch(type_restrict, value) is None + ): + return False + # Character is allowed + return True + + value = self.value + start, end = sorted((max(0, start), min(len(value), end))) + new_value = f"{value[:start]}{text}{value[end:]}" + if check_allowed_value(new_value): + self.value = new_value + self.cursor_position = start + len(text) + else: + self.restricted() + + def insert(self, text: str, index: int) -> None: + """Insert text at the given index. + + Args: + text: Text to insert. + index: Index to insert the text at (inclusive). + """ + self.replace(text, index, index) + + def delete(self, start: int, end: int) -> None: + """Delete the text between the start and end locations. + + Args: + start: Start index to delete (inclusive). + end: End index to delete (inclusive). + """ + self.replace("", start, end) + + def delete_selection(self) -> None: + """Delete the current selection.""" + self.delete(*self.selection) def action_delete_right(self) -> None: """Delete one character at the current cursor position.""" - value = self.value - delete_position = self.cursor_position - before = value[:delete_position] - after = value[delete_position + 1 :] - self.value = f"{before}{after}" - self.cursor_position = delete_position + if self.selection.is_empty: + self.delete(self.cursor_position, self.cursor_position + 1) + else: + self.delete_selection() def action_delete_right_word(self) -> None: """Delete the current character and all rightward to the start of the next word.""" + if not self.selection.is_empty: + self.delete_selection() + return + if self.password: # This is a password field so don't give any hints about word # boundaries, even during deletion. @@ -749,60 +938,54 @@ class Input(Widget, can_focus=True): after = self.value[self.cursor_position :] hit = re.search(self._WORD_START, after) if hit is None: - self.value = self.value[: self.cursor_position] + self.action_delete_right_all() else: - self.value = ( - f"{self.value[: self.cursor_position]}{after[hit.end() - 1:]}" - ) + start = self.cursor_position + end = start + hit.end() - 1 + self.delete(start, end) def action_delete_right_all(self) -> None: """Delete the current character and all characters to the right of the cursor position.""" - self.value = self.value[: self.cursor_position] + if self.selection.is_empty: + self.delete(self.cursor_position, len(self.value)) + else: + self.delete_selection() def action_delete_left(self) -> None: """Delete one character to the left of the current cursor position.""" - if self.cursor_position <= 0: - # Cursor at the start, so nothing to delete - return - if self.cursor_position == len(self.value): - # Delete from end - self.value = self.value[:-1] - self.cursor_position = len(self.value) + if self.selection.is_empty: + self.delete(self.cursor_position - 1, self.cursor_position) else: - # Cursor in the middle - value = self.value - delete_position = self.cursor_position - 1 - before = value[:delete_position] - after = value[delete_position + 1 :] - self.value = f"{before}{after}" - self.cursor_position = delete_position + self.delete_selection() def action_delete_left_word(self) -> None: """Delete leftward of the cursor position to the start of a word.""" - if self.cursor_position <= 0: + if not self.selection.is_empty: + self.delete_selection() return + if self.password: # This is a password field so don't give any hints about word # boundaries, even during deletion. self.action_delete_left_all() else: - after = self.value[self.cursor_position :] try: *_, hit = re.finditer( self._WORD_START, self.value[: self.cursor_position] ) except ValueError: - self.cursor_position = 0 + target = 0 else: - self.cursor_position = hit.start() - new_value = f"{self.value[: self.cursor_position]}{after}" - self.value = new_value + target = hit.start() + + self.delete(target, self.cursor_position) def action_delete_left_all(self) -> None: """Delete all characters to the left of the cursor position.""" - if self.cursor_position > 0: - self.value = self.value[self.cursor_position :] - self.cursor_position = 0 + if self.selection.is_empty: + self.delete(0, self.cursor_position) + else: + self.delete_selection() async def action_submit(self) -> None: """Handle a submit action. @@ -813,3 +996,18 @@ class Input(Widget, can_focus=True): self.validate(self.value) if "submitted" in self.validate_on else None ) self.post_message(self.Submitted(self, self.value, validation_result)) + + def action_cut(self) -> None: + """Cut the current selection (copy to clipboard and remove from input).""" + self.app.copy_to_clipboard(self.selected_text) + self.delete_selection() + + def action_copy(self) -> None: + """Copy the current selection to the clipboard.""" + self.app.copy_to_clipboard(self.selected_text) + + def action_paste(self) -> None: + """Paste from the local clipboard.""" + clipboard = self.app.clipboard + start, end = self.selection + self.replace(clipboard, start, end) diff --git a/contrib/python/textual/textual/widgets/_key_panel.py b/contrib/python/textual/textual/widgets/_key_panel.py index 6e0502f21bb..e187a679824 100644 --- a/contrib/python/textual/textual/widgets/_key_panel.py +++ b/contrib/python/textual/textual/widgets/_key_panel.py @@ -71,7 +71,10 @@ class BindingsTable(Static): action_to_bindings: defaultdict[str, list[tuple[Binding, bool, str]]] action_to_bindings = defaultdict(list) for _, binding, enabled, tooltip in table_bindings: - action_to_bindings[binding.action].append((binding, enabled, tooltip)) + if not binding.system: + action_to_bindings[binding.action].append( + (binding, enabled, tooltip) + ) description_style = self.get_component_rich_style( "bindings-table--description" diff --git a/contrib/python/textual/textual/widgets/_masked_input.py b/contrib/python/textual/textual/widgets/_masked_input.py index 4fc0e00b3de..560258f3320 100644 --- a/contrib/python/textual/textual/widgets/_masked_input.py +++ b/contrib/python/textual/textual/widgets/_masked_input.py @@ -5,19 +5,18 @@ from dataclasses import dataclass from enum import Flag, auto from typing import TYPE_CHECKING, Iterable, Pattern -from rich.console import Console, ConsoleOptions, RenderableType -from rich.console import RenderResult as RichRenderResult +from rich.console import RenderableType from rich.segment import Segment from rich.text import Text from typing_extensions import Literal from textual import events -from textual._segment_tools import line_crop +from textual.strip import Strip if TYPE_CHECKING: - from textual.app import RenderResult + pass -from textual.reactive import var +from textual.reactive import Reactive, var from textual.validation import ValidationResult, Validator from textual.widgets._input import Input @@ -63,55 +62,6 @@ _TEMPLATE_CHARACTERS = { } -class _InputRenderable: - """Render the input content.""" - - def __init__(self, input: Input, cursor_visible: bool) -> None: - self.input = input - self.cursor_visible = cursor_visible - - def __rich_console__( - self, console: "Console", options: "ConsoleOptions" - ) -> RichRenderResult: - input = self.input - result = input._value - width = input.content_size.width - - # Add the completion with a faded style. - value = input.value - value_length = len(value) - template = input._template - style = input.get_component_rich_style("input--placeholder") - result += Text( - template.mask[value_length:], - style, - ) - for index, (char, char_definition) in enumerate(zip(value, template.template)): - if char == " ": - result.stylize(style, index, index + 1) - - if self.cursor_visible and input.has_focus: - if input._cursor_at_end: - result.pad_right(1) - cursor_style = input.get_component_rich_style("input--cursor") - cursor = input.cursor_position - result.stylize(cursor_style, cursor, cursor + 1) - - segments = list(result.render(console)) - line_length = Segment.get_line_length(segments) - if line_length < width: - segments = Segment.adjust_line_length(segments, width) - line_length = width - - line = line_crop( - list(segments), - input.view_position, - input.view_position + width, - line_length, - ) - yield from line - - class _Template(Validator): """Template mask enforcer.""" @@ -493,7 +443,7 @@ class _Template(Validator): class MaskedInput(Input, can_focus=True): """A masked text input widget.""" - template = var("") + template: Reactive[str] = var("") """Input template mask currently in use.""" def __init__( @@ -505,6 +455,7 @@ class MaskedInput(Input, can_focus=True): validators: Validator | Iterable[Validator] | None = None, validate_on: Iterable[InputValidationOn] | None = None, valid_empty: bool = False, + select_on_focus: bool = True, name: str | None = None, id: str | None = None, classes: str | None = None, @@ -534,6 +485,7 @@ class MaskedInput(Input, can_focus=True): validators=validators, validate_on=validate_on, valid_empty=valid_empty, + select_on_focus=select_on_focus, name=name, id=id, classes=classes, @@ -596,14 +548,48 @@ class MaskedInput(Input, can_focus=True): return combined_result - def render(self) -> RenderResult: - return _InputRenderable(self, self._cursor_visible) + def render_line(self, y: int) -> Strip: + if y != 0: + return Strip.blank(self.size.width) + + result = self._value + width = self.content_size.width + + # Add the completion with a faded style. + value = self.value + value_length = len(value) + template = self._template + style = self.get_component_rich_style("input--placeholder") + result += Text( + template.mask[value_length:], + style, + end="", + ) + for index, (char, char_definition) in enumerate(zip(value, template.template)): + if char == " ": + result.stylize(style, index, index + 1) + + if self._cursor_visible and self.has_focus: + if self._cursor_at_end: + result.pad_right(1) + cursor_style = self.get_component_rich_style("input--cursor") + cursor = self.cursor_position + result.stylize(cursor_style, cursor, cursor + 1) + + segments = list(result.render(self.app.console)) + line_length = Segment.get_line_length(segments) + if line_length < width: + segments = Segment.adjust_line_length(segments, width) + line_length = width + + strip = Strip(segments).crop(self.scroll_offset.x, self.scroll_offset.x + width) + return strip.apply_style(self.rich_style) @property def _value(self) -> Text: """Value rendered as text.""" value = self._template.display(self.value) - return Text(value, no_wrap=True, overflow="ignore") + return Text(value, no_wrap=True, overflow="ignore", end="") async def _on_click(self, event: events.Click) -> None: """Ensure clicking on value does not leave cursor on a separator.""" diff --git a/contrib/python/textual/textual/widgets/_text_area.py b/contrib/python/textual/textual/widgets/_text_area.py index e4982103362..b011d8d8aeb 100644 --- a/contrib/python/textual/textual/widgets/_text_area.py +++ b/contrib/python/textual/textual/widgets/_text_area.py @@ -226,7 +226,9 @@ TextArea { Binding( "ctrl+f", "delete_word_right", "Delete right to start of word", show=False ), - Binding("ctrl+x", "delete_line", "Delete line", show=False), + Binding("ctrl+x", "cut", "Cut", show=False), + Binding("ctrl+c", "copy", "Copy", show=False), + Binding("ctrl+v", "paste", "Paste", show=False), Binding( "ctrl+u", "delete_to_start_of_line", "Delete to line start", show=False ), @@ -236,6 +238,12 @@ TextArea { "Delete to line end", show=False, ), + Binding( + "ctrl+shift+k", + "delete_line", + "Delete line", + show=False, + ), Binding("ctrl+z", "undo", "Undo", show=False), Binding("ctrl+y", "redo", "Redo", show=False), ] @@ -264,13 +272,16 @@ TextArea { | ctrl+w | Delete from cursor to start of the word. | | delete,ctrl+d | Delete character to the right of cursor. | | ctrl+f | Delete from cursor to end of the word. | - | ctrl+x | Delete the current line. | + | ctrl+shift+k | Delete the current line. | | ctrl+u | Delete from cursor to the start of the line. | | ctrl+k | Delete from cursor to the end of the line. | | f6 | Select the current line. | | f7 | Select all text in the document. | | ctrl+z | Undo. | | ctrl+y | Redo. | + | ctrl+x | Cut selection or line if no selection. | + | ctrl+c | Copy selection to clipboard. | + | ctrl+v | Paste from clipboard. | """ language: Reactive[str | None] = reactive(None, always_update=True, init=False) @@ -2181,6 +2192,10 @@ TextArea { def action_delete_line(self) -> None: """Deletes the lines which intersect with the selection.""" + self._delete_cursor_line() + + def _delete_cursor_line(self) -> EditResult | None: + """Deletes the line (including the line terminator) that the cursor is on.""" start, end = self.selection start, end = sorted((start, end)) start_row, _start_column = start @@ -2197,6 +2212,34 @@ TextArea { deletion = self._delete_via_keyboard(from_location, to_location) if deletion is not None: self.move_cursor_relative(columns=end_column, record_width=False) + return deletion + + def action_cut(self) -> None: + """Cut text (remove and copy to clipboard).""" + if self.read_only: + return + start, end = self.selection + if start == end: + edit_result = self._delete_cursor_line() + else: + edit_result = self._delete_via_keyboard(start, end) + + if edit_result is not None: + self.app.copy_to_clipboard(edit_result.replaced_text) + + def action_copy(self) -> None: + """Copy selection to clipboard.""" + selected_text = self.selected_text + if selected_text: + self.app.copy_to_clipboard(selected_text) + + def action_paste(self) -> None: + """Paste from local clipboard.""" + if self.read_only: + return + clipboard = self.app.clipboard + if result := self._replace_via_keyboard(clipboard, *self.selection): + self.move_cursor(result.end_location) def action_delete_to_start_of_line(self) -> None: """Deletes from the cursor location to the start of the line.""" diff --git a/contrib/python/textual/textual/widgets/input.py b/contrib/python/textual/textual/widgets/input.py index e69de29bb2d..9d2e19975ae 100644 --- a/contrib/python/textual/textual/widgets/input.py +++ b/contrib/python/textual/textual/widgets/input.py @@ -0,0 +1,3 @@ +from textual.widgets._input import Selection + +__all__ = ["Selection"] diff --git a/contrib/python/textual/ya.make b/contrib/python/textual/ya.make index 21a6be3c442..c8f9c6a55e3 100644 --- a/contrib/python/textual/ya.make +++ b/contrib/python/textual/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(0.89.1) +VERSION(1.0.0) LICENSE(MIT) |
