Skip to content

Merge upstream webcrypto.dart master - #478

Closed
jpohhhh wants to merge 75 commits into
google:masterfrom
Telosnex:sync-upstream-master
Closed

jpohhhh wants to merge 75 commits into
google:masterfrom
Telosnex:sync-upstream-master

Conversation

@jpohhhh

@jpohhhh jpohhhh commented Nov 25, 2026

Copy link
Copy Markdown

Merge upstream through 0fa20bd. Retain the Telosnex BoringSSL roll workflow and existing Android AGP 9 configuration, which already addresses the upstream Android change. Update the upstream watch pin. Local analyzer and VM tests pass (Valgrind skipped on macOS).

jpohhhh and others added 30 commits February 22, 2026 08:24
window is undefined in web worker contexts (DedicatedWorkerGlobalScope,
SharedWorkerGlobalScope, ServiceWorkerGlobalScope). globalThis resolves
to the correct global object in all contexts: window on main thread,
self in workers, global in Node.js.

This fixes TypeError when using webcrypto APIs inside Squadron/isolate
web workers.
window is undefined in web worker contexts (DedicatedWorkerGlobalScope,
SharedWorkerGlobalScope, ServiceWorkerGlobalScope). globalThis resolves
to the correct global object in all contexts: window on main thread,
self in workers, global in Node.js.

This fixes TypeError when using webcrypto APIs inside Squadron/isolate
web workers.
# Conflicts:
#	lib/src/crypto_subtle.dart
BoringSSL's AES code has paths that are statically unreachable on arm64,
and the build treats warnings as errors. Upstream BoringSSL disables
C4702 for MSVC for this reason (https://crbug.com/385161043).

Verified on Windows 11 arm64: the package test suite passes.
BoringSSL guards third_party/fiat/asm/*.S with __APPLE__ || __ELF__, and
p256_64.h and curve25519 call them on any non-Windows x86_64 with GCC or
Clang. The source generator assigned them only to linux_x86_64, so a macOS
x64 build failed with undefined _webcrypto_fiat_p256_adx_mul and
_webcrypto_fiat_p256_adx_sqr.
The hook downloads the library from a GitHub release when
native_artifacts/prebuilt.json matches the sources. User define
native_build: auto (default) | download | source. Otherwise it builds
from source as before. The local cache key is now the native_prebuilt
source key plus the toolchain (D4).

.github/workflows/native_release.yml builds all 12 targets on fixed
runners, releases them, and pushes native-manifest/<tag>.
.gitattributes keeps LF line endings so the source key is equal on
Windows.
…publish

The source key counts untracked files, so build output and key listings
now go to RUNNER_TEMP, and each build checks the work tree is clean.
Follows the Telosnex workflow conventions: run-name, default bash shell,
exact-SHA shallow checkout, owner gate on the publishing job.
Each bundled native library's notice is a separate license in LICENSE,
separated by 80 '-' as Flutter's license collector expects, so apps show
them. native_prebuilt 59c965b excludes LICENSE from the source key.
The native files do not change. Telosnex can then drop its
native_prebuilt dependency override.
Pinned sources, defaults.json and host_toolchain. The app overrides
native_prebuilt to this commit; with every package on it, the override
goes. The source key changes, so this needs a new release.
- kiln ^0.1.1 from pub.dev instead of git native_prebuilt.
- .github/workflows/kiln_release.yml and kiln_check.yml call Telosnex/telosnex_ci_tools v0.1.1. tool/kiln/prepare.dart installs NASM for Windows.
- doc/ leaves source_excludes.txt: kiln excludes it by default.
Move to kiln and the shared kiln release workflow
jpohhhh and others added 27 commits November 6, 2026 15:11
…art on the ffigen 23 visitor API (output unchanged)
Telosnex does not support Intel Macs. The job failed more often than any
other (slow, contended macos-15-intel runners), and the ARM64 job still
builds the app.
CI: integration tests on arm64 Android in a container
…ork of

A daily check: alerts once the oldest commit of google/webcrypto.dart not merged here is a week old. The pin is the last upstream commit merged; update it with each merge.
Conflicts:
- .github/workflows/test.yml: kept deleted (the fork uses unit.yml and
  integration.yml).
- tool/bump-boringssl-revision.sh: kept the fork's fix (b75ec44), which
  already assigns the fiat ADX assembly to apple_x86_64; upstream's google#448
  does the same. sources.cmake lists each file once.
- CHANGELOG.md: upstream 0.6.2, then the fork's changes as 0.6.3-wip.
* ci: Telosnex/telosnex_ci_tools v0.5.24

* ci(android): update demo build for Flutter 3.50
# Conflicts:
#	.github/workflows/roll_boringssl.yml
#	example/webcrypto_demo_flutter_app/android/app/build.gradle.kts
#	example/webcrypto_demo_flutter_app/android/gradle.properties
@google-cla

google-cla Bot commented Nov 25, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@jpohhhh

jpohhhh commented Nov 25, 2026

Copy link
Copy Markdown
Author

Opened against upstream by mistake; this is a fork synchronization.

@jpohhhh jpohhhh closed this Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant