-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[flutter_tools] refactor GenSnapshot and AotBuilder #52091
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
[flutter_tools] refactor GenSnapshot and AotBuilder #52091
Conversation
|
Same here: The |
| case TargetPlatform.darwin_x64: | ||
| case TargetPlatform.linux_x64: | ||
| case TargetPlatform.windows_x64: | ||
| case TargetPlatform.fuchsia_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.
Fuchsia supports AOT, but not via this path. Maybe some more targeted tool exit message for fuchsia would be good.
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.
Done
| status?.cancel(); | ||
| globals.printError(error.toString()); | ||
| return; | ||
| throwToolExit(null); |
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.
A message here would probably be helpful, even if it was just something like "The AOT build failed".
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.
Done
|
|
||
| final SnapshotType snapshotType = SnapshotType(platform, buildMode); | ||
| final int genSnapshotExitCode = | ||
| await _timedStep('snapshot(CompileTime)', 'aot-snapshot', |
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.
Is this timing info still captured some other way? Or is this reporting no longer valuable because we expect users to be taking a different path?
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.
We don't use a _timedStep for the current AOT build.
All of this timing information is captured via PerformanceMeasurement classes. This isn't hooked up to analytics yet, but I could update this PR to do so. This has the benefit of allowing uniform handling of build performance
I could wire this up in this PR or do it separately
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.
Separately sgtm.
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.
Filled #52842 to track
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.
Removing this _timedStep removed the compilation times from the log output reported using the --report-timings flag in Golem benchmarking of Flutter.
The failure was not noticed, because the previous backup code path that was used before the --report-timings flag was introduced started running again.
zanderso
left a comment
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 w/ small fix
| bool bitcode = kBitcodeEnabledDefault, | ||
| bool quiet = true, | ||
| Iterable<DarwinArch> iosBuildArchs = defaultIOSArchs, | ||
| }) async { |
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.
Also TargetPlatform.fuchsia_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.
Oops, thanks!
This reverts commit f65421a.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Description
GenSnapshotandAotBuilder.GenSnapshotUpon refactoring test code, discover that the
LocalEngineArtifacts._engineSrcPathandArtifact.snapshotDartare completely unused (might predate gen snapshot?). Remove and refactor.