Repository navigation
Fixed extent lists cannot handle infinite extent - #8885
Merged
Merged
Conversation
Previously they tried to compute an integer target end index, but integers can't represent infinity. Now we use null to represent infinity. Also, fix some similar issues with grids. Fixes flutter#8398
Contributor
Author
Contributor
|
LGTM, but any time anyone hits this it's going to be because they have suboptimal code... A shrink-wrapping ListView in an unbounded constraint is just a really expensive BlockBody. |
Piinks
pushed a commit
to huangyouhua1/flutter
that referenced
this pull request
Aug 7, 2026
…r#189622) `--web-define` substitution of `{{PLACEHOLDER}}` tokens in `web/index.html` and `flutter_bootstrap.js` worked in debug `flutter run` (serve-time substitution in `WebAssetServer`) and in `flutter build web` (`webDefine:`-prefixed entries in the build `Environment` consumed by the `WebTemplatedFiles` target), but not in `flutter run --profile` or `--release`: `ResidentWebRunner` stored the parsed defines in `_webDefines` and then omitted them from both `WebBuilder.buildWeb()` calls in the non-debug branch, and `ReleaseAssetServer` serves the build output verbatim with no serve-time templating, so the placeholders were never replaced. This passes `webDefines` to both `buildWeb()` call sites (the initial build in `run()` and the rebuild on hot restart), matching how `flutter build web` already passes them. Debug `--wasm` runs take the same branch and are fixed as a side effect. `flutter drive` never forwarded web-defines in any mode, so the flag is now plumbed through `DriverService.start()` into `WebDriverService` and on to the web runner. Added unit tests assert that the build `Environment` receives the `webDefine:`-prefixed defines in profile mode, on the rebuild after a hot restart in release mode, and in debug `--wasm` mode; that `WebDriverService` forwards web-defines to the web runner; and that the drive command forwards `--web-define` values to `DriverService.start()`. Added end-to-end tests run the real tool against a fixture project whose `web/index.html` and `web/flutter_bootstrap.js` contain `{{MY_VERSION}}` and `{{API_URL}}` placeholders: `flutter build web` in debug/profile/release must substitute them in `build/web/index.html` and `build/web/flutter_bootstrap.js`, and `flutter run -d web-server` in debug/profile/release must serve substituted HTML, including after hot reload (debug) and hot restart (all three modes). Existing web-define coverage for `flutter build web` and debug-mode serving is unchanged and passing. Fixes flutter#8885 (was closed, but the problem was actually this - the flag was only passed on specific run configurations). Also related to PR flutter#175805 and issue flutter#127853 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Ben Konyi <bkonyi@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously they tried to compute an integer target end index, but
integers can't represent infinity. Now we use null to represent
infinity.
Also, fix some similar issues with grids.
Fixes #8398