You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be even cooler if we could run it in a JSON mode that gives us the results including the range in the pubspec for each dependency - then we could show info/warning squiggles under the outdated ones when you have the pubspec open?
Hmm, we don't expose the SourceSpan (start/end offset) for the version constraint in pubspec.yaml -- looking at the code I don't think we'll want to trace that logic through pub.
But, parsing the pubspec.yaml with package:yaml it should be easy to get the SourceSpan for the package name in pubspec.yaml.
That said, it's worth noting that pub outdated also highlights out-dated transitive dependencies.
Side note: The command also displays the latest resolable version. That is the version you would get if you removed all version constraints from your pubspec.yaml and ran pub get. We show it this way as upgrading one package often requires other packages to be upgraded too. And looking at the latest version available is often uninteresting because it might be possible to get the latest version (for example: flutter pins a lot of dependencies).
parsing the pubspec.yaml with package:yaml it should be easy
I can't use that here as the extension is TypeScript/JS (not Dart), however I think we could find the ranges reasonably reliably with some basic parsing or regex so it's not a big deal.
Side note: The command also displays the latest resolable version.
Ah, interesting to know! I'll do some testing with it and see how it might make sense to present the data (I may ping you with questions). If we do put something inside the editor, it would be in addition to allowing you to run easily run the command and showing the usual full output.
Am I right in thinking that for Flutter apps we should be using flutter packages outdated, so it uses the correct pub-cache folder when using the zip file?
On Mon, 13 Apr 2020, 19.19 Danny Tuppeny, ***@***.***> wrote:
Am I right in thinking that for Flutter apps we should be using flutter
packages outdated, so it uses the correct pub-cache folder when using the
zip file?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2322 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABERZAKCTCK6J35F453MFTRMNCQ3ANCNFSM4LU7X3BQ>
.
@mit-mit any opinions on icons? Previously we had a single icon, and holding down Alt would change it to Update (otherwise it would be Get). It feels weird to have an Outdated icon without also having a specific Update one, so probably we should have all three.
I'm struggling to find three icons that reasonable mean get/update/outdated though (since they're all fairly similar actions!). They do have tooltips, so you can figure out what each is, but of course it'd be good if they were fairly obvious.
Here's what I have so far (Get / Update / Outdated) - I changed the original Get one as it didn't seem to fit with the others I could find. These were all taken from https://material.io/resources/icons/?style=baseline.
Thanks! I've updated Get, though I was less keen on the find_replace one so kept the one from above. Now looks like these:
it's 'Upgrade' not 'Update'
Looks like we are correctly using "Upgrade" in all the right places - though I misnamed the icon as "update" when I saved it and had that in my head. I've renamed it to match the command name though to avoid future confusion. Thanks!
By the way - is there an easy way to get a project into a state where pub outdated will return some packages? I accidentally ran pub upgrade on the one I was testing with, and I can't figure out how to get it into an outdated state now. I tried lowering versions on pubspec and fetching those, then putting them back, but that didn't seem to trigger it (I guess I need to have older versions of their dependencies?).
It's merged into master so is planned to go into the next release (around end of month). I can make a beta version if you want to try it out in advance.
Activity
DanTup commentedon Mar 27, 2020
Makes sense to me!
It'd be even cooler if we could run it in a JSON mode that gives us the results including the range in the pubspec for each dependency - then we could show info/warning squiggles under the outdated ones when you have the pubspec open?
mit-mit commentedon Mar 27, 2020
The tool does support JSON! There is on ongoing PR to add the flag for it: https://github.com/dart-lang/pub/pull/2402/files
jonasfj commentedon Mar 27, 2020
Hmm, we don't expose the
SourceSpan(start/end offset) for the version constraint inpubspec.yaml-- looking at the code I don't think we'll want to trace that logic throughpub.But, parsing the
pubspec.yamlwithpackage:yamlit should be easy to get theSourceSpanfor the package name inpubspec.yaml.That said, it's worth noting that
pub outdatedalso highlights out-dated transitive dependencies.Side note: The command also displays the latest resolable version. That is the version you would get if you removed all version constraints from your
pubspec.yamland ranpub get. We show it this way as upgrading one package often requires other packages to be upgraded too. And looking at the latest version available is often uninteresting because it might be possible to get the latest version (for example: flutter pins a lot of dependencies).DanTup commentedon Mar 27, 2020
Ah, great! :-)
I can't use that here as the extension is TypeScript/JS (not Dart), however I think we could find the ranges reasonably reliably with some basic parsing or regex so it's not a big deal.
Ah, interesting to know! I'll do some testing with it and see how it might make sense to present the data (I may ping you with questions). If we do put something inside the editor, it would be in addition to allowing you to run easily run the command and showing the usual full output.
Thanks!
DanTup commentedon Apr 13, 2020
Am I right in thinking that for Flutter apps we should be using
flutter packages outdated, so it uses the correct pub-cache folder when using the zip file?jonasfj commentedon Apr 13, 2020
mit-mit commentedon Apr 14, 2020
@DanTup actually, might be good to use
pubnotpackagesterminology. We changed that in the flutter tool ~6 months ago:Switch "flutter packages" to "flutter pub"
Switch from "flutter packages" to "flutter pub"
DanTup commentedon Apr 14, 2020
Updated, thanks!
Switch from "flutter packages" to "flutter pub"
DanTup commentedon Apr 15, 2020
@mit-mit any opinions on icons? Previously we had a single icon, and holding down Alt would change it to Update (otherwise it would be Get). It feels weird to have an Outdated icon without also having a specific Update one, so probably we should have all three.
I'm struggling to find three icons that reasonable mean get/update/outdated though (since they're all fairly similar actions!). They do have tooltips, so you can figure out what each is, but of course it'd be good if they were fairly obvious.
Here's what I have so far (Get / Update / Outdated) - I changed the original Get one as it didn't seem to fit with the others I could find. These were all taken from https://material.io/resources/icons/?style=baseline.
mit-mit commentedon Apr 15, 2020
The get one looks fine. But I also like https://material.io/resources/icons/?icon=get_app&style=baseline
Upgrade looks good.
I like the Outdated icon you have there. An alternative would be https://material.io/resources/icons/?icon=find_replace&style=baseline.
Unrelated to icons, not that it's 'Upgrade' not 'Update':
DanTup commentedon Apr 15, 2020
Thanks! I've updated Get, though I was less keen on the find_replace one so kept the one from above. Now looks like these:
Looks like we are correctly using "Upgrade" in all the right places - though I misnamed the icon as "update" when I saved it and had that in my head. I've renamed it to match the command name though to avoid future confusion. Thanks!
mit-mit commentedon Apr 15, 2020
LGTM, thanks
DanTup commentedon Apr 15, 2020
By the way - is there an easy way to get a project into a state where
pub outdatedwill return some packages? I accidentally ranpub upgradeon the one I was testing with, and I can't figure out how to get it into an outdated state now. I tried lowering versions on pubspec and fetching those, then putting them back, but that didn't seem to trigger it (I guess I need to have older versions of their dependencies?).DanTup commentedon Apr 15, 2020
Oh nm, I figured I can just change the versions in
pubspec.lock!mit-mit commentedon Apr 16, 2020
Hi @DanTup, what's the ETA for this going out in a release?
DanTup commentedon Apr 16, 2020
It's merged into master so is planned to go into the next release (around end of month). I can make a beta version if you want to try it out in advance.
mit-mit commentedon Apr 16, 2020
That sounds great, thanks
DanTup commentedon Apr 20, 2020
There's a beta version here if you want to try it:
https://github.com/Dart-Code/Dart-Code/releases/tag/v3.10.0-beta.1
(note: the commands won't show up unless your SDK is
> v2.8.0-a)DanTup commentedon Apr 27, 2020
@mit-mit I've pushed a new beta here (no changes to this, but has some other things merged in):
https://github.com/Dart-Code/Dart-Code/releases/tag/v3.10.0-beta.3
This command is called out in the release notes here:
https://dartcode.org/releases/v3-10/
Ping me if you'd like anything tweaking!
mit-mit commentedon Apr 27, 2020
Works well, no comments!