-
Notifications
You must be signed in to change notification settings - Fork 68
[ffigen] Switch to named params for ObjC methods #2298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
PR HealthBreaking changes ✔️
Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs.
API leaks
|
Package | Leaked API symbols |
---|---|
objective_c | _Version |
This check can be disabled by tagging the PR with skip-leaking-check
.
License Headers ⚠️
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files |
---|
pkgs/objective_c/lib/src/ns_input_stream.dart |
All source files should start with a license header.
Unrelated files missing license headers
Files |
---|
pkgs/jni/lib/src/third_party/generated_bindings.dart |
This check can be disabled by tagging the PR with skip-license-check
.
Change the way ObjC methods are generated to use named params, similarly to how ObjC works. Eg
dataWithBytes_length_(Pointer<Void> bytes, int length)
, is now generated asdataWithBytes(Pointer<Void> bytes, {required int length})
. This is generally much more readable, but does lead to more method renamings, since the shorter methods names are more likely to collide.If the named parameter is nullable, it's generated as optional. Protocol method generation hasn't been changed, and are still generated using the long names.
I'll publish ffigen 19 once this lands.
Fixes #1566