Syncing with main branch#8872
Conversation
…ons (#8838) `StringUtil.escapeProperty()` was incorrectly applied to test names in [`CommonTestConfigUtils.findTestName()`](https://github.com/flutter/flutter-intellij/blob/24d11f2a5b5165dc284df06e982a2b56892b632f/src/io/flutter/run/common/CommonTestConfigUtils.java#L139), converting non-ASCII characters (e.g. Japanese "テスト") to Unicode escape sequences. This caused `flutter test --plain-name` to receive an escaped string that did not match the actual test name, preventing the test from running. Fix by removing the `escapeProperty()` call, which is intended for `.properties` file encoding and is unnecessary here. fixes #7985 --- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide]([https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Dart contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Java and Kotlin contributions should strive to follow Java and Kotlin best practices ([discussion](#8098)). </details> --------- Co-authored-by: Helin Shiah <helinx@google.com>
This is to fix an internal freeze report that `close` can take a long time to finish. ``` com.teamdev.jxbrowser.browser.internal.BrowserImpl.close(BrowserImpl.java:779) com.teamdev.jxbrowser.internal.rpc.UniversalServiceConnection.invoke(UniversalServiceConnection.java:183) com.teamdev.jxbrowser.internal.rpc.transport.CommonThreadCallExecutor.execute(CommonThreadCallExecutor.java:29) ==> com.teamdev.jxbrowser.internal.rpc.transport.CommonThreadResponseConsumer.await(CommonThreadResponseConsumer.java:49) <== java.util.concurrent.CountDownLatch.await(Unknown Source) ``` I don't really have a good way to test (e.g. making this part slow), other than to make sure that opening and closing the tool windows remains okay.
Removes the call to `plugin..dart deploy` in favor of a bash implementation inline. Fixes: #8866 . --- Review the contribution guidelines below: - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. - [x] I've included the required information in the description above. - [x] My up-to-date information is in the `AUTHORS` file. - [x] I've updated `CHANGELOG.md` if appropriate. <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide](../CONTRIBUTING.md) and the [Flutter organization contributor guide]([https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Dart contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Java and Kotlin contributions should strive to follow Java and Kotlin best practices ([discussion](#8098)). </details> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
f30155f
into
fix/flutter-test-template-additional-args
…al-args Syncing with main branch (#8872)
There was a problem hiding this comment.
Code Review
This pull request addresses a UI freeze during JX Browser closure by moving the close operation to a pooled thread and implementing the Disposable interface. It also fixes a bug preventing gutter buttons from running tests with non-ASCII characters by removing property escaping in CommonTestConfigUtils. Furthermore, the deployment process was updated to use a manual curl command for plugin uploads. Review feedback suggests extracting duplicated logging logic into a shared utility and using xargs for safer token reading in the deployment script.
| catch (Exception ex) { | ||
| if (FlutterSettings.getInstance().isFilePathLoggingEnabled()) { | ||
| LOG.info(ex); | ||
| } else { | ||
| LOG.info("Exception when closing JX Browser engine: " + ex.getMessage()); | ||
| } |
There was a problem hiding this comment.
This catch block logic is also present in EmbeddedJxBrowser.close(). According to the repository style guide (Rule #70, DRY), duplicated code should be avoided. Please consider extracting this conditional logging logic into a shared utility method to improve maintainability and reduce duplication.
| echo "Error: Keystore token file not found at $KOKORO_TOKEN_FILE" | ||
| exit 1 | ||
| fi | ||
| TOKEN=$(cat "$KOKORO_TOKEN_FILE") |
There was a problem hiding this comment.
The TOKEN=$(cat ...) command substitution can be fragile. If the token file contains leading/trailing whitespace or newlines, they will be included in the TOKEN variable, which can lead to authentication failures. Using xargs is a more robust way to read the content of a file into a variable as it handles whitespace trimming automatically.
| TOKEN=$(cat "$KOKORO_TOKEN_FILE") | |
| TOKEN=$(xargs < "$KOKORO_TOKEN_FILE") |
Thanks for your contribution! Please replace this text with:
Review the contribution guidelines below:
AUTHORSfile.CHANGELOG.mdif appropriate.Contribution guidelines:
our contributor guide and
the Flutter organization contributor guide
for general expectations for PRs.
dart format.practices (discussion).