[ffigen] Fix `include-directives` on Windows (#397)
diff --git a/pkgs/ffigen/CHANGELOG.md b/pkgs/ffigen/CHANGELOG.md index d8d6976..83edcb0 100644 --- a/pkgs/ffigen/CHANGELOG.md +++ b/pkgs/ffigen/CHANGELOG.md
@@ -1,3 +1,7 @@ +# 6.0.1 + +- Replace path separators in `include-directives` before matching file names. + # 6.0.0 - Removed config `dart-bool`. Booleans are now always generated with `bool` and `ffi.Bool` as it's Dart and C Type respectively.
diff --git a/pkgs/ffigen/example/c_json/pubspec.yaml b/pkgs/ffigen/example/c_json/pubspec.yaml index fc21ca9..b44f706 100644 --- a/pkgs/ffigen/example/c_json/pubspec.yaml +++ b/pkgs/ffigen/example/c_json/pubspec.yaml
@@ -8,7 +8,7 @@ sdk: '>=2.17.0 <3.0.0' dependencies: - ffi: ^1.2.1 + ffi: ^2.0.0 path: ^1.8.0 dev_dependencies:
diff --git a/pkgs/ffigen/example/libclang-example/pubspec.yaml b/pkgs/ffigen/example/libclang-example/pubspec.yaml index cd3a1c3..e177eec 100644 --- a/pkgs/ffigen/example/libclang-example/pubspec.yaml +++ b/pkgs/ffigen/example/libclang-example/pubspec.yaml
@@ -8,7 +8,7 @@ sdk: '>=2.17.0 <3.0.0' dependencies: - ffi: ^1.2.1 + ffi: ^2.0.0 dev_dependencies: ffigen: path: '../../'
diff --git a/pkgs/ffigen/example/simple/pubspec.yaml b/pkgs/ffigen/example/simple/pubspec.yaml index 8c45afc..8a97930 100644 --- a/pkgs/ffigen/example/simple/pubspec.yaml +++ b/pkgs/ffigen/example/simple/pubspec.yaml
@@ -8,7 +8,7 @@ sdk: '>=2.17.0 <3.0.0' dependencies: - ffi: ^1.2.1 + ffi: ^2.0.0 dev_dependencies: ffigen: path: '../../'
diff --git a/pkgs/ffigen/lib/src/config_provider/spec_utils.dart b/pkgs/ffigen/lib/src/config_provider/spec_utils.dart index 9d7263e..aaa4c08 100644 --- a/pkgs/ffigen/lib/src/config_provider/spec_utils.dart +++ b/pkgs/ffigen/lib/src/config_provider/spec_utils.dart
@@ -307,7 +307,8 @@ if (key == strings.includeDirectives) { for (final h in (yamlConfig[key] as YamlList)) { final headerGlob = h as String; - includeGlobs.add(quiver.Glob(headerGlob)); + final fixedGlob = _replaceSeparators(headerGlob); + includeGlobs.add(quiver.Glob(fixedGlob)); } } }
diff --git a/pkgs/ffigen/pubspec.yaml b/pkgs/ffigen/pubspec.yaml index d1345f9..ffe24d0 100644 --- a/pkgs/ffigen/pubspec.yaml +++ b/pkgs/ffigen/pubspec.yaml
@@ -3,7 +3,7 @@ # BSD-style license that can be found in the LICENSE file. name: ffigen -version: 6.0.0 +version: 6.0.1 description: Generator for FFI bindings, using LibClang to parse C header files. repository: https://github.com/dart-lang/ffigen