• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dart-lang / native / 21713807576
72%

Build:
DEFAULT BRANCH: main
Ran 05 Feb 2026 01:50PM UTC
Jobs 0
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

Canceled at 05 Feb 2026 02:46PM UTC via web
21713807576

push

github

web-flow
[hooks_runner] Filter recorded uses on definition package name (#3041)

Closes: https://github.com/dart-lang/native/issues/3003

## Summary

This PR introduces filtering for `recorded_uses.json` passed to link hooks. Instead of providing all recorded usages from the entire application to every link hook, each hook now receives only the usages of definitions defined within its own package.

## Changes

### `pkgs/hooks_runner`

-   **`NativeAssetsBuildRunner.link`**:
    -   Now parses the `resourceIdentifiers` (if provided).
    -   Iterates through each package in the build plan.
    -   Filters the `Recordings` to include only those where the definition belongs to the current package.
    -   Writes the filtered recordings to a `recorded_uses.json` file in the package's build directory.
    -   Passes this filtered file to the link hook input.

### `pkgs/record_use`

-   **`Recordings` class**:
    -   Added a `filter({String? definitionPackageName})` method.
    -   This method filters `callsForDefinition` and `instancesForDefinition` based on the `importUri` of the definition, checking if it starts with `package:<definitionPackageName>/`.

### Tests

-   Added `pkgs/hooks_runner/test/build_runner/resources_test.dart`:
    -   **`simple_link linking`**: Verifies basic linking behavior.
    -   **`record_use_filtering linking`**: A complex test case involving three packages (`pirate_adventure`, `pirate_speak`, `pirate_technology`).
        -   `pirate_adventure` (the app) calls functions in the other two packages.
        -   The test verifies that the link hook for `pirate_speak` only receives recordings for `pirateSpeak` and `pirate_technology` only receives recordings for `useCannon`.
        -   Verifies that the output assets are correctly generated based on this filtered input (treeshaking simulation).

-   Added test data in `pkgs/hooks_runner/test_data/`:
    -   `pirate_adventure`: The main application.
    ... (continued)
Source Files on build 21713807576
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #21713807576
  • 4003fc32 on github
  • Prev Build on main (#21712885141)
  • Next Build on main (#21714563779)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc