Skip to content

Output directory keeps changing + kernel_blob.bin appearing in release builds #75

@Prithvi-raptee

Description

@Prithvi-raptee

Description

What currently happens:

  • The output directory structure of flutterpi_tool build keeps changing over time. Originally it was something like build/, then build/flutter-pi/aarch64-generic, then apparently back to build/, etc.
  • An extra file kernel_blob.bin sometimes shows up in the output, even when building in what I expect should be AOT / release modes.
  • These variations (dir structure + presence of kernel_blob.bin) break downstream scripts, automations, deployment paths.

What I expect:

  • A stable, documented output layout (with versioned or released version of the tool) so that user scripts don’t need to adjust weekly.
  • In --release or profile builds, no kernel_blob.bin should appear (because release/profile builds should use AOT/ELF snapshots, not JIT / kernel bytecode, right?).
  • Directory names / paths should either be configurable or at least have stable canonical names (arch, generic / cpu, etc.).

Steps to Reproduce / Observations

  1. Using flutterpi_tool build --arch=<some arch> --release
  2. Initially the output was under build/.
  3. Later versions of flutterpi_tool put output under build/flutter-pi/aarch64-generic/ (or similar arch-named subdir).
  4. Recently, the output moved back to just build/ or another layout.
  5. Even in release mode, I sometimes see kernel_blob.bin under flutter_assets/.

Impact

  • My automation scripts assume some fixed path to pick up binaries/assets, and these keep breaking.
  • If kernel_blob.bin is included in release builds, then that suggests the build is not fully AOT, which may impact performance, binary size, startup, or be surprising for users expecting release-mode behavior.

What I Checked / Need Validation

  • The changelog: I reviewed the flutterpi_tool changelog on pub.dev and see many fixes & version bumps.
  • There is no explicit note (so far as I saw) that kernel_blob.bin is removed in release builds, or that output directory layout is intended to be stable.
  • I also found that in Flutter itself, there is an issue “Failed to find snapshot: flutter_assets/kernel_blob.bin” when in release mode, meaning having kernel_blob.bin absent is expected in some configurations. (108803)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions