-
Notifications
You must be signed in to change notification settings - Fork 60
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
[native_assets_builder] Automatically track all Dart sources as dependencies #1322
Conversation
PR HealthBreaking changes ✔️Details
Changelog Entry ✔️Details
Changes to files need to be accounted for in their respective changelogs. License Headers ✔️Details
All source files should start with a license header. Unrelated files missing license headers
Package publish validation ✔️Details
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
I don't see any breaking changes here. |
The log says: Breaking change report:
{
"breakingChanges": {
"label": "BREAKING CHANGES",
"children": [
{
"label": "Class HookConfigImpl",
"children": [
{
"changeDescription": "Method \"checksumDryRun\" added (required)",
"changeCode": "CE11",
"isBreaking": true,
"type": "minor"
}
]
}
]
},
"nonBreakingChanges": {
"label": "Non-Breaking changes",
"children": [
{
"label": "Class BuildConfigImpl",
"children": [
{
"changeDescription": "Method \"checksumDryRun\" added",
"changeCode": "CE11",
"isBreaking": false,
"type": "minor"
}
]
},
{
"label": "Class LinkConfigImpl",
"children": [
{
"changeDescription": "Method \"checksumDryRun\" added",
"changeCode": "CE11",
"isBreaking": false,
"type": "minor"
}
]
}
]
}
} |
That seems to be a bug. Adding a |
Nevermind, we don't have static methods in extensions (yet). |
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!
Changes
The
native_assets_builder
now automatically treats all (transitive) Dart sources of a hook and the package_config.json as dependencies. This means the hook output no longer needs to list Dart sources as dependencies.The
native_assets_cli
documentation is updated to reflect this.The
native_toolchain_c
CBuilder
field to list the Dart hook files have been deprecated.Testing
All Dart sources have been removed from the dependencies of the hooks.
pkgs/native_assets_builder/test/build_runner/build_runner_caching_test.dart already had a test for checking a hook output is not cached if the hook file itself is changed. This test passes now because the native assets builder lists all the Dart sources. The hook itself no longer reports itself as dependency in its output.
One weird quirk when testing is that we need to artificially leave some time between the
pub get
and kernel compilation. It can be sub-second. And on Windows, the file timestamps only have second-precision. This means that if the dill file is compiled the same second as thepackage_config.json
is written, the next invocation doesn't cache. By slowing the test down, we can test that in fact the second invocation is cached.Infra
dart compile kernel --depfile
is only available on 3.5.0 dev releases. Sopackage:native_assets_builder
can no longer be run on the stable releases. This doesn't matter, because this package is pulled in to the last main/master for Flutter and Dart.