Every time I do flutter build, I get a file change in
ios/Flutter/flutter_assets/kernel_blob.bin
After committing and rebuilding then I get a lot of conflicts because of this file.
What is this file? Should I .gitignore this?
The short answer is that this file is a Dart kernel bytecode representation of your app's code generated by a compiler in Flutter's toolchain. When your Dart code changes, you should expect the built kernel_blob.bin
to also change.
In a bit more detail, the flutter
tool is responsible for managing the build pipeline for your Flutter app. Since your example is an iOS example, I'll describe an iOS build. During a compile via flutter build
, the tool does the following:
lib/main.dart
) and hands it to the Dart kernel compiler. The kernel compiler traverses the import graph, and emits kernel bytecode to kernel_blob.bin
.gen_snapshot
tool, which on iOS emits ARM assembly code (we do this twice, once for 32-bit and once for 64-bit).clang
compiler. We then use lipo
(part of Xcode's toolchain) to merge the two .dylibs into a universal binary and wrap it up as a framework, including verison info, Info.plist, etc. This is emitted as App.framework
.App.framework
(your app) and Flutter.framework
(the Flutter engine/runtime) are bundled into the app's frameworks directory.You should ignore this file (and the rest of the build
directory) in your .gitignore
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With