-
Notifications
You must be signed in to change notification settings - Fork 6k
[fuchsia] Enable dart null-safety for Fuchsia .dart files #36154
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
| await run(buildIdDir, buildIdScript, nm, binary, output); | ||
| } | ||
|
|
||
| class Symbol { |
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.
It looks like we have all the info we need to set all these fields at construction-time, so should we add a constructor that takes offset, size and name and remove the lates?
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.
agreed. fixed.
b67df33 to
f34c7a2
Compare
| int size; | ||
| String name; | ||
|
|
||
| Symbol(this.offset, this.size, this.name); |
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: for readability at the call site, maybe do
Symbol({required this.offset, required this.size, required this.name});and then call it as:
final symbol = Symbol(offset: int.parse(match[1]!, radix: 16),
size: int.parse(match[2]!, radix: 16),
name: match[4]!.split("(")[0]);so that the reader can tell what each value represents at the call site.
(the new keyword is unnecessary, it does the same thing without it in Dart 2).
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.
Thanks. I'm not experienced with dart so any tips like this are vey helpful!
f34c7a2 to
c0269d4
Compare
|
test-exempt: code refactor with no semantic change |
…111696) * 06fe761f6 [Impeller] Make gradients work as expected (flutter/engine#36140) * f18d17ba8 Roll Skia from 962fd1f9abfc to 6e0e0a9f6cbf (3 revisions) (flutter/engine#36174) * 5e6b0d813 Enable dart null-safety (flutter/engine#36154) * ccba311e2 Fix typo (flutter/engine#36167) * b828d3079 [lint] Enforce kCamelCase for global constants (flutter/engine#36175) * 9a6caba29 Roll Skia from 6e0e0a9f6cbf to 7c2dc625d01e (2 revisions) (flutter/engine#36178)
Enables null safety in compiler.dart and dart_profiler_symbols.dart
Contributes to flutter/flutter#110016, flutter/flutter#110020
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.