Skip to content

analyzer: convert async to sync function and vice versa #23962

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

Open
Tracked by #55825
kasperpeulen opened this issue Aug 4, 2015 · 3 comments
Open
Tracked by #55825

analyzer: convert async to sync function and vice versa #23962

kasperpeulen opened this issue Aug 4, 2015 · 3 comments
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-refactoring Issues with analysis server refactorings P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@kasperpeulen
Copy link

I would wish that some refactoring like this existed in webstorm:
refactor async to sync function (and vice versa)

I guess this is something for the analyzer ? For example, say I begin my program like this:

void main(List<String> arguments) {
  ...
}

After a while I find out that I need it to be async. I would like that I could refactor this, with just one shortcut to:

Future main(List<String> arguments) async {
  ...
}

Also things like:

bool get dartIsAwesome => true;

should then become:

Future<bool> get dartIsAwesome async => true;
@sethladd sethladd added Type-Enhancement legacy-area-analyzer Use area-devexp instead. devexp-refactoring Issues with analysis server refactorings labels Aug 4, 2015
@bwilkerson bwilkerson added the P3 A lower priority bug or feature request label Aug 4, 2015
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
@srawlins
Copy link
Member

Agree

@bwilkerson bwilkerson added area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. and removed legacy-area-analyzer Use area-devexp instead. labels Feb 21, 2025
@FMorschel
Copy link
Contributor

Here is the CL for the missing Remove async assist/fix https://dart-review.googlesource.com/c/sdk/+/420720

@FMorschel
Copy link
Contributor

FMorschel commented May 9, 2025

Sorry, the above got abandoned in favor of this new CL https://dart-review.googlesource.com/c/sdk/+/425602. I'll review both to make sure I'm not forgetting anything.

Edit: done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-refactoring Issues with analysis server refactorings P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants