Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the package:boring build process to bundle prebuilt libraries directly within the published package under prebuilt/ instead of downloading them from GitHub Releases during the build. This removes the need for network access in the default fetch build mode. The changes include removing download-related utilities and hash verification files, updating hooks to load the bundled libraries, and adding new tests to verify the prebuilt binaries. Feedback on the new tests suggests simplifying the absolute package URI creation using Directory.absolute.uri and using this absolute URI to locate the example file for improved robustness.
PR HealthPublish ✔️
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. This check can be disabled by tagging the PR with Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with Breaking changes ✔️
This check can be disabled by tagging the PR with API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
This check can be disabled by tagging the PR with Unused Dependencies ✔️
For details on how to fix these, see dependency_validator. This check can be disabled by tagging the PR with License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
This check can be disabled by tagging the PR with
Coverage
|
| File | Coverage |
|---|---|
| pkgs/boring/hook/build.dart | 💔 Not covered |
| pkgs/boring/hook/link.dart | 💔 Not covered |
| pkgs/boring/lib/src/hook_helpers/build_options.dart | 💚 88 % |
| pkgs/boring/lib/src/hook_helpers/prebuilt.dart | 💚 100 % |
| pkgs/boring/lib/src/hook_helpers/targets.dart | 💚 100 % |
| pkgs/boring/tool/precompile_binaries.dart | 💔 Not covered |
This check for test coverage is informational (issues shown here will not fail the PR).
This check can be disabled by tagging the PR with skip-coverage-check.
c26a191 to
3edddc0
Compare
3edddc0 to
4f242bf
Compare
Bundles package:boring's prebuilt libraries in the package archive published to pub.dev, instead of attaching them to `boring-binaries-*` GitHub releases that the build hook downloads, and publishes with SLSA Build L3 provenance via dart-lang/setup-dart's publish.yml. - boring_binaries.yaml also runs on `boring-v<version>` tags: it builds the libraries for all prebuilt targets from the tagged commit, tests the package archive on Linux, macOS, and Windows, and publishes it via setup-dart (`bundled-files`, `attest: true`). publish.yaml skips `boring-v*` tags. - Removes the `release`, `pin`, and `attest` jobs, hashes.dart, tool/regenerate_hashes.dart, and tool/check_prebuilt_binaries.sh, as the libraries are built from the tagged commit. - `fetch` mode and the link-failure fallback read `prebuilt/<target>/<library>` from the package root (prebuilt.dart replaces fetch.dart). tool/precompile_binaries.dart writes there. - Moves the cross-compilation tests to test/prebuilt_test.dart, which runs against the extracted package archive (BORING_PACKAGE_DIR).
4f242bf to
c6d8d35
Compare
Package publishingIf you have publishing permissions, you can use the links below to publish the changes after merging this PR.
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
Note
This PR was generated by an AI coding agent (Jetski) on behalf of @mosuem.
Important
Stacked on #2899 (this PR targets its branch, so the diff only shows the bundling change).
Bundles
package:boring's prebuilt libraries in the package archive published to pub.dev, instead of attaching them toboring-binaries-*GitHub releases that the build hook downloads, and publishes with SLSA Build L3 provenance viadart-lang/setup-dart/.github/workflows/publish.yml(dart-lang/setup-dart#213).CI
boring_binaries.yamlnow also runs onboring-v<version>tags. It builds the libraries for all 11 prebuilt targets from the tagged commit (bundled-files-*), tests the archive on Linux, macOS, and Windows, and delegates publishing todart-lang/setup-dart/.github/workflows/publish.yml(bundled-files,attest: true, running intest-runmode on non-tag runs).publish.yamlskipsboring-v*tags so firehose does not publish the package without the libraries.setup-dart's SLSA Build L3 attestation over the completepackage.tar.gzarchive (which covers all bundled libraries).releaseandpinjobs, so there are no moreboring-binaries-*pre-releases or pin PRs. The libraries are built from the tagged commit, so they always match the vendored BoringSSL. That makeshashes.dart,tool/regenerate_hashes.dart,tool/check_prebuilt_binaries.sh, and the matching steps inboring.yamlunnecessary.pkgs/boring/.pubignore, which pub reads instead of.gitignore, soprebuilt/goes into the archive while git still ignores it.precompilewithout OIDC permissions) is split out into [boring] Pin NASM and the macOS cross-toolchain, and attest in a separate job #2899, which this PR is stacked on. The pinned macOS cross-toolchain step moves with the cross-compilation tests intoboring_binaries.yaml, and the separateattestjob is dropped sincesetup-dartattests the whole archive.Build hook
fetchmode (hook/build.dart) and the link-failure fallback (hook/link.dart) now readprebuilt/<target>/<library>from the package root (lib/src/hook_helpers/prebuilt.dart, which replacesfetch.dart). There's no download, hash check, or cache anymore.prebuilt/, so it gets aBuildErrorthat points tobuildMode: checkout.tool/precompile_binaries.dartwrites toprebuilt/<target>/instead ofbin/boring-<target>-<library>. A local run therefore makes a checkout usable infetchmode.Tests
tree_shaking_test.darttoprebuilt_test.dart. They now build againstBORING_PACKAGE_DIR(the extracted archive), and the file also checks that all 22 libraries are there. Without that variable the file is skipped, as it is inboring.yaml. The cross-toolchain setup moves toboring_binaries.yamlwith it.CI notes
e_machinecheck due to a Dart 3.14.0dart build cliLinux cross-compilation launcher regression (seedart build clion Linux: since 3.14.0bin/<name>is a launcher for a newlib/libdartaot<name>.so(not on macOS, not documented) sdk#64915; WIP SDK fix at https://dart-review.googlesource.com/c/sdk/+/577541).publishis temporarily pinned todart-lang/setup-dart#213(publish-bundled-files, stacked on#212and#210); repin tomain/@v1once those land.Notes
boring-binaries-*releases: published versions ≤ 0.4.2 still download from them.fetchkeeps its name so existinguser_definesdon't break. Renaming it (e.g. toprebuilt, withfetchas an alias) could be a follow-up.publish_boring.yamlis superseded by thesetup-dartcall inboring_binaries.yaml, and supersedes [boring] Clarify auto-PR merge order and close superseded pin PRs #2782, since there are no more pin PRs.