Repository navigation
Conversation
Quest-Claim: 50dc11b82e717266
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
The export writes dart/ as a Dart package: pubspec.yaml, lib/<prefix>.dart, and hook/build.dart, which builds the crate beside it with Cargo. The builder builds each Dart target's library, Android's through the NDK, writes the pub.dev package whose hook/release.json names each by size and SHA-256 on the release, and checks it in clean Dart apps and a Flutter app on an Android emulator through a hot restart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts manifests and lock Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merging this PR will degrade performance by 5.36%1 warning
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
… 3.14's AOT resolves Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndles it at Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rt now names Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Dart libraries build on main's Intel Mac leg in place of this branch's, whose consumer now runs there too, and the source hook resolves the facade path main's export writes relative to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… writes #909's sdist keyed each local package by its absolute path and #917 made the generated manifest spell them relative to the export, so the sdist refused every export on a checkout without a symlink, and unreached_types expected the absolute spelling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 20, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finishes quest/m1/ffi-packaging/pubdev.md: the export writes a Dart package with a build hook, and the builder releases it to pub.dev.
Summary
dart/is a pub package:pubspec.yaml(named for the library's prefix, at the facade's version,sdk: ^3.10.0, onhooks,code_assets, andcrypto),lib/<prefix>.dart(moved fromdart/<prefix>.dart), andhook/build.dart(ffi/runtime/hook.dart, the same for every crate). The hook bundles the library as the assetpackage:<prefix>/<prefix>.dartits@Nativefunctions name. The mode follows from what the package holds, never from trying one path and falling back:hook/release.json, which only a release writes: it downloads its target's library into the build's shared cache. It refuses one longer than, or of a SHA-256 other than, the release names, and an app targeting an older system than the library loads on.../Cargo.toml, with--release --features dart --target <app's>, through the NDK clang Flutter passes for Android. It reruns when a file Cargo's dep-info lists changes.package.py,bindings.yml):<crate>-<version>-dart-<target>.<so|dylib|dll>, the cdylib with thedartglue: Linux x64 and arm64 (glibc 2.28), macOS arm64 and x64 (10.15), iOS arm64 and its simulator (13.0), Windows x64, and Android arm64, armv7, and x86_64 (API 24) at Flutter's floors.androidapi and build legs, using NDK r28.2, Flutter's default; a newmacos-x64build leg, plusx86_64-apple-darwinstaged on the apple api leg.pubjob writes the package. Its pubspec takes Cargo's description, repository, and homepage, and it addsLICENSE,README.md, aCHANGELOG.mdfromchanges.md, andhook/release.jsonnaming each library on the release by size and SHA-256. It then runsdart pub publish --dry-run, which must find no warning, anddart analyze --fatal-infoswith pub.dev's lints.dart-consumer: a new app on Linux x64 and arm64, macOS, and Windows, on stable Dart and on Linux on 3.10.0. Its libraries are served from the loopback. It first checks that a tampered library is refused, then runsdart runand thedart build clibundle.flutter-consumer: a new Flutter app on an x86_64 API 24 emulator, driven throughflutter run --machineand run again after a full hot restart.release.yml): attests and uploads each Dart library with the C archives, then apubjob publishes through pub.dev's automated publishing in apubenvironment. On a rerun, it diffs pub.dev's hosted archive instead of publishing again.bindings-test.ymlrunsffi/moq/moq.dartas the stand-in'sdart-check. The fixtures now set Cargo'srepository, the stand-in from moq-ffi's, as pub's dry run warns without one.ffi/release/README.md(adoption steps, item 9, consumers) andffi/README.md. The "Other registries" table loses its pub.dev row.Decisions
The maintainer was away, so I took my recommendation on each open point:
moqfor the stand-in,moq_ffifor moq-ffi, the name moq already publishes). An export whose prefix isn't a valid Dart package name fails. Rejected: the crate's name, which pub cannot spell with-.hook/release.jsonexists. Rejected: moq's hand-written hook'suser_defineslibrary override. It is a consumer config key, and building from source covers a checkout. Also rejected: finding a checkout by a fixed relative path (../../rs/moq-ffi), which only works for one repository's layout.<crate>-v<version>GitHub release, the XCFramework's host, URL derived as Swift's is (no new input). Size and SHA-256 live inrelease.jsonand the hook reads at most that size. There are no.sha256assets, unlike moq's hook: pub's package hash already pinsrelease.json.x86_64-apple-darwinand the three Android ABIs, the ones Flutter builds for by default (flutter build macosis universal,flutter build apkbuilds three ABIs). Not shipped: the x86_64 iOS simulator, Windows arm64, and Linux riscv64. The source build maps them.^3.10.0, where hooks went stable, tested by its own consumer leg. Dart 3.10'sdart runprints "Running build hooks..." on stdout, which the consumer strips before comparing.code_assets ^2.2.0fordeploymentVersion;cryptocosts nothing extra, sincehooksalready depends on it.LICENSEconcatenates the crate's license files, as pub reads no other name. A crate with none gets Cargo's SPDX expression, and one with neither fails.README.mdis the crate's readme, or a generated line.CHANGELOG.mdischanges.mdunder the version.repository, which is why both fixtures now set one.--release. Hooks get no build mode, and the release profile is the one that ships.pubenvironment. The first version is published by hand, since pub.dev configures it only for a package it holds. The job runs aftergithub-release, so a package never names a library the release doesn't host yet.dart pub getneeds.printin a zone and reports it base64-encoded in 800-character lines between markers. Android's log splits long lines, and a Linux desktop app's output bypassesapp.log. A check therefore prints withprint(documented as adart-checkrule).Public API
dart/<prefix>.dartmoves todart/lib/<prefix>.dart, beside the newdart/pubspec.yamlanddart/hook/build.dart. To migrate, depend ondart/as a package, or point a package config'spackageUriatlib/.dart-checkinput; new<crate>-pubartifact,androidandmacos-x64build legs,androidapi leg; newpackage.pycommandspub,consume-dart,consume-source,consume-flutter.pubjob andpubenvironment; Dart libraries on the GitHub release and in the attestations. A caller re-runspackage.py initor copies the job.Validation
dart/by path:dart runran the hook, which built the crate with Cargo and printed the transcript. A second run took 1s, from cache. Its dependencies were the export's sources and the facade's, from Cargo's dep-info.package.py pubwith the host's library and stand-ins for the others, thendart pub publish --dry-run: no warnings.dart analyze --fatal-infoswith pub.dev's lints, hook included: no issues.consume-dart: refused the tampered library on its SHA-256, and printed the check's output underdart runand from thedart build clibundle, on Dart 3.13 and 3.10.0. A wrong expected transcript failed with a diff.consume-flutter --platform linux(Flutter 3.47.4, Linux desktop under Xvfb): a check that crosses into Rust printed the same lines underdart runand in the Flutter app, both before and after a full hot restart. The check made objects, had Rust call a Dart implementation from another thread, awaited a future bound to a home, and had Rust await a Dart future. This exercises the leaked per-isolateHomeand Rust'sOnceLock'd API table across a restart.just ci: passes.python3 -I ffi/release/test_package.py: 65 tests, including new ones forpub_package.Follow-ups
/quest-planthere): movemoq_ffito this release. Turn on pub.dev's automated publishing for moq'smoq-ffi-v{{version}}tags in apubenvironment, then deletedart/moq_ffi/hook/build.dartand its packaging.quest/m1/ffi-packaging/api-checks.mdowns running the api fixture's checks with their generated transcripts.api.dartbelongs in it too, and the Dart consumers resolve the library alone until then.jniLibson theandroidlegs this adds.Models
Size: M
Implementer: Claude Code, claude-opus-5-5, unknown effort (arm B)
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: e538a08
Base: origin/main at 31c21f8
Risk: high,
it changes .github/workflows/bindings-test.yml, which is always high, as are 1 more of its paths: workflows run with the repository's secrets and decide what merges and shipsClassified: high by the always-high paths
Reviewer: Codex, gpt-6.1-sol, high effort
Session:
01a1f89d-681d-7a81-bf31-52e538727850, round 8Score: 10/10,
The incremental changes handle relative export paths in sdists and include Android’s required log library in Go link flags, with no new issues found.Rounds: 8; first round 2 (medium 2); findings 2 (medium 2): fixed 2, refuted 0, open 0
Findings: none
Reviewer: Codex, gpt-6.1-sol, medium effort, shadow
Session:
01a1f89d-681d-72a3-a4fc-a5273d0932b1Rounds: 3; first round 2 (medium 2); findings 2 (medium 2): fixed 2, refuted 0, open 0