Skip to content

Conversation

DaveShuckerow
Copy link
Contributor

Currently, if the analysis server detects any errors in the project, it will not perform a hot reload.
This can cause hot reload to stop working needlessly when, eg, there is an analysis error in a test file.

Take two on #3181.

Copy link
Member

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, with some wording suggestions

settings.hot.reload.on.save=Perform hot reload on save
settings.disable.tracking.widget.creation=Disable tracking widget creation locations
settings.enable.bazel.test.runner=Enable new Bazel test runner
settings.hot.reload.with.error=Perform hot reload even if there are analysis errors in the project
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, Perform hot reload even if there are analysis errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

// If the analysis server detects any errors in the project, it will not perform a hot reload.
// This can cause hot reload to stop working needlessly when, eg, there is an analysis error in a test file.
// The reloadWithError option in settings is a workaround.
if (hasErrors(app.getProject(), app.getModule(), editor.getDocument()) && !mySettings.isReloadWithError()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an issue tracking a better fix (in flutter_tools)? If so, we could in-line the reference here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

</constraints>
<properties>
<text resource-bundle="io/flutter/FlutterBundle" key="settings.hot.reload.with.error"/>
<toolTipText value="Hot reload changes into running Flutter apps even with analysis errors."/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hot reload changes into running Flutter apps even if there are analysis errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@DaveShuckerow DaveShuckerow merged commit 0b000c2 into flutter:master Apr 26, 2019
stevemessick pushed a commit that referenced this pull request May 1, 2019
…3414)

* Remove the check for analysis errors blocking reloads

* Add a settings option to enable or disable reload with error

* Hide the hot reload disabling behind a flag

* Respond to comments from Devon
alexander-doroshko pushed a commit to alexander-doroshko/flutter-intellij that referenced this pull request Jan 24, 2020
…lutter#3414)

* Remove the check for analysis errors blocking reloads

* Add a settings option to enable or disable reload with error

* Hide the hot reload disabling behind a flag

* Respond to comments from Devon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants