fix: Header filename mismatch causing ffigen to produce empty output #141
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.
Description
Some minor context how I got here:
Been fighting with ffigen for about a week now to get a project called `llama_cpp` ported over to Dart as a convenient package. I've got ffi working in a side project of mine (shady.ai) but creating a plugin_ffi package has been troublesome.Before this PR, upon checking out the repository, things seemed to work at first glance. No compile errors. I was able to execute the
test
andrun
commands with success in thenative_add_library
package.However, I was unable to re-generate Dart code from the native header (specified in
ffigen.yaml
), turns out it's due to a typo in the [headers] section.Steps I had taken prior this PR:
dart_lang_native/pkgs/native_assets_cli/example/native_add_library
dart --enable-experiment=native-assets test
native_add_library.dart
seems to be an empty file now aside from the file comments.Before
Result of
lib/native_add_library.dart
:After
Now, with this PR, the file (
lib/native_add_library.dart
) is looking good again.Contribution guidelines:
dart format
.Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.