diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index 9d1b12a0f..69740f4b7 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -259,8 +259,6 @@ class Config { _logger.severe( 'Objective C support is EXPERIMENTAL. The API may change ' 'in a breaking way without notice.'); - // Ignore source errors for ObjC. - ignoreSourceErrors = true; return Language.objc; } else { return Language.c; diff --git a/pkgs/ffigen/lib/src/header_parser/parser.dart b/pkgs/ffigen/lib/src/header_parser/parser.dart index c7ff18995..2b6b14e85 100644 --- a/pkgs/ffigen/lib/src/header_parser/parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/parser.dart @@ -114,10 +114,13 @@ List parseToBindings(Config c) { } if (hasSourceErrors) { - _logger.severe( + _logger.warning( "The compiler found some warnings/errors in source files. This might generate invalid bindings due to a wrong compiler guess."); if (config.ignoreSourceErrors) { - _logger.severe("Ignored source errors."); + _logger.warning( + "Ignored source errors. (User supplied --ignore-source-errors)"); + } else if (config.language == Language.objc) { + _logger.warning("Ignored source errors. (ObjC)"); } else { _logger.severe( "Skipped generating bindings due to errors in source files. Either resolve or ignore them (Set --ignore-source-errors on cmd or ignore-source-errors:true in config."); diff --git a/pkgs/ffigen/test/header_parser_tests/unions_test.dart b/pkgs/ffigen/test/header_parser_tests/unions_test.dart index e248dfb81..55084ac8c 100644 --- a/pkgs/ffigen/test/header_parser_tests/unions_test.dart +++ b/pkgs/ffigen/test/header_parser_tests/unions_test.dart @@ -23,6 +23,7 @@ ${strings.output}: 'unused' ${strings.headers}: ${strings.entryPoints}: - 'test/header_parser_tests/unions.h' +${strings.ignoreSourceErrors}: true '''), ); });