Skip to content

Conversation

@goderbauer
Copy link
Contributor

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.

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?

This check can be disabled by tagging the PR with skip-breaking-check.

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check.

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.

Package Leaked API symbol Leaking sources

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
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/objective_c/lib/src/ns_input_stream.dart

This check can be disabled by tagging the PR with skip-license-check.

@coveralls
Copy link

coveralls commented Nov 5, 2025

Coverage Status

coverage: 82.341% (+0.6%) from 81.779%
when pulling 5ba016b on goderbauer:headercleanup
into efb2c2c on dart-lang:main.

//
// Generated by `package:ffigen`.
// ignore_for_file: type=lint
import 'dart:ffi' as ffi;
Copy link
Contributor Author

@goderbauer goderbauer Nov 5, 2025

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?

Copy link
Contributor Author

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...

Copy link
Contributor

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.

Copy link
Contributor

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.
Copy link
Contributor Author

@goderbauer goderbauer Nov 5, 2025

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.

@goderbauer goderbauer force-pushed the headercleanup branch 3 times, most recently from cea64e9 to 4e9404f Compare November 5, 2025 12:49
@auto-submit
Copy link

auto-submit bot commented Nov 6, 2025

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.

@auto-submit auto-submit bot removed the autosubmit label Nov 6, 2025
@auto-submit auto-submit bot merged commit ad6ae81 into dart-lang:main Nov 6, 2025
33 checks passed
@goderbauer goderbauer deleted the headercleanup branch November 6, 2025 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants