-
Notifications
You must be signed in to change notification settings - Fork 68
[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
Conversation
7b62308
to
cf8fbbe
Compare
PR HealthBreaking changes ✔️
Changelog Entry ✔️
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.
License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
|
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.
LGTM
), | ||
CodeAsset( | ||
package: 'my_package', | ||
name: 'bar', | ||
file: Uri(path: 'path/to/libbar.a'), | ||
os: OS.linux, | ||
architecture: Architecture.arm64, | ||
|
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.
Nit: This blank line here seems out of 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.
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, | ||
|
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.
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?
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.
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.
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.
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.
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 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.
Bug:
Cleanup from:
CodeAsset
#2127