Exclude all on empty include list (#254)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1c36c42..b5b0259 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+# 4.1.2
+- Added fix for empty include list to exclude all
+
# 4.1.1
- Added fix for errors due to name collision between member name
and type name used internally in structs/unions.
diff --git a/lib/src/config_provider/spec_utils.dart b/lib/src/config_provider/spec_utils.dart
index ad76cc9..22a6e1a 100644
--- a/lib/src/config_provider/spec_utils.dart
+++ b/lib/src/config_provider/spec_utils.dart
@@ -397,6 +397,9 @@
final include = (yamlMap[strings.include] as YamlList?)?.cast<String>();
if (include != null) {
+ if (include.isEmpty) {
+ return Includer.excludeByDefault();
+ }
for (final str in include) {
if (isFullDeclarationName(str)) {
includeFull.add(str);
diff --git a/pubspec.yaml b/pubspec.yaml
index 4f902ab..34a5c3c 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -3,7 +3,7 @@
# BSD-style license that can be found in the LICENSE file.
name: ffigen
-version: 4.1.1
+version: 4.1.2
homepage: https://github.com/dart-lang/ffigen
description: Generator for FFI bindings, using LibClang to parse C header files.