get name2 deprecation causing Dart -> Engine roll to fail

This issue has been created since 2022-09-22.
zanderso wrote this answer on 2022-09-22
scheglov wrote this answer on 2022-09-22

I don't think there is anything wrong with the analyzer here. We can deprecate APIs, if clients choose to treat this as breaking for them, to always be on the most recent APIs (good), it is up to the clients to update.

srawlins wrote this answer on 2022-09-23

I don't think it is documented, what is a breaking change for this roller. Flutter needs to hand down a doc which describes what changes can or cannot be made in the Dart SDK, which would make this roller fail (and equivalently (? I hope?) make the HHH bot turn red). The HHH bot is too slow for us to require it to be run, and pass, on presubmit for every dart-sdk/pkg/analyzer change.

Or rather, we don't even know which code anywhere could cause HHH bot to fail. Maybe a repo somewhere in the flutter GitHub organization depends on _fe_analyzer_shared and we don't know about it.

So, one example: it appears that marking an API in the Dart SDK as deprecated is a change which may cause the roll to fail. This is an example of what would appear in that document. In this case, before an engineer deprecates anything in the Dart SDK, they need to either run HHH bot, or grep some set of files for that API. Do we have that list of files? Is there a google3 set of directories we can grep in csearch, or perhaps a set of flutter repositories we should check?

a-siva wrote this answer on 2022-09-23

I am really not sure if it is possible to document the set of tests that need to be run or set of files that need to checked to ensure the Flutter tree does not break.

In the VM team we have followed this process

  • if we know apriori that a change is going to break Flutter we try and make changes to the Flutter tree before landing the breaking change if that is possible or we stop the auto roller and do a manual roll of Dart into Flutter wherein the breaking change and the corresponding Flutter changes are submitted together
  • it is not always that we know a change is going to break Flutter and so we always monitor the Dart to Engine roller and the Flutter HHH bots actively as part of our gardenning duties, if a breakage is noted we try and revert the Dart change that caused it so that the roller is unblocked and then investigate the breakage and follow the step above to land the change
Lsaier wrote this answer on 2022-09-23
jacob314 wrote this answer on 2022-09-26

Perhaps the best path forward is to eliminate all source dependencies on Analyzer package in the Flutter repos and prohibit adding future dependencies. The only dependency we are aware of is
https://github.com/flutter/engine/tree/06a54f48b2256e8758ca761fca0261ede2e937a2/tools/api_check

this utility could be slightly generalized and moved to the dart_sdk so that it is easier for the analyzer team to update it with analyzer pull requests.

jacob314 wrote this answer on 2022-09-26

Fyi @cbracken who wrote this tool.

cbracken wrote this answer on 2022-09-26

That seems reasonable. That tool was hacked together pretty quickly after the nth (>5 and probably >10) time that our a11y enums as defined in C++/Dart/Java got out of sync in order to prevent that sort of breakage from happening again.

It's currently pretty specific to the a11y enums and the C++/Java checking is... well, let's just say I'm not proud of it. If someone wanted to clean this up and generalise, and have it live somewhere else, that works for me.

cbracken wrote this answer on 2022-09-26

Just a quick note that the "tests" directory is testing engine APIs, not testing the package itself. This is, unfortunately, how a bunch of tests are written in the engine. You'd probably want the code in the tests directory to remain in the engine repo if the tool were moved out.

I suspect that even the code in the lib dir may make some pretty strong assumptions about the naming of our current enums -- it's been a while since I banged this up.

srawlins wrote this answer on 2022-09-26

@cbracken what is the reason for overriding all of the dependencies to pull directly from the local Dart SDK? This would also not have been breaking if they had been pub dependencies.

cbracken wrote this answer on 2022-09-27

Someone else might remember the details/history here, but this is standard practice for all Dart tooling in the engine, for example:

This is the issue decribing the rationale: #82134.

Unless you expect to be changing a lot of the API this tool uses, it seems like extracting a very small/specific tool to the Dart SDK, or even providing a small specific analyzer wrapper library, might be overkill. We have dependencies on Dart SDK packages in lots of engine tooling and the breakages are pretty infrequent.

cbracken wrote this answer on 2022-09-27

Aside that may be better discussed in a separate meeting or issue:

It sounds like the issue here isn't so much that Flutter is using the analyzer package, or even that we interpret lints as errors -- typically, that would just mean the whoever is engine sheriff is responsible for patching up the roll to move off the deprecated stuff -- but rather, that our lint==error behaviour causes the Dart head-head-head bot goes red and then the committer scrambles to check whether it's a legitimate breakage or just a lint that someone on the engine side will need to patch?

I wonder if there's a broader conversation to be had as to whether we're currently taking the right tooling approach with regards to linting. e.g. one could imagine tooling that automatically files a P1/P2 (which triggers a weekly review process) but allows deprecated code.

zanderso wrote this answer on 2022-09-27

This is the issue decribing the rationale: #82134.

Before #82134 (and still in one or two places) there was confusion about how/from where dependencies entered the Engine tree. Some dependencies came in through pub, and others came in through the DEPS file. We decided to unify on the DEPS file both because it is the only option that works for everything, and as a follow-up after an outage in which pub.dev wasn't accessible from our Windows machines in CI for an extended period of time.

More Details About Repo
Owner Name flutter
Repo Name flutter
Full Name flutter/flutter
Language Dart
Created Date 2015-03-06
Updated Date 2022-10-05
Star Count 145512
Watcher Count 3569
Fork Count 23398
Issue Count 11205

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
getFilenameWithoutExtension() doesn't work as expected 1 2021-11-18 2022-09-03
Is there a method to get a complete tag list with a breakdown of UDT's? 2 2022-02-25 2022-08-22
[Removal]: Please remove Delightful-Carbon-Rook 0 2022-09-27 2022-10-01
[Addition]: Strange things afoot in Watertown, SD? WIP 2 2022-09-26 2022-10-01
gen2-ocr: AttributeError: NNData.getSequenceNum() 3 2022-04-08 2022-07-11
[Bug] Targeting broken on duplicated environments 0 2021-03-10 2022-08-14
[BUG] Use crypto/rand for file naming 0 2020-10-16 2022-09-21
Agent returns ipv6 address as primaryIP on AWS EC2s 0 2021-02-27 2022-08-18
Command 19 (IS_CONNECTED_TO_ROUTER) return invalid JSON (Firmware: 1.1.0) 0 2021-06-21 2022-09-08
Client crashes soon after start 4 2021-12-15 2022-06-29
Buffer being clobbered in capacitor and other non-node environments 1 2020-12-01 2022-05-26
[Introduction] link attached to the textbook 2 2021-09-10 2022-08-06
Out of memory error agent: malloc.c:2379: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed. 2 2022-08-30 2022-08-26
x264c.Param outdated? 2 2022-07-10 2022-08-26
x264 decode to image 1 2022-06-15 2022-08-26
Unexpected Error :: Peek 0 2022-01-30 2022-09-06
Infinite loop (?) after upgrading to 0.29 in an Electron app 2 2021-09-17 2022-09-23
Various database columns should be NOT NULL 1 2022-01-14 2022-10-02
Dev server is not rebuilding the HTML file when using templating 0 2022-04-20 2022-09-24
Add rule to validate all schemas and examples in schemas 4 2021-09-29 2022-09-24
Cronjob to run every n years and n weeks 7 2022-06-03 2022-09-06
/resolve_completion not working 10 2022-07-07 2022-08-19
Frequently gets stuck on "updating" for over 10 minutes 7 2018-10-29 2022-09-21
No entries are added to statistics and logs 1 2022-07-09 2022-08-29
photoBrowser to present will case the unvisible tabbar show. 0 2022-01-25 2022-09-15
Swiper Classes 1 2021-04-08 2022-01-14
Inconsistent behavior between x64 and GPU backends / x64 bug 3 2022-03-01 2022-07-26
Update does not enforce type on `data` 0 2021-10-27 2022-07-27
add Givens-based orthonormal matrix transform and inverse plus Jacobian 7 2021-09-24 2022-10-02
Missing exit message in `Allwmake` 1 2021-07-26 2022-07-23
Reported issues with background after tabbing out of a full-screen game 2 2022-01-12 2022-07-11
References 0 2021-10-25 2022-01-11
Error in Readme, wrong file pointing 1 2022-01-24 2022-09-22
Does an input mapping create a local scope? 2 2021-11-01 2022-07-30
Event Sub Process Interrupting Timer Start Event not supported 0 2021-10-18 2022-09-21
Sidecar scope not always taking effect 1 2022-02-15 2022-07-26
"[winston] Attempt to write logs with no transports" printed even when test is passed 1 2022-03-27 2022-10-03
app close due to NoSuchMethodError: No virtual method setSkuId (Ljava/lang/String;)V in class Lcom/mapbox/android/telemetry/AppUserTurnstile 0 2021-01-07 2022-10-03
String interpolation 9 2022-06-03 2022-09-10
Android Basics: Fragments Navigation component: incorrect explanation of get() 1 2022-07-12 2022-09-24
cve list by API 2 2021-01-27 2022-01-20
Changing parsers description 0 2021-12-19 2022-09-17
Only one measurement per device is reported with new data between polls 0 2020-02-18 2022-08-13
Cannot read property 'mkdir' of undefined is throwing when run "npm i playwright-chromium" 2 2021-09-22 2022-07-27
Question: Is it possible to use extended_name when exporting the configuration? 0 2021-08-30 2022-10-04
Compile OpenAL-Soft for macOS with x64+ARM binaries and back-compat to older macOS 4 2022-04-23 2022-07-11
STOP POLLUTING THE INTERNET WITH THIS SHIT SOFTWARE 1 2022-04-08 2022-09-27
STOP POLLUTING THE INTERNET WITH THIS SHIT SOFTWARE 0 2022-04-08 2022-07-11
about xaml page and game class 1 2022-04-24 2022-07-11
Wrong Icon Displayed windows 2003 OS and Windows 2008 server 4 2021-12-23 2022-10-05