Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[native_assets_cli] Remove re-exporting #2237

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

Merged
merged 1 commit into from
Apr 24, 2025
Merged

[native_assets_cli] Remove re-exporting #2237

merged 1 commit into from
Apr 24, 2025

Conversation

dcharkes
Copy link
Collaborator

This PR removes all exports that were not exporting a src/ class. Classes are now only exported once in the lib/xxx.dart.

This cleans up ambiguity with imports:

  1. It prevents importing a superset import (e.g. a bunch of xx_builder.dart imports changed to xx.dart imports because the builder facilities are not used).
- import 'package:native_assets_cli/native_assets_cli_builder.dart';
+ import 'package:native_assets_cli/native_assets_cli.dart';
  1. It prevents the IDE from auto-selecting the wrong import on autocompleting.

As a side effect, now multiple imports might be needed for hooks:

import 'package:native_assets_cli/data_assets.dart';
+ import 'package:native_assets_cli/native_assets_cli.dart';

In a follow up PR I'll take a look at reducing the number of libraries (maybe we can merge the test/builder libraries with the other ones).

Bug:

Before we can address #999, we need to have an idea what the import structure should look like.

Copy link

github-actions bot commented Apr 24, 2025

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
native_assets_builder Non-Breaking 0.17.0 0.18.0-wip 0.17.1 ✔️
native_assets_cli Breaking 0.17.0 0.18.0-wip 0.18.0 ✔️
native_toolchain_c Non-Breaking 0.14.0 0.15.0-wip 0.14.1 ✔️
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 symbols
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/jni/lib/src/third_party/generated_bindings.dart
pkgs/objective_c/lib/src/ns_input_stream.dart

Copy link

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dcharkes dcharkes merged commit dcc6fc9 into main Apr 24, 2025
31 of 32 checks passed
@dcharkes dcharkes deleted the organize-imports-2 branch April 24, 2025 11:19
@coveralls
Copy link

Coverage Status

coverage: 78.421%. remained the same
when pulling 7a6cfb7 on organize-imports-2
into e5c759e on main.

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