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
{{ message }}
Repository navigation
Missing quickfix "update import" when hide is used in import #30503
The labels for a fix (or assist) should describe what it's going to do. We could say "Update import of ''", or we could be more specific about how it's going to be updated and say something like "Show '' from '' or "Unhide '' from ''" depending on how the import will be updated.
For something like
import 'dart:math' hide max show min;
void f() {
max(1, 2);
}
We actually need to do both: remove the hide clause and add max to the show clause. (I suspect that having both a hide and show clause is rare though, so I'm not sure it's worth having a third message for it.)
We actually need to do both: remove the hide clause and add max to the show clause. (I suspect that having both a hide and show clause is rare though, so I'm not sure it's worth having a third message for it.)
I just would like to point out that there is an issue for warning when you have either two combinations of show/hide since you only need one to achieve any hiding goal
You never need more than one show or one hide combinator to achieve any hiding-goal.
Activity
bwilkerson commentedon Jan 28, 2018
Agreed. We need to update FixProcessor._addFix_importLibrary_withElement to understand
hideclauses.asashour commentedon Sep 10, 2021
Another question, what happens when the user tries to expose the 'hidden' function, e.g.
Should we say:
Update library import, orUnhide 'max'?The requester test case:
should have 'Update library import' to add
max, instead of 'Import library'bwilkerson commentedon Sep 23, 2021
The labels for a fix (or assist) should describe what it's going to do. We could say "Update import of ''", or we could be more specific about how it's going to be updated and say something like "Show '' from '' or "Unhide '' from ''" depending on how the import will be updated.
For something like
We actually need to do both: remove the hide clause and add
maxto the show clause. (I suspect that having both a hide and show clause is rare though, so I'm not sure it's worth having a third message for it.)FMorschel commentedon Aug 30, 2024
In this case the "update" would be fine I think.
Just to point out: some work related to
showis being worked on Dart-Code/Dart-Code#5238.FMorschel commentedon Oct 18, 2024
I just would like to point out that there is an issue for warning when you have either two combinations of
show/hidesince you only need one to achieve any hiding goalFrom @lrhn's comment on #56879
FMorschel commentedon Oct 19, 2024
https://dart-review.googlesource.com/c/sdk/+/390630
[DAS] "Update library import" edit hide