flutter / flutter-intellij

Flutter Plugin for IntelliJ
https://flutter.dev/using-ide
BSD 3-Clause "New" or "Revised" License
1.95k stars 311 forks source link

Remove use of `page=` query param for DevTools embeddings #7405

Open kenzieschmoll opened 3 weeks ago

kenzieschmoll commented 3 weeks ago

There is a TODO in the DevTools codebase to stop using the page query parameter from IDEs.

@helin24 can you confirm that we do not use this from IntelliJ? If we do not use this, this issue can be closed. If we do, we should migrate to use the path based routing, which has been the DevTools standard for a number of years now.

helin24 commented 3 weeks ago

We do use the page query param, e.g. page=inspector. Is there an alternative way to specify the page?

helin24 commented 3 weeks ago

Ooh actually, looking closer I see we're using /inspector instead. But only after flutter v3.3.0. Is that old enough we can remove? This is sort of a larger question of SDK deprecation.

kenzieschmoll commented 3 weeks ago

CC @jwren @DanTup - do we have guidelines for how long to leave legacy code before removing?

helin24 commented 3 weeks ago

We have a couple docs on this, but I'm not sure if it's appropriate to post here. I'll send to you directly for now.

DanTup commented 3 weeks ago

CC @jwren @DanTup - do we have guidelines for how long to leave legacy code before removing?

There are probably two parts to this question... How long to leave code in the SDK to support old versions of IDE plugins, and how long to leave code in IDE plugins to support old versions of the SDK. It's possible the answer is different for each of these (in part because upgrading SDK is often a much bigger job than upgrading IDE plugins and IDE plugins may frequently need to be updated to handle changes in SDKs).

For &page= specifically, Dart-Code stopped using it for new SDKs approximately 2 years ago (https://github.com/Dart-Code/Dart-Code/issues/3800). I'd be surprised if a 2 year old version of Dart-Code works against modern SDKs because of other changes (for ex. changes like the pub binary being removed and the legacy debug adapters not being updated) so I don't think you need to worry about Dart-Code here.

helin24 commented 3 weeks ago

I don't think we've thought much about the first issue (how long to leave code in the SDK to support old plugins) because of what you mentioned, that we frequently tell users to update plugins if they're having a problem.