Closed
Description
Context: https://github.com/flutter/codelabs/tree/main/ffigen_codelab/ and https://codelabs.developers.google.com/codelabs/flutter-ffigen
I'm attempting to update the codelabs for Flutter 3.10 and Dart 3, but I'm hitting a ffigen
code generation issue. On attempting to build step_06
of the updated codelab, I'm seeing the following error logs:
In file included from /Users/brettmorgan/Documents/GitHub/codelabs/ffigen_codelab/step_06/macos/Classes/duktape.c:3:
duk_bi_date.c:311:34: warning: implicit conversion loses integer precision: 'unsigned long' to 'duk_uint_fast32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
match_val = (1UL << part_idx) + (1UL << (sep_idx + 9)); /* match against rule part/sep bits */
~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
../lib/duktape_bindings_generated.dart:5155:7: Error: The type 'duk_thread_state' must be 'base', 'final' or 'sealed' because the supertype 'Struct' is 'base'.
Try adding 'base', 'final', or 'sealed' to the type.
class duk_thread_state extends ffi.Struct {
^
../lib/duktape_bindings_generated.dart:5160:7: Error: The type 'duk_memory_functions' must be 'base', 'final' or 'sealed' because the supertype 'Struct' is 'base'.
Try adding 'base', 'final', or 'sealed' to the type.
class duk_memory_functions extends ffi.Struct {
^
../lib/duktape_bindings_generated.dart:5186:7: Error: The type 'duk_function_list_entry' must be 'base', 'final' or 'sealed' because the supertype 'Struct' is 'base'.
Try adding 'base', 'final', or 'sealed' to the type.
class duk_function_list_entry extends ffi.Struct {
^
../lib/duktape_bindings_generated.dart:5212:7: Error: The type 'duk_hthread' must be 'base', 'final' or 'sealed' because the supertype 'Opaque' is 'base'.
Try adding 'base', 'final', or 'sealed' to the type.
class duk_hthread extends ffi.Opaque {}
^
../lib/duktape_bindings_generated.dart:5218:7: Error: The type 'duk_number_list_entry' must be 'base', 'final' or 'sealed' because the supertype 'Struct' is 'base'.
Try adding 'base', 'final', or 'sealed' to the type.
class duk_number_list_entry extends ffi.Struct {
^
../lib/duktape_bindings_generated.dart:5227:7: Error: The type 'duk_time_components' must be 'base', 'final' or 'sealed' because the supertype 'Struct' is 'base'.
Try adding 'base', 'final', or 'sealed' to the type.
class duk_time_components extends ffi.Struct {
^
Target kernel_snapshot failed: Exception
Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner')
** BUILD FAILED **
Obligatory flutter doctor -v
output:
$ flutter doctor -v
[✓] Flutter (Channel beta, 3.10.0-1.1.pre, on macOS 13.4 22F5037d darwin-arm64, locale en)
• Flutter version 3.10.0-1.1.pre on channel beta at /Users/brettmorgan/flutter
• Upstream repository https://github.com/flutter/flutter
• Framework revision ecdb7841df (6 days ago), 2023-04-11 20:47:40 -0700
• Engine revision 870e640e7e
• Dart version 3.0.0 (build 3.0.0-417.1.beta)
• DevTools version 2.23.1
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/brettmorgan/Library/Android/sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E222b
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] IntelliJ IDEA Community Edition (version 2022.2.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 70.0.5
• Dart plugin version 222.4167.21
[✓] VS Code (version 1.77.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.62.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.4 22F5037d darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 112.0.5615.49
[✓] Network resources
• All expected network resources are available.
• No issues found!