Skip to content

[native_assets_cli] Cleanup JSON: Code Asset OS and Architecture #2219

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 2 commits into from
Apr 22, 2025

Conversation

dcharkes
Copy link
Collaborator

@dcharkes dcharkes force-pushed the json-cleanup-code-asset branch from 7b62308 to cf8fbbe Compare April 22, 2025 09:55
Copy link

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
native_assets_builder Breaking 0.16.0 0.17.0-wip 0.17.0 ✔️
native_assets_cli Breaking 0.16.0 0.17.0-wip 0.17.0 ✔️
native_toolchain_c Non-Breaking 0.13.0 0.14.0-wip 0.13.1 ✔️
Changelog Entry ✔️
Package Changed Files

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

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

@coveralls
Copy link

coveralls commented Apr 22, 2025

Coverage Status

coverage: 85.486% (+0.09%) from 85.396%
when pulling 7144cf9 on json-cleanup-code-asset
into 3add31b on main.

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

),
CodeAsset(
package: 'my_package',
name: 'bar',
file: Uri(path: 'path/to/libbar.a'),
os: OS.linux,
architecture: Architecture.arm64,

Choose a reason for hiding this comment

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

Nit: This blank line here seems out of place?

Copy link
Collaborator Author

@dcharkes dcharkes Apr 22, 2025

Choose a reason for hiding this comment

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

Hm, this is what the formatter does. (Hence why our CI doesn't turn red.) cc @munificent

CodeAsset(
package: 'my_package',
name: 'bar',
file: barUri,
os: OS.linux,
architecture: Architecture.arm64,

Choose a reason for hiding this comment

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

Same here and in other places of this file - I would have expected the formatter to catch and correct this? I am surprised that no check turned red?

Copy link
Member

Choose a reason for hiding this comment

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

I believe the formatter allows a blank line inside an argument list (maybe you want to group a few arguments together, similar to elements in a collection). But it should never insert one itself.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I see, I'd expect no blank lines. (This is how the previous formatter worked?) e.g. if I regex remove an argument from the list I wasn't including the new lines before.

Copy link
Member

Choose a reason for hiding this comment

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

(This is how the previous formatter worked?)

Yeah, the old formatting style made a bigger distinction between how argument lists and collection literals were formatted. The former didn't allow newlines but the latter did. In the new formatter, since both are formatted in a similar style, they reuse a lot of the same formatting logic and behave more similarly, including allowing newlines inside them.

@auto-submit auto-submit bot merged commit 4e1ef75 into main Apr 22, 2025
38 checks passed
@auto-submit auto-submit bot deleted the json-cleanup-code-asset branch April 22, 2025 11:07
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.

4 participants