-
Notifications
You must be signed in to change notification settings - Fork 340
Add the ability to show notifications when the current SDK is unsupported (or will be soon) #5257
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
Conversation
|
The text LGTM. I'm curious what the matrix of supported extension and SDK versions will look like. What is reasonable to say for extensions prior to the one where we will discontinue support for v3.25 and earlier? "All SDK versions?" |
(note: 3.25 was just the current Flutter SDK version I was testing with and isn't due to become unsupported, it's only currently on master 😄 specific versions haven't been published yet) But it's a good question that I've been wondering myself. I feel like the goal of this information is that a user knows they are on SDK version x and they basically want to know "what version of the extension must I downgrade to for this SDK to fully work?". I don't think we need to track complete version ranges for each (I don't think there's much value in knowing the oldest version of an extension that supports a given SDK, only the newest), so we could just record the final extension version before we consciously remove something that prevents an older SDK from working. So maybe some table like this (version numbers are just made up here, notes in italic just for explanation):
The first column is a non-overlapping set of ranges of the Dart SDK, the second column is the matching Flutter SDKs, and the final column is basically "the newest extension you can use and expect it to work correctly with this SDK". So if you're stuck on an old SDK, you find the row that contains that SDK version, then roll back to the noted version of the extension. I'm interested in opinions/suggestions though :-) |
|
My main concern is that in the IntelliJ plugin, I'm not aware of us having made any decisions to stop supporting particular features from old SDKs, and at the same time we haven't been running tests to ensure compatibility with old SDKs. So the chart isn't going to be meaningful until after a round of removing support. I suppose our chart could look like:
|
Yep, the VS Code one might end up being just as sparse initially (depending on how easily I can get old data). But I think that is still useful, because for someone on < Flutter SDK 3.0 (for your example), they know that 83 is the latest plugin they can use. The table will grow over time (and the lack of specifics for the oldest SDKs probably matters less), but I think the important thing is (at least for VS Code... I'm not sure using old plugins for IntelliJ is as straight-forward) that if a user gets a "Your SDK is no longer supported" message, they have some easy way to know what plugin version does support their SDK if they're unable to update it. |
|
Okay, that sounds good. I feel like perhaps there's a better word than "supported" to convey "In theory supported, but older versions of SDK probably fail in unpredictable ways" 😆 |
Yeah, maybe we can come up with something better, or just start the table from a slightly more recent SDK (instead of |
…rted (or will be soon) This adds two new fields to `DartCapabilities` for `isUnsupportedNow` and `isUnsupportedSoon` to determine whether to warn the user about unsupported SDKs. We always do the SDK check against the Dart SDK version, but if the current Dart SDK comes from Flutter, we will reference "Flutter" and its SDK version in the user-facing messages. "Unsupported now" messages will always be shown as the intention is that the user will either upgrade their SDK or switch to an older extension.. this may seem annoying, but the extension will be broken in many ways when using an SDK that triggers this, so ignoring it is not an option - you must upgrade SDK or switch to an older extension. "Unsupported soon" messages will be shown only until dismissed the first time (clicking "More Info" counts as dismissing), but this is tracked by major+minor versions, so dismissing for Dart 2.0 would not prevent seeing the message again in future for 3.0.
0a3ea8a to
96dd4df
Compare
|
Based on the announcement at https://groups.google.com/g/flutter-announce/c/JQHzM3FbBGI:
I've updated this to consider Dart SDKs before 3.0 as "unsupported soon" (that is, they will show a warning that only appears until the user interacts with it once, then it won't be shown again) and I will merge this PR once Dart 3.6 releases (so the warning will begin showing up with the next Dart-Code release after then). I've added a basic page to https://dartcode.org/sdk-version-compatibility/ with a table as noted above, and linked the "More Info" button in the notification to that page (which also contains a link to the flutter-announce post). The notification (when using a 2.19 Dart SDK) looks like this: @jwren @itsjustkevin please let me know if this (including the text here and in the original screenshots at the top, which includes text for when the SDK support is removed - which will happen around the Dart 3.7 release for < 3.0) all looks reasonable to you or if we should change before this merges (which won't be until Dart 3.6 releases). |
|
Thanks @DanTup LGTM! |
jwren
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, we'll coordinate in coming weeks to synchronize IJ and VS Code here.
This allows merging the branch and including the code changes in a pre-release in advance of this being enabled.
|
I've removed the version number from here so I can merge this PR now (without the notification showing up to pre-release users if I push a pre-release build), and have opened #5304 for the current milestone to put it back prior to shipping. That means, with the next release (somewhere around the end of this month / start of next month) we'll begin showing the notification. |

This adds two new fields to
DartCapabilitiesforisUnsupportedNowandisUnsupportedSoonto determine whether to warn the user about unsupported SDKs. This is a necessary step before we can remove any legacy code (such as the legacy analysis server integration, or activating DevTools from pub!).We always do the SDK check against the Dart SDK version, but if the current Dart SDK comes from Flutter, we will reference "Flutter" and its SDK version in the user-facing messages.
"Unsupported now" messages will always be shown as the intention is that the user will either upgrade their SDK or switch to an older extension.. this may seem annoying, but the extension will be broken in many ways when using an SDK that triggers this, so ignoring it is not an option - you must upgrade SDK or switch to an older extension.
"Unsupported soon" messages will be shown only until dismissed the first time (clicking "More Info" counts as dismissing), but this is tracked by major+minor versions, so dismissing for Dart 2.0 would not prevent seeing the message again in future for 3.0.
Currently looks like this (version number is just the SDK I was testing with, ofc):
Where it says "Flutter SDK" and shows a Flutter SDK version number will be "Dart SDK" if the selected SDK is a standalone Dart SDK.
TODO Before Merging
update extension on https://dartcode.org/sdk-version-compatibility/moved to Update deprecated SDK version + extension version on website #5304@jwren @helin24 @itsjustkevin