-
Notifications
You must be signed in to change notification settings - Fork 84
[ffigen] Remove unnecessary ignore_for_files
#2747
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
Conversation
PR HealthBreaking changes ✔️
This check can be disabled by tagging the PR with Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
This check can be disabled by tagging the PR with License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
This check can be disabled by tagging the PR with |
| // | ||
| // Generated by `package:ffigen`. | ||
| // ignore_for_file: type=lint | ||
| import 'dart:ffi' as ffi; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(The is about the import a few lines below for package:ffi, but github wouldn't let me comment there)
Now that this example is analyzes (see changes in pkgs/ffigen/analysis_options.yaml) the analyzer complains about this import being unused (this is a warning, not a lint, and hence not covered by the ignore_for_file below):
warning • Unused import: 'package:ffi/ffi.dart' • example/objective_c/avf_audio_bindings.dart:11:8 • unused_import
@liamappelbe Is it expected that FFIgen generates this import even if it is unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working around this for now by adding // ignore_for_file: unused_import to the preamble. But I think FFIgen shouldn't be generating this import in the first place...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liamappelbe Is it expected that FFIgen generates this import even if it is unused?
Ideally no, but it's a lot harder to guarantee that now that we're searching for used libraries as a visitor rather than during code generation. The PR has a more detailed explanation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed a bug: #2748
| // ignore_for_file: no_leading_underscores_for_local_identifiers | ||
| // ignore_for_file: library_private_types_in_public_api | ||
|
|
||
| // AUTO GENERATED FILE, DO NOT EDIT. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This comment is about the import on line 17, but github wouldn't let me comment on that line.)
Same problem here.
cea64e9 to
4e9404f
Compare
92c9e0c to
7ab0d2a
Compare
|
autosubmit label was removed for dart-lang/native/2747, because - The status or check suite analyze has failed. Please fix the issues identified (or deflake) before re-applying this label. |
FFIgen automatically generates
// ignore_for_file: type=lint, so manually specifying additional lints to ignore has no further effect. This PR cleans up those additional ignores.