Skip to content
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

"packages pub" doesn't release flutter lock #14703

Closed
aegis123 opened this issue Feb 14, 2018 · 4 comments
Closed

"packages pub" doesn't release flutter lock #14703

aegis123 opened this issue Feb 14, 2018 · 4 comments
Labels
tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@aegis123
Copy link

When running flutter packages pub run build_runner watch to generate model classes and keep the generated code up to date with the change I make. I can't build or install or hot reload the project I'm working on.
When I pressed the run button in intellij to compile and install the app I get the following error:

Waiting for another flutter command to release the startup lock...

When I kill the build_runner process it starts compiling and installing the project.

If I start the build_runner watch when the project is already running on a device or simulator/emulator
I get the follow error when I make a change to the code:

Initializing hot reload...
Your application could not be compiled, because its dependencies could not be established.
The following Dart file:
  /Users/user/projects/project/lib/value_models/models.dart
...refers, in an import, to the following library:
  /Users/user/projects/project/lib/value_models/models.g.dart
Unfortunately, that library does not appear to exist on your file system.

Is there a way to start a separate process for the code generation so we can keep compiling and running our apps during development?

@maksimr
Copy link

maksimr commented Feb 28, 2018

@aegis123 I have faced this problem too.

As a workaround, you could set FLUTTER_ROOT and then you can use flutter run and pub run build_runner watch(without flutter prefix) simultaneously

@Hixie
Copy link
Contributor

Hixie commented May 30, 2018

We need to release the lock before running pub.

@Hixie Hixie added easy fix tool Affects the "flutter" command-line tool. See also t: labels. labels May 30, 2018
@Hixie Hixie added this to the Goals milestone May 30, 2018
@Hixie Hixie changed the title running build_runner watch locks execution of flutter builds and hot reload "packages pub" doesn't release flutter lock May 30, 2018
@Hixie
Copy link
Contributor

Hixie commented Aug 21, 2018

@lfkdsk fixed this! Thanks!

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

3 participants